bpxe-bpmn-schema 0.2.1

Business Process eXecution Engine's BPMN schema
Documentation
// This file is generated from BPMN 2.0 schema using `codegen.sh` script
use super::*;
use derive_more::*;
use dyn_clone::DynClone;
use serde::{Deserialize, Serialize};
use std::fmt::Debug;
use strong_xml::{XmlRead, XmlReader, XmlResult};
use tia::Tia;
#[derive(Debug, Clone, PartialEq)]
pub enum Element {
    Definitions,
    Import,
    Activity,
    AdHocSubProcess,
    CompletionCondition,
    Artifact,
    Assignment,
    From,
    To,
    Association,
    Auditing,
    BaseElement,
    BaseElementWithMixedContent,
    BoundaryEvent,
    BusinessRuleTask,
    CallableElement,
    SupportedInterfaceRef,
    CallActivity,
    CallChoreography,
    CallConversation,
    CancelEventDefinition,
    CatchEvent,
    EventDefinitionRef,
    Category,
    CategoryValue,
    Choreography,
    ChoreographyActivity,
    ParticipantRef,
    ChoreographyTask,
    MessageFlowRef,
    Collaboration,
    ChoreographyRef,
    CompensateEventDefinition,
    ComplexBehaviorDefinition,
    Condition,
    Event,
    ComplexGateway,
    ActivationCondition,
    ConditionalEventDefinition,
    Conversation,
    ConversationAssociation,
    ConversationLink,
    ConversationNode,
    CorrelationKey,
    CorrelationPropertyRef,
    CorrelationProperty,
    CorrelationPropertyBinding,
    DataPath,
    CorrelationPropertyRetrievalExpression,
    MessagePath,
    CorrelationSubscription,
    DataAssociation,
    SourceRef,
    TargetRef,
    Transformation,
    DataInput,
    DataInputAssociation,
    DataObject,
    DataObjectReference,
    DataOutput,
    DataOutputAssociation,
    DataState,
    DataStore,
    DataStoreReference,
    Documentation,
    EndEvent,
    EndPoint,
    Error,
    ErrorEventDefinition,
    Escalation,
    EscalationEventDefinition,
    EventBasedGateway,
    EventDefinition,
    ExclusiveGateway,
    Expression,
    Extension,
    ExtensionElements,
    FlowElement,
    CategoryValueRef,
    FlowNode,
    Incoming,
    Outgoing,
    FormalExpression,
    Gateway,
    GlobalBusinessRuleTask,
    GlobalChoreographyTask,
    GlobalConversation,
    GlobalManualTask,
    GlobalScriptTask,
    GlobalTask,
    GlobalUserTask,
    Group,
    HumanPerformer,
    ImplicitThrowEvent,
    InclusiveGateway,
    InputSet,
    DataInputRefs,
    OptionalInputRefs,
    WhileExecutingInputRefs,
    OutputSetRefs,
    Interface,
    IntermediateCatchEvent,
    IntermediateThrowEvent,
    IoBinding,
    IoSpecification,
    ItemDefinition,
    Lane,
    PartitionElement,
    FlowNodeRef,
    ChildLaneSet,
    LaneSet,
    LinkEventDefinition,
    Source,
    Target,
    LoopCharacteristics,
    ManualTask,
    Message,
    MessageEventDefinition,
    OperationRef,
    MessageFlow,
    MessageFlowAssociation,
    Monitoring,
    MultiInstanceLoopCharacteristics,
    LoopCardinality,
    LoopDataInputRef,
    LoopDataOutputRef,
    InputDataItem,
    OutputDataItem,
    Operation,
    InMessageRef,
    OutMessageRef,
    ErrorRef,
    OutputSet,
    DataOutputRefs,
    OptionalOutputRefs,
    WhileExecutingOutputRefs,
    InputSetRefs,
    ParallelGateway,
    Participant,
    InterfaceRef,
    EndPointRef,
    ParticipantAssociation,
    InnerParticipantRef,
    OuterParticipantRef,
    ParticipantMultiplicity,
    PartnerEntity,
    PartnerRole,
    Performer,
    PotentialOwner,
    Process,
    Supports,
    Property,
    ReceiveTask,
    Relationship,
    Rendering,
    Resource,
    ResourceAssignmentExpression,
    ResourceParameter,
    ResourceParameterBinding,
    ResourceRole,
    ResourceRef,
    RootElement,
    ScriptTask,
    Script,
    SendTask,
    SequenceFlow,
    ConditionExpression,
    ServiceTask,
    Signal,
    SignalEventDefinition,
    StandardLoopCharacteristics,
    LoopCondition,
    StartEvent,
    SubChoreography,
    SubConversation,
    SubProcess,
    Task,
    TerminateEventDefinition,
    TextAnnotation,
    Text,
    ThrowEvent,
    TimerEventDefinition,
    TimeDate,
    TimeDuration,
    TimeCycle,
    Transaction,
    UserTask,
}
pub trait DocumentElement:
    DynClone
    + Cast<dyn DefinitionsType>
    + Cast<dyn DefinitionsTypeMut>
    + Cast<dyn ImportType>
    + Cast<dyn ImportTypeMut>
    + Cast<dyn ActivityType>
    + Cast<dyn ActivityTypeMut>
    + Cast<dyn AdHocSubProcessType>
    + Cast<dyn AdHocSubProcessTypeMut>
    + Cast<dyn ArtifactType>
    + Cast<dyn ArtifactTypeMut>
    + Cast<dyn AssignmentType>
    + Cast<dyn AssignmentTypeMut>
    + Cast<dyn AssociationType>
    + Cast<dyn AssociationTypeMut>
    + Cast<dyn AuditingType>
    + Cast<dyn AuditingTypeMut>
    + Cast<dyn BaseElementType>
    + Cast<dyn BaseElementTypeMut>
    + Cast<dyn BaseElementWithMixedContentType>
    + Cast<dyn BaseElementWithMixedContentTypeMut>
    + Cast<dyn BoundaryEventType>
    + Cast<dyn BoundaryEventTypeMut>
    + Cast<dyn BusinessRuleTaskType>
    + Cast<dyn BusinessRuleTaskTypeMut>
    + Cast<dyn CallableElementType>
    + Cast<dyn CallableElementTypeMut>
    + Cast<dyn CallActivityType>
    + Cast<dyn CallActivityTypeMut>
    + Cast<dyn CallChoreographyType>
    + Cast<dyn CallChoreographyTypeMut>
    + Cast<dyn CallConversationType>
    + Cast<dyn CallConversationTypeMut>
    + Cast<dyn CancelEventDefinitionType>
    + Cast<dyn CancelEventDefinitionTypeMut>
    + Cast<dyn CatchEventType>
    + Cast<dyn CatchEventTypeMut>
    + Cast<dyn CategoryType>
    + Cast<dyn CategoryTypeMut>
    + Cast<dyn CategoryValueType>
    + Cast<dyn CategoryValueTypeMut>
    + Cast<dyn ChoreographyType>
    + Cast<dyn ChoreographyTypeMut>
    + Cast<dyn ChoreographyActivityType>
    + Cast<dyn ChoreographyActivityTypeMut>
    + Cast<dyn ChoreographyTaskType>
    + Cast<dyn ChoreographyTaskTypeMut>
    + Cast<dyn CollaborationType>
    + Cast<dyn CollaborationTypeMut>
    + Cast<dyn CompensateEventDefinitionType>
    + Cast<dyn CompensateEventDefinitionTypeMut>
    + Cast<dyn ComplexBehaviorDefinitionType>
    + Cast<dyn ComplexBehaviorDefinitionTypeMut>
    + Cast<dyn ComplexGatewayType>
    + Cast<dyn ComplexGatewayTypeMut>
    + Cast<dyn ConditionalEventDefinitionType>
    + Cast<dyn ConditionalEventDefinitionTypeMut>
    + Cast<dyn ConversationType>
    + Cast<dyn ConversationTypeMut>
    + Cast<dyn ConversationAssociationType>
    + Cast<dyn ConversationAssociationTypeMut>
    + Cast<dyn ConversationLinkType>
    + Cast<dyn ConversationLinkTypeMut>
    + Cast<dyn ConversationNodeType>
    + Cast<dyn ConversationNodeTypeMut>
    + Cast<dyn CorrelationKeyType>
    + Cast<dyn CorrelationKeyTypeMut>
    + Cast<dyn CorrelationPropertyType>
    + Cast<dyn CorrelationPropertyTypeMut>
    + Cast<dyn CorrelationPropertyBindingType>
    + Cast<dyn CorrelationPropertyBindingTypeMut>
    + Cast<dyn CorrelationPropertyRetrievalExpressionType>
    + Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut>
    + Cast<dyn CorrelationSubscriptionType>
    + Cast<dyn CorrelationSubscriptionTypeMut>
    + Cast<dyn DataAssociationType>
    + Cast<dyn DataAssociationTypeMut>
    + Cast<dyn DataInputType>
    + Cast<dyn DataInputTypeMut>
    + Cast<dyn DataInputAssociationType>
    + Cast<dyn DataInputAssociationTypeMut>
    + Cast<dyn DataObjectType>
    + Cast<dyn DataObjectTypeMut>
    + Cast<dyn DataObjectReferenceType>
    + Cast<dyn DataObjectReferenceTypeMut>
    + Cast<dyn DataOutputType>
    + Cast<dyn DataOutputTypeMut>
    + Cast<dyn DataOutputAssociationType>
    + Cast<dyn DataOutputAssociationTypeMut>
    + Cast<dyn DataStateType>
    + Cast<dyn DataStateTypeMut>
    + Cast<dyn DataStoreType>
    + Cast<dyn DataStoreTypeMut>
    + Cast<dyn DataStoreReferenceType>
    + Cast<dyn DataStoreReferenceTypeMut>
    + Cast<dyn DocumentationType>
    + Cast<dyn DocumentationTypeMut>
    + Cast<dyn EndEventType>
    + Cast<dyn EndEventTypeMut>
    + Cast<dyn EndPointType>
    + Cast<dyn EndPointTypeMut>
    + Cast<dyn ErrorType>
    + Cast<dyn ErrorTypeMut>
    + Cast<dyn ErrorEventDefinitionType>
    + Cast<dyn ErrorEventDefinitionTypeMut>
    + Cast<dyn EscalationType>
    + Cast<dyn EscalationTypeMut>
    + Cast<dyn EscalationEventDefinitionType>
    + Cast<dyn EscalationEventDefinitionTypeMut>
    + Cast<dyn EventType>
    + Cast<dyn EventTypeMut>
    + Cast<dyn EventBasedGatewayType>
    + Cast<dyn EventBasedGatewayTypeMut>
    + Cast<dyn EventDefinitionType>
    + Cast<dyn EventDefinitionTypeMut>
    + Cast<dyn ExclusiveGatewayType>
    + Cast<dyn ExclusiveGatewayTypeMut>
    + Cast<dyn ExpressionType>
    + Cast<dyn ExpressionTypeMut>
    + Cast<dyn ExtensionType>
    + Cast<dyn ExtensionTypeMut>
    + Cast<dyn ExtensionElementsType>
    + Cast<dyn ExtensionElementsTypeMut>
    + Cast<dyn FlowElementType>
    + Cast<dyn FlowElementTypeMut>
    + Cast<dyn FlowNodeType>
    + Cast<dyn FlowNodeTypeMut>
    + Cast<dyn FormalExpressionType>
    + Cast<dyn FormalExpressionTypeMut>
    + Cast<dyn GatewayType>
    + Cast<dyn GatewayTypeMut>
    + Cast<dyn GlobalBusinessRuleTaskType>
    + Cast<dyn GlobalBusinessRuleTaskTypeMut>
    + Cast<dyn GlobalChoreographyTaskType>
    + Cast<dyn GlobalChoreographyTaskTypeMut>
    + Cast<dyn GlobalConversationType>
    + Cast<dyn GlobalConversationTypeMut>
    + Cast<dyn GlobalManualTaskType>
    + Cast<dyn GlobalManualTaskTypeMut>
    + Cast<dyn GlobalScriptTaskType>
    + Cast<dyn GlobalScriptTaskTypeMut>
    + Cast<dyn GlobalTaskType>
    + Cast<dyn GlobalTaskTypeMut>
    + Cast<dyn GlobalUserTaskType>
    + Cast<dyn GlobalUserTaskTypeMut>
    + Cast<dyn GroupType>
    + Cast<dyn GroupTypeMut>
    + Cast<dyn HumanPerformerType>
    + Cast<dyn HumanPerformerTypeMut>
    + Cast<dyn ImplicitThrowEventType>
    + Cast<dyn ImplicitThrowEventTypeMut>
    + Cast<dyn InclusiveGatewayType>
    + Cast<dyn InclusiveGatewayTypeMut>
    + Cast<dyn InputSetType>
    + Cast<dyn InputSetTypeMut>
    + Cast<dyn InterfaceType>
    + Cast<dyn InterfaceTypeMut>
    + Cast<dyn IntermediateCatchEventType>
    + Cast<dyn IntermediateCatchEventTypeMut>
    + Cast<dyn IntermediateThrowEventType>
    + Cast<dyn IntermediateThrowEventTypeMut>
    + Cast<dyn InputOutputBindingType>
    + Cast<dyn InputOutputBindingTypeMut>
    + Cast<dyn InputOutputSpecificationType>
    + Cast<dyn InputOutputSpecificationTypeMut>
    + Cast<dyn ItemDefinitionType>
    + Cast<dyn ItemDefinitionTypeMut>
    + Cast<dyn LaneType>
    + Cast<dyn LaneTypeMut>
    + Cast<dyn LaneSetType>
    + Cast<dyn LaneSetTypeMut>
    + Cast<dyn LinkEventDefinitionType>
    + Cast<dyn LinkEventDefinitionTypeMut>
    + Cast<dyn LoopCharacteristicsType>
    + Cast<dyn LoopCharacteristicsTypeMut>
    + Cast<dyn ManualTaskType>
    + Cast<dyn ManualTaskTypeMut>
    + Cast<dyn MessageType>
    + Cast<dyn MessageTypeMut>
    + Cast<dyn MessageEventDefinitionType>
    + Cast<dyn MessageEventDefinitionTypeMut>
    + Cast<dyn MessageFlowType>
    + Cast<dyn MessageFlowTypeMut>
    + Cast<dyn MessageFlowAssociationType>
    + Cast<dyn MessageFlowAssociationTypeMut>
    + Cast<dyn MonitoringType>
    + Cast<dyn MonitoringTypeMut>
    + Cast<dyn MultiInstanceLoopCharacteristicsType>
    + Cast<dyn MultiInstanceLoopCharacteristicsTypeMut>
    + Cast<dyn OperationType>
    + Cast<dyn OperationTypeMut>
    + Cast<dyn OutputSetType>
    + Cast<dyn OutputSetTypeMut>
    + Cast<dyn ParallelGatewayType>
    + Cast<dyn ParallelGatewayTypeMut>
    + Cast<dyn ParticipantType>
    + Cast<dyn ParticipantTypeMut>
    + Cast<dyn ParticipantAssociationType>
    + Cast<dyn ParticipantAssociationTypeMut>
    + Cast<dyn ParticipantMultiplicityType>
    + Cast<dyn ParticipantMultiplicityTypeMut>
    + Cast<dyn PartnerEntityType>
    + Cast<dyn PartnerEntityTypeMut>
    + Cast<dyn PartnerRoleType>
    + Cast<dyn PartnerRoleTypeMut>
    + Cast<dyn PerformerType>
    + Cast<dyn PerformerTypeMut>
    + Cast<dyn PotentialOwnerType>
    + Cast<dyn PotentialOwnerTypeMut>
    + Cast<dyn ProcessType>
    + Cast<dyn ProcessTypeMut>
    + Cast<dyn PropertyType>
    + Cast<dyn PropertyTypeMut>
    + Cast<dyn ReceiveTaskType>
    + Cast<dyn ReceiveTaskTypeMut>
    + Cast<dyn RelationshipType>
    + Cast<dyn RelationshipTypeMut>
    + Cast<dyn RenderingType>
    + Cast<dyn RenderingTypeMut>
    + Cast<dyn ResourceType>
    + Cast<dyn ResourceTypeMut>
    + Cast<dyn ResourceAssignmentExpressionType>
    + Cast<dyn ResourceAssignmentExpressionTypeMut>
    + Cast<dyn ResourceParameterType>
    + Cast<dyn ResourceParameterTypeMut>
    + Cast<dyn ResourceParameterBindingType>
    + Cast<dyn ResourceParameterBindingTypeMut>
    + Cast<dyn ResourceRoleType>
    + Cast<dyn ResourceRoleTypeMut>
    + Cast<dyn RootElementType>
    + Cast<dyn RootElementTypeMut>
    + Cast<dyn ScriptTaskType>
    + Cast<dyn ScriptTaskTypeMut>
    + Cast<dyn ScriptType>
    + Cast<dyn ScriptTypeMut>
    + Cast<dyn SendTaskType>
    + Cast<dyn SendTaskTypeMut>
    + Cast<dyn SequenceFlowType>
    + Cast<dyn SequenceFlowTypeMut>
    + Cast<dyn ServiceTaskType>
    + Cast<dyn ServiceTaskTypeMut>
    + Cast<dyn SignalType>
    + Cast<dyn SignalTypeMut>
    + Cast<dyn SignalEventDefinitionType>
    + Cast<dyn SignalEventDefinitionTypeMut>
    + Cast<dyn StandardLoopCharacteristicsType>
    + Cast<dyn StandardLoopCharacteristicsTypeMut>
    + Cast<dyn StartEventType>
    + Cast<dyn StartEventTypeMut>
    + Cast<dyn SubChoreographyType>
    + Cast<dyn SubChoreographyTypeMut>
    + Cast<dyn SubConversationType>
    + Cast<dyn SubConversationTypeMut>
    + Cast<dyn SubProcessType>
    + Cast<dyn SubProcessTypeMut>
    + Cast<dyn TaskType>
    + Cast<dyn TaskTypeMut>
    + Cast<dyn TerminateEventDefinitionType>
    + Cast<dyn TerminateEventDefinitionTypeMut>
    + Cast<dyn TextAnnotationType>
    + Cast<dyn TextAnnotationTypeMut>
    + Cast<dyn TextType>
    + Cast<dyn TextTypeMut>
    + Cast<dyn ThrowEventType>
    + Cast<dyn ThrowEventTypeMut>
    + Cast<dyn TimerEventDefinitionType>
    + Cast<dyn TimerEventDefinitionTypeMut>
    + Cast<dyn TransactionType>
    + Cast<dyn TransactionTypeMut>
    + Cast<dyn UserTaskType>
    + Cast<dyn UserTaskTypeMut>
    + DocumentElementContainer
    + Send
    + std::fmt::Debug
{
    fn element(&self) -> Element;
}
impl_downcast!(DocumentElement);

/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:definitions")]
pub struct Definitions {
    #[xml(attr = "id")]
    #[tia("DefinitionsType",rg*="id","DefinitionsTypeMut",s)]
    pub id: Option<Id>,
    #[xml(attr = "name")]
    #[tia("DefinitionsType",rg*="name","DefinitionsTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "targetNamespace")]
    #[tia("DefinitionsType",rg*="target_namespace","DefinitionsTypeMut",s)]
    pub target_namespace: URI,
    #[xml(attr = "expressionLanguage")]
    #[tia("DefinitionsType",rg*="expression_language","DefinitionsTypeMut",s)]
    pub expression_language: Option<URI>,
    #[xml(attr = "typeLanguage")]
    #[tia("DefinitionsType",rg*="type_language","DefinitionsTypeMut",s)]
    pub type_language: Option<URI>,
    #[xml(attr = "exporter")]
    #[tia("DefinitionsType",rg*="exporter","DefinitionsTypeMut",s)]
    pub exporter: Option<String>,
    #[xml(attr = "exporterVersion")]
    #[tia("DefinitionsType",rg*="exporter_version","DefinitionsTypeMut",s)]
    pub exporter_version: Option<String>,
    #[xml(child = "bpmn:import")]
    #[tia("DefinitionsType",rg*="imports","DefinitionsTypeMut",s,rmg*="imports_mut")]
    pub imports: Vec<Import>,
    #[xml(child = "bpmn:extension")]
    #[tia("DefinitionsType",rg*="extensions","DefinitionsTypeMut",s,rmg*="extensions_mut")]
    pub extensions: Vec<Extension>,
    #[xml(
        child = "bpmn:category",
        child = "bpmn:collaboration",
        child = "bpmn:correlationProperty",
        child = "bpmn:dataStore",
        child = "bpmn:endPoint",
        child = "bpmn:error",
        child = "bpmn:escalation",
        child = "bpmn:eventDefinition",
        child = "bpmn:globalBusinessRuleTask",
        child = "bpmn:globalManualTask",
        child = "bpmn:globalScriptTask",
        child = "bpmn:globalTask",
        child = "bpmn:globalUserTask",
        child = "bpmn:interface",
        child = "bpmn:itemDefinition",
        child = "bpmn:message",
        child = "bpmn:partnerEntity",
        child = "bpmn:partnerRole",
        child = "bpmn:process",
        child = "bpmn:resource",
        child = "bpmn:signal"
    )]
    #[tia("DefinitionsType",rg*="root_elements","DefinitionsTypeMut",s,rmg*="root_elements_mut")]
    pub root_elements: Vec<RootElement>,
    #[xml(child = "bpmn:relationship")]
    #[tia("DefinitionsType",rg*="relationships","DefinitionsTypeMut",s,rmg*="relationships_mut")]
    pub relationships: Vec<Relationship>,
}
impl DocumentElement for Definitions {
    fn element(&self) -> Element {
        Element::Definitions
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Definitions {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.imports.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.extensions.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.root_elements.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.relationships.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.imports.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.extensions.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.root_elements.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.relationships.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `definitions`
pub trait DefinitionsType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `id`
    fn id(&self) -> &Option<Id>;
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `targetNamespace`
    fn target_namespace(&self) -> &URI;
    /// Get value of attribute `expressionLanguage`
    fn expression_language(&self) -> &Option<URI>;
    /// Get value of attribute `typeLanguage`
    fn type_language(&self) -> &Option<URI>;
    /// Get value of attribute `exporter`
    fn exporter(&self) -> &Option<String>;
    /// Get value of attribute `exporterVersion`
    fn exporter_version(&self) -> &Option<String>;
    /// Get value of `import` child
    fn imports(&self) -> &Vec<Import>;
    /// Get value of `extension` child
    fn extensions(&self) -> &Vec<Extension>;
    /// Get value of `rootElement` child
    fn root_elements(&self) -> &Vec<RootElement>;
    /// Get value of `relationship` child
    fn relationships(&self) -> &Vec<Relationship>;
}
dyn_clone::clone_trait_object!(DefinitionsType);
impl_downcast!(DefinitionsType);
/// Mutable access to `definitions`
pub trait DefinitionsTypeMut: Downcast + Debug + Send + DynClone + DefinitionsType {
    /// Set value of attribute `id`
    fn set_id(&mut self, value: Option<Id>);
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `targetNamespace`
    fn set_target_namespace(&mut self, value: URI);
    /// Set value of attribute `expressionLanguage`
    fn set_expression_language(&mut self, value: Option<URI>);
    /// Set value of attribute `typeLanguage`
    fn set_type_language(&mut self, value: Option<URI>);
    /// Set value of attribute `exporter`
    fn set_exporter(&mut self, value: Option<String>);
    /// Set value of attribute `exporterVersion`
    fn set_exporter_version(&mut self, value: Option<String>);
    /// Get a mutable value of `import` child
    fn imports_mut(&mut self) -> &mut Vec<Import>;
    /// Set value of `import` child
    fn set_imports(&mut self, value: Vec<Import>);
    /// Get a mutable value of `extension` child
    fn extensions_mut(&mut self) -> &mut Vec<Extension>;
    /// Set value of `extension` child
    fn set_extensions(&mut self, value: Vec<Extension>);
    /// Get a mutable value of `rootElement` child
    fn root_elements_mut(&mut self) -> &mut Vec<RootElement>;
    /// Set value of `rootElement` child
    fn set_root_elements(&mut self, value: Vec<RootElement>);
    /// Get a mutable value of `relationship` child
    fn relationships_mut(&mut self) -> &mut Vec<Relationship>;
    /// Set value of `relationship` child
    fn set_relationships(&mut self, value: Vec<Relationship>);
}
dyn_clone::clone_trait_object!(DefinitionsTypeMut);
impl_downcast!(DefinitionsTypeMut);
impl Cast<dyn DefinitionsType> for Definitions {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DefinitionsTypeMut> for Definitions {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ImportType> for Definitions {}
impl Cast<dyn ImportTypeMut> for Definitions {}
impl Cast<dyn ActivityType> for Definitions {}
impl Cast<dyn ActivityTypeMut> for Definitions {}
impl Cast<dyn AdHocSubProcessType> for Definitions {}
impl Cast<dyn AdHocSubProcessTypeMut> for Definitions {}
impl Cast<dyn ArtifactType> for Definitions {}
impl Cast<dyn ArtifactTypeMut> for Definitions {}
impl Cast<dyn AssignmentType> for Definitions {}
impl Cast<dyn AssignmentTypeMut> for Definitions {}
impl Cast<dyn AssociationType> for Definitions {}
impl Cast<dyn AssociationTypeMut> for Definitions {}
impl Cast<dyn AuditingType> for Definitions {}
impl Cast<dyn AuditingTypeMut> for Definitions {}
impl Cast<dyn BaseElementType> for Definitions {}
impl Cast<dyn BaseElementTypeMut> for Definitions {}
impl Cast<dyn BaseElementWithMixedContentType> for Definitions {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Definitions {}
impl Cast<dyn BoundaryEventType> for Definitions {}
impl Cast<dyn BoundaryEventTypeMut> for Definitions {}
impl Cast<dyn BusinessRuleTaskType> for Definitions {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Definitions {}
impl Cast<dyn CallableElementType> for Definitions {}
impl Cast<dyn CallableElementTypeMut> for Definitions {}
impl Cast<dyn CallActivityType> for Definitions {}
impl Cast<dyn CallActivityTypeMut> for Definitions {}
impl Cast<dyn CallChoreographyType> for Definitions {}
impl Cast<dyn CallChoreographyTypeMut> for Definitions {}
impl Cast<dyn CallConversationType> for Definitions {}
impl Cast<dyn CallConversationTypeMut> for Definitions {}
impl Cast<dyn CancelEventDefinitionType> for Definitions {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn CatchEventType> for Definitions {}
impl Cast<dyn CatchEventTypeMut> for Definitions {}
impl Cast<dyn CategoryType> for Definitions {}
impl Cast<dyn CategoryTypeMut> for Definitions {}
impl Cast<dyn CategoryValueType> for Definitions {}
impl Cast<dyn CategoryValueTypeMut> for Definitions {}
impl Cast<dyn ChoreographyType> for Definitions {}
impl Cast<dyn ChoreographyTypeMut> for Definitions {}
impl Cast<dyn ChoreographyActivityType> for Definitions {}
impl Cast<dyn ChoreographyActivityTypeMut> for Definitions {}
impl Cast<dyn ChoreographyTaskType> for Definitions {}
impl Cast<dyn ChoreographyTaskTypeMut> for Definitions {}
impl Cast<dyn CollaborationType> for Definitions {}
impl Cast<dyn CollaborationTypeMut> for Definitions {}
impl Cast<dyn CompensateEventDefinitionType> for Definitions {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Definitions {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Definitions {}
impl Cast<dyn ComplexGatewayType> for Definitions {}
impl Cast<dyn ComplexGatewayTypeMut> for Definitions {}
impl Cast<dyn ConditionalEventDefinitionType> for Definitions {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn ConversationType> for Definitions {}
impl Cast<dyn ConversationTypeMut> for Definitions {}
impl Cast<dyn ConversationAssociationType> for Definitions {}
impl Cast<dyn ConversationAssociationTypeMut> for Definitions {}
impl Cast<dyn ConversationLinkType> for Definitions {}
impl Cast<dyn ConversationLinkTypeMut> for Definitions {}
impl Cast<dyn ConversationNodeType> for Definitions {}
impl Cast<dyn ConversationNodeTypeMut> for Definitions {}
impl Cast<dyn CorrelationKeyType> for Definitions {}
impl Cast<dyn CorrelationKeyTypeMut> for Definitions {}
impl Cast<dyn CorrelationPropertyType> for Definitions {}
impl Cast<dyn CorrelationPropertyTypeMut> for Definitions {}
impl Cast<dyn CorrelationPropertyBindingType> for Definitions {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Definitions {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Definitions {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Definitions {}
impl Cast<dyn CorrelationSubscriptionType> for Definitions {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Definitions {}
impl Cast<dyn DataAssociationType> for Definitions {}
impl Cast<dyn DataAssociationTypeMut> for Definitions {}
impl Cast<dyn DataInputType> for Definitions {}
impl Cast<dyn DataInputTypeMut> for Definitions {}
impl Cast<dyn DataInputAssociationType> for Definitions {}
impl Cast<dyn DataInputAssociationTypeMut> for Definitions {}
impl Cast<dyn DataObjectType> for Definitions {}
impl Cast<dyn DataObjectTypeMut> for Definitions {}
impl Cast<dyn DataObjectReferenceType> for Definitions {}
impl Cast<dyn DataObjectReferenceTypeMut> for Definitions {}
impl Cast<dyn DataOutputType> for Definitions {}
impl Cast<dyn DataOutputTypeMut> for Definitions {}
impl Cast<dyn DataOutputAssociationType> for Definitions {}
impl Cast<dyn DataOutputAssociationTypeMut> for Definitions {}
impl Cast<dyn DataStateType> for Definitions {}
impl Cast<dyn DataStateTypeMut> for Definitions {}
impl Cast<dyn DataStoreType> for Definitions {}
impl Cast<dyn DataStoreTypeMut> for Definitions {}
impl Cast<dyn DataStoreReferenceType> for Definitions {}
impl Cast<dyn DataStoreReferenceTypeMut> for Definitions {}
impl Cast<dyn DocumentationType> for Definitions {}
impl Cast<dyn DocumentationTypeMut> for Definitions {}
impl Cast<dyn EndEventType> for Definitions {}
impl Cast<dyn EndEventTypeMut> for Definitions {}
impl Cast<dyn EndPointType> for Definitions {}
impl Cast<dyn EndPointTypeMut> for Definitions {}
impl Cast<dyn ErrorType> for Definitions {}
impl Cast<dyn ErrorTypeMut> for Definitions {}
impl Cast<dyn ErrorEventDefinitionType> for Definitions {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn EscalationType> for Definitions {}
impl Cast<dyn EscalationTypeMut> for Definitions {}
impl Cast<dyn EscalationEventDefinitionType> for Definitions {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn EventType> for Definitions {}
impl Cast<dyn EventTypeMut> for Definitions {}
impl Cast<dyn EventBasedGatewayType> for Definitions {}
impl Cast<dyn EventBasedGatewayTypeMut> for Definitions {}
impl Cast<dyn EventDefinitionType> for Definitions {}
impl Cast<dyn EventDefinitionTypeMut> for Definitions {}
impl Cast<dyn ExclusiveGatewayType> for Definitions {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Definitions {}
impl Cast<dyn ExpressionType> for Definitions {}
impl Cast<dyn ExpressionTypeMut> for Definitions {}
impl Cast<dyn ExtensionType> for Definitions {}
impl Cast<dyn ExtensionTypeMut> for Definitions {}
impl Cast<dyn ExtensionElementsType> for Definitions {}
impl Cast<dyn ExtensionElementsTypeMut> for Definitions {}
impl Cast<dyn FlowElementType> for Definitions {}
impl Cast<dyn FlowElementTypeMut> for Definitions {}
impl Cast<dyn FlowNodeType> for Definitions {}
impl Cast<dyn FlowNodeTypeMut> for Definitions {}
impl Cast<dyn FormalExpressionType> for Definitions {}
impl Cast<dyn FormalExpressionTypeMut> for Definitions {}
impl Cast<dyn GatewayType> for Definitions {}
impl Cast<dyn GatewayTypeMut> for Definitions {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Definitions {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Definitions {}
impl Cast<dyn GlobalChoreographyTaskType> for Definitions {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Definitions {}
impl Cast<dyn GlobalConversationType> for Definitions {}
impl Cast<dyn GlobalConversationTypeMut> for Definitions {}
impl Cast<dyn GlobalManualTaskType> for Definitions {}
impl Cast<dyn GlobalManualTaskTypeMut> for Definitions {}
impl Cast<dyn GlobalScriptTaskType> for Definitions {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Definitions {}
impl Cast<dyn GlobalTaskType> for Definitions {}
impl Cast<dyn GlobalTaskTypeMut> for Definitions {}
impl Cast<dyn GlobalUserTaskType> for Definitions {}
impl Cast<dyn GlobalUserTaskTypeMut> for Definitions {}
impl Cast<dyn GroupType> for Definitions {}
impl Cast<dyn GroupTypeMut> for Definitions {}
impl Cast<dyn HumanPerformerType> for Definitions {}
impl Cast<dyn HumanPerformerTypeMut> for Definitions {}
impl Cast<dyn ImplicitThrowEventType> for Definitions {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Definitions {}
impl Cast<dyn InclusiveGatewayType> for Definitions {}
impl Cast<dyn InclusiveGatewayTypeMut> for Definitions {}
impl Cast<dyn InputSetType> for Definitions {}
impl Cast<dyn InputSetTypeMut> for Definitions {}
impl Cast<dyn InterfaceType> for Definitions {}
impl Cast<dyn InterfaceTypeMut> for Definitions {}
impl Cast<dyn IntermediateCatchEventType> for Definitions {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Definitions {}
impl Cast<dyn IntermediateThrowEventType> for Definitions {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Definitions {}
impl Cast<dyn InputOutputBindingType> for Definitions {}
impl Cast<dyn InputOutputBindingTypeMut> for Definitions {}
impl Cast<dyn InputOutputSpecificationType> for Definitions {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Definitions {}
impl Cast<dyn ItemDefinitionType> for Definitions {}
impl Cast<dyn ItemDefinitionTypeMut> for Definitions {}
impl Cast<dyn LaneType> for Definitions {}
impl Cast<dyn LaneTypeMut> for Definitions {}
impl Cast<dyn LaneSetType> for Definitions {}
impl Cast<dyn LaneSetTypeMut> for Definitions {}
impl Cast<dyn LinkEventDefinitionType> for Definitions {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn LoopCharacteristicsType> for Definitions {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Definitions {}
impl Cast<dyn ManualTaskType> for Definitions {}
impl Cast<dyn ManualTaskTypeMut> for Definitions {}
impl Cast<dyn MessageType> for Definitions {}
impl Cast<dyn MessageTypeMut> for Definitions {}
impl Cast<dyn MessageEventDefinitionType> for Definitions {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn MessageFlowType> for Definitions {}
impl Cast<dyn MessageFlowTypeMut> for Definitions {}
impl Cast<dyn MessageFlowAssociationType> for Definitions {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Definitions {}
impl Cast<dyn MonitoringType> for Definitions {}
impl Cast<dyn MonitoringTypeMut> for Definitions {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Definitions {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Definitions {}
impl Cast<dyn OperationType> for Definitions {}
impl Cast<dyn OperationTypeMut> for Definitions {}
impl Cast<dyn OutputSetType> for Definitions {}
impl Cast<dyn OutputSetTypeMut> for Definitions {}
impl Cast<dyn ParallelGatewayType> for Definitions {}
impl Cast<dyn ParallelGatewayTypeMut> for Definitions {}
impl Cast<dyn ParticipantType> for Definitions {}
impl Cast<dyn ParticipantTypeMut> for Definitions {}
impl Cast<dyn ParticipantAssociationType> for Definitions {}
impl Cast<dyn ParticipantAssociationTypeMut> for Definitions {}
impl Cast<dyn ParticipantMultiplicityType> for Definitions {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Definitions {}
impl Cast<dyn PartnerEntityType> for Definitions {}
impl Cast<dyn PartnerEntityTypeMut> for Definitions {}
impl Cast<dyn PartnerRoleType> for Definitions {}
impl Cast<dyn PartnerRoleTypeMut> for Definitions {}
impl Cast<dyn PerformerType> for Definitions {}
impl Cast<dyn PerformerTypeMut> for Definitions {}
impl Cast<dyn PotentialOwnerType> for Definitions {}
impl Cast<dyn PotentialOwnerTypeMut> for Definitions {}
impl Cast<dyn ProcessType> for Definitions {}
impl Cast<dyn ProcessTypeMut> for Definitions {}
impl Cast<dyn PropertyType> for Definitions {}
impl Cast<dyn PropertyTypeMut> for Definitions {}
impl Cast<dyn ReceiveTaskType> for Definitions {}
impl Cast<dyn ReceiveTaskTypeMut> for Definitions {}
impl Cast<dyn RelationshipType> for Definitions {}
impl Cast<dyn RelationshipTypeMut> for Definitions {}
impl Cast<dyn RenderingType> for Definitions {}
impl Cast<dyn RenderingTypeMut> for Definitions {}
impl Cast<dyn ResourceType> for Definitions {}
impl Cast<dyn ResourceTypeMut> for Definitions {}
impl Cast<dyn ResourceAssignmentExpressionType> for Definitions {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Definitions {}
impl Cast<dyn ResourceParameterType> for Definitions {}
impl Cast<dyn ResourceParameterTypeMut> for Definitions {}
impl Cast<dyn ResourceParameterBindingType> for Definitions {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Definitions {}
impl Cast<dyn ResourceRoleType> for Definitions {}
impl Cast<dyn ResourceRoleTypeMut> for Definitions {}
impl Cast<dyn RootElementType> for Definitions {}
impl Cast<dyn RootElementTypeMut> for Definitions {}
impl Cast<dyn ScriptTaskType> for Definitions {}
impl Cast<dyn ScriptTaskTypeMut> for Definitions {}
impl Cast<dyn ScriptType> for Definitions {}
impl Cast<dyn ScriptTypeMut> for Definitions {}
impl Cast<dyn SendTaskType> for Definitions {}
impl Cast<dyn SendTaskTypeMut> for Definitions {}
impl Cast<dyn SequenceFlowType> for Definitions {}
impl Cast<dyn SequenceFlowTypeMut> for Definitions {}
impl Cast<dyn ServiceTaskType> for Definitions {}
impl Cast<dyn ServiceTaskTypeMut> for Definitions {}
impl Cast<dyn SignalType> for Definitions {}
impl Cast<dyn SignalTypeMut> for Definitions {}
impl Cast<dyn SignalEventDefinitionType> for Definitions {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn StandardLoopCharacteristicsType> for Definitions {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Definitions {}
impl Cast<dyn StartEventType> for Definitions {}
impl Cast<dyn StartEventTypeMut> for Definitions {}
impl Cast<dyn SubChoreographyType> for Definitions {}
impl Cast<dyn SubChoreographyTypeMut> for Definitions {}
impl Cast<dyn SubConversationType> for Definitions {}
impl Cast<dyn SubConversationTypeMut> for Definitions {}
impl Cast<dyn SubProcessType> for Definitions {}
impl Cast<dyn SubProcessTypeMut> for Definitions {}
impl Cast<dyn TaskType> for Definitions {}
impl Cast<dyn TaskTypeMut> for Definitions {}
impl Cast<dyn TerminateEventDefinitionType> for Definitions {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn TextAnnotationType> for Definitions {}
impl Cast<dyn TextAnnotationTypeMut> for Definitions {}
impl Cast<dyn TextType> for Definitions {}
impl Cast<dyn TextTypeMut> for Definitions {}
impl Cast<dyn ThrowEventType> for Definitions {}
impl Cast<dyn ThrowEventTypeMut> for Definitions {}
impl Cast<dyn TimerEventDefinitionType> for Definitions {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Definitions {}
impl Cast<dyn TransactionType> for Definitions {}
impl Cast<dyn TransactionTypeMut> for Definitions {}
impl Cast<dyn UserTaskType> for Definitions {}
impl Cast<dyn UserTaskTypeMut> for Definitions {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:import")]
pub struct Import {
    #[xml(attr = "namespace")]
    #[tia("ImportType",rg*="namespace","ImportTypeMut",s)]
    pub namespace: URI,
    #[xml(attr = "location")]
    #[tia("ImportType",rg*="location","ImportTypeMut",s)]
    pub location: String,
    #[xml(attr = "importType")]
    #[tia("ImportType",rg*="import_type","ImportTypeMut",s)]
    pub import_type: URI,
}
impl DocumentElement for Import {
    fn element(&self) -> Element {
        Element::Import
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Import {}
// Traits

//

/// Access to `import`
pub trait ImportType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `namespace`
    fn namespace(&self) -> &URI;
    /// Get value of attribute `location`
    fn location(&self) -> &String;
    /// Get value of attribute `importType`
    fn import_type(&self) -> &URI;
}
dyn_clone::clone_trait_object!(ImportType);
impl_downcast!(ImportType);
/// Mutable access to `import`
pub trait ImportTypeMut: Downcast + Debug + Send + DynClone + ImportType {
    /// Set value of attribute `namespace`
    fn set_namespace(&mut self, value: URI);
    /// Set value of attribute `location`
    fn set_location(&mut self, value: String);
    /// Set value of attribute `importType`
    fn set_import_type(&mut self, value: URI);
}
dyn_clone::clone_trait_object!(ImportTypeMut);
impl_downcast!(ImportTypeMut);
impl Cast<dyn DefinitionsType> for Import {}
impl Cast<dyn DefinitionsTypeMut> for Import {}
impl Cast<dyn ImportType> for Import {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ImportTypeMut> for Import {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityType> for Import {}
impl Cast<dyn ActivityTypeMut> for Import {}
impl Cast<dyn AdHocSubProcessType> for Import {}
impl Cast<dyn AdHocSubProcessTypeMut> for Import {}
impl Cast<dyn ArtifactType> for Import {}
impl Cast<dyn ArtifactTypeMut> for Import {}
impl Cast<dyn AssignmentType> for Import {}
impl Cast<dyn AssignmentTypeMut> for Import {}
impl Cast<dyn AssociationType> for Import {}
impl Cast<dyn AssociationTypeMut> for Import {}
impl Cast<dyn AuditingType> for Import {}
impl Cast<dyn AuditingTypeMut> for Import {}
impl Cast<dyn BaseElementType> for Import {}
impl Cast<dyn BaseElementTypeMut> for Import {}
impl Cast<dyn BaseElementWithMixedContentType> for Import {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Import {}
impl Cast<dyn BoundaryEventType> for Import {}
impl Cast<dyn BoundaryEventTypeMut> for Import {}
impl Cast<dyn BusinessRuleTaskType> for Import {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Import {}
impl Cast<dyn CallableElementType> for Import {}
impl Cast<dyn CallableElementTypeMut> for Import {}
impl Cast<dyn CallActivityType> for Import {}
impl Cast<dyn CallActivityTypeMut> for Import {}
impl Cast<dyn CallChoreographyType> for Import {}
impl Cast<dyn CallChoreographyTypeMut> for Import {}
impl Cast<dyn CallConversationType> for Import {}
impl Cast<dyn CallConversationTypeMut> for Import {}
impl Cast<dyn CancelEventDefinitionType> for Import {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Import {}
impl Cast<dyn CatchEventType> for Import {}
impl Cast<dyn CatchEventTypeMut> for Import {}
impl Cast<dyn CategoryType> for Import {}
impl Cast<dyn CategoryTypeMut> for Import {}
impl Cast<dyn CategoryValueType> for Import {}
impl Cast<dyn CategoryValueTypeMut> for Import {}
impl Cast<dyn ChoreographyType> for Import {}
impl Cast<dyn ChoreographyTypeMut> for Import {}
impl Cast<dyn ChoreographyActivityType> for Import {}
impl Cast<dyn ChoreographyActivityTypeMut> for Import {}
impl Cast<dyn ChoreographyTaskType> for Import {}
impl Cast<dyn ChoreographyTaskTypeMut> for Import {}
impl Cast<dyn CollaborationType> for Import {}
impl Cast<dyn CollaborationTypeMut> for Import {}
impl Cast<dyn CompensateEventDefinitionType> for Import {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Import {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Import {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Import {}
impl Cast<dyn ComplexGatewayType> for Import {}
impl Cast<dyn ComplexGatewayTypeMut> for Import {}
impl Cast<dyn ConditionalEventDefinitionType> for Import {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Import {}
impl Cast<dyn ConversationType> for Import {}
impl Cast<dyn ConversationTypeMut> for Import {}
impl Cast<dyn ConversationAssociationType> for Import {}
impl Cast<dyn ConversationAssociationTypeMut> for Import {}
impl Cast<dyn ConversationLinkType> for Import {}
impl Cast<dyn ConversationLinkTypeMut> for Import {}
impl Cast<dyn ConversationNodeType> for Import {}
impl Cast<dyn ConversationNodeTypeMut> for Import {}
impl Cast<dyn CorrelationKeyType> for Import {}
impl Cast<dyn CorrelationKeyTypeMut> for Import {}
impl Cast<dyn CorrelationPropertyType> for Import {}
impl Cast<dyn CorrelationPropertyTypeMut> for Import {}
impl Cast<dyn CorrelationPropertyBindingType> for Import {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Import {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Import {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Import {}
impl Cast<dyn CorrelationSubscriptionType> for Import {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Import {}
impl Cast<dyn DataAssociationType> for Import {}
impl Cast<dyn DataAssociationTypeMut> for Import {}
impl Cast<dyn DataInputType> for Import {}
impl Cast<dyn DataInputTypeMut> for Import {}
impl Cast<dyn DataInputAssociationType> for Import {}
impl Cast<dyn DataInputAssociationTypeMut> for Import {}
impl Cast<dyn DataObjectType> for Import {}
impl Cast<dyn DataObjectTypeMut> for Import {}
impl Cast<dyn DataObjectReferenceType> for Import {}
impl Cast<dyn DataObjectReferenceTypeMut> for Import {}
impl Cast<dyn DataOutputType> for Import {}
impl Cast<dyn DataOutputTypeMut> for Import {}
impl Cast<dyn DataOutputAssociationType> for Import {}
impl Cast<dyn DataOutputAssociationTypeMut> for Import {}
impl Cast<dyn DataStateType> for Import {}
impl Cast<dyn DataStateTypeMut> for Import {}
impl Cast<dyn DataStoreType> for Import {}
impl Cast<dyn DataStoreTypeMut> for Import {}
impl Cast<dyn DataStoreReferenceType> for Import {}
impl Cast<dyn DataStoreReferenceTypeMut> for Import {}
impl Cast<dyn DocumentationType> for Import {}
impl Cast<dyn DocumentationTypeMut> for Import {}
impl Cast<dyn EndEventType> for Import {}
impl Cast<dyn EndEventTypeMut> for Import {}
impl Cast<dyn EndPointType> for Import {}
impl Cast<dyn EndPointTypeMut> for Import {}
impl Cast<dyn ErrorType> for Import {}
impl Cast<dyn ErrorTypeMut> for Import {}
impl Cast<dyn ErrorEventDefinitionType> for Import {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Import {}
impl Cast<dyn EscalationType> for Import {}
impl Cast<dyn EscalationTypeMut> for Import {}
impl Cast<dyn EscalationEventDefinitionType> for Import {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Import {}
impl Cast<dyn EventType> for Import {}
impl Cast<dyn EventTypeMut> for Import {}
impl Cast<dyn EventBasedGatewayType> for Import {}
impl Cast<dyn EventBasedGatewayTypeMut> for Import {}
impl Cast<dyn EventDefinitionType> for Import {}
impl Cast<dyn EventDefinitionTypeMut> for Import {}
impl Cast<dyn ExclusiveGatewayType> for Import {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Import {}
impl Cast<dyn ExpressionType> for Import {}
impl Cast<dyn ExpressionTypeMut> for Import {}
impl Cast<dyn ExtensionType> for Import {}
impl Cast<dyn ExtensionTypeMut> for Import {}
impl Cast<dyn ExtensionElementsType> for Import {}
impl Cast<dyn ExtensionElementsTypeMut> for Import {}
impl Cast<dyn FlowElementType> for Import {}
impl Cast<dyn FlowElementTypeMut> for Import {}
impl Cast<dyn FlowNodeType> for Import {}
impl Cast<dyn FlowNodeTypeMut> for Import {}
impl Cast<dyn FormalExpressionType> for Import {}
impl Cast<dyn FormalExpressionTypeMut> for Import {}
impl Cast<dyn GatewayType> for Import {}
impl Cast<dyn GatewayTypeMut> for Import {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Import {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Import {}
impl Cast<dyn GlobalChoreographyTaskType> for Import {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Import {}
impl Cast<dyn GlobalConversationType> for Import {}
impl Cast<dyn GlobalConversationTypeMut> for Import {}
impl Cast<dyn GlobalManualTaskType> for Import {}
impl Cast<dyn GlobalManualTaskTypeMut> for Import {}
impl Cast<dyn GlobalScriptTaskType> for Import {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Import {}
impl Cast<dyn GlobalTaskType> for Import {}
impl Cast<dyn GlobalTaskTypeMut> for Import {}
impl Cast<dyn GlobalUserTaskType> for Import {}
impl Cast<dyn GlobalUserTaskTypeMut> for Import {}
impl Cast<dyn GroupType> for Import {}
impl Cast<dyn GroupTypeMut> for Import {}
impl Cast<dyn HumanPerformerType> for Import {}
impl Cast<dyn HumanPerformerTypeMut> for Import {}
impl Cast<dyn ImplicitThrowEventType> for Import {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Import {}
impl Cast<dyn InclusiveGatewayType> for Import {}
impl Cast<dyn InclusiveGatewayTypeMut> for Import {}
impl Cast<dyn InputSetType> for Import {}
impl Cast<dyn InputSetTypeMut> for Import {}
impl Cast<dyn InterfaceType> for Import {}
impl Cast<dyn InterfaceTypeMut> for Import {}
impl Cast<dyn IntermediateCatchEventType> for Import {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Import {}
impl Cast<dyn IntermediateThrowEventType> for Import {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Import {}
impl Cast<dyn InputOutputBindingType> for Import {}
impl Cast<dyn InputOutputBindingTypeMut> for Import {}
impl Cast<dyn InputOutputSpecificationType> for Import {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Import {}
impl Cast<dyn ItemDefinitionType> for Import {}
impl Cast<dyn ItemDefinitionTypeMut> for Import {}
impl Cast<dyn LaneType> for Import {}
impl Cast<dyn LaneTypeMut> for Import {}
impl Cast<dyn LaneSetType> for Import {}
impl Cast<dyn LaneSetTypeMut> for Import {}
impl Cast<dyn LinkEventDefinitionType> for Import {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Import {}
impl Cast<dyn LoopCharacteristicsType> for Import {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Import {}
impl Cast<dyn ManualTaskType> for Import {}
impl Cast<dyn ManualTaskTypeMut> for Import {}
impl Cast<dyn MessageType> for Import {}
impl Cast<dyn MessageTypeMut> for Import {}
impl Cast<dyn MessageEventDefinitionType> for Import {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Import {}
impl Cast<dyn MessageFlowType> for Import {}
impl Cast<dyn MessageFlowTypeMut> for Import {}
impl Cast<dyn MessageFlowAssociationType> for Import {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Import {}
impl Cast<dyn MonitoringType> for Import {}
impl Cast<dyn MonitoringTypeMut> for Import {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Import {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Import {}
impl Cast<dyn OperationType> for Import {}
impl Cast<dyn OperationTypeMut> for Import {}
impl Cast<dyn OutputSetType> for Import {}
impl Cast<dyn OutputSetTypeMut> for Import {}
impl Cast<dyn ParallelGatewayType> for Import {}
impl Cast<dyn ParallelGatewayTypeMut> for Import {}
impl Cast<dyn ParticipantType> for Import {}
impl Cast<dyn ParticipantTypeMut> for Import {}
impl Cast<dyn ParticipantAssociationType> for Import {}
impl Cast<dyn ParticipantAssociationTypeMut> for Import {}
impl Cast<dyn ParticipantMultiplicityType> for Import {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Import {}
impl Cast<dyn PartnerEntityType> for Import {}
impl Cast<dyn PartnerEntityTypeMut> for Import {}
impl Cast<dyn PartnerRoleType> for Import {}
impl Cast<dyn PartnerRoleTypeMut> for Import {}
impl Cast<dyn PerformerType> for Import {}
impl Cast<dyn PerformerTypeMut> for Import {}
impl Cast<dyn PotentialOwnerType> for Import {}
impl Cast<dyn PotentialOwnerTypeMut> for Import {}
impl Cast<dyn ProcessType> for Import {}
impl Cast<dyn ProcessTypeMut> for Import {}
impl Cast<dyn PropertyType> for Import {}
impl Cast<dyn PropertyTypeMut> for Import {}
impl Cast<dyn ReceiveTaskType> for Import {}
impl Cast<dyn ReceiveTaskTypeMut> for Import {}
impl Cast<dyn RelationshipType> for Import {}
impl Cast<dyn RelationshipTypeMut> for Import {}
impl Cast<dyn RenderingType> for Import {}
impl Cast<dyn RenderingTypeMut> for Import {}
impl Cast<dyn ResourceType> for Import {}
impl Cast<dyn ResourceTypeMut> for Import {}
impl Cast<dyn ResourceAssignmentExpressionType> for Import {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Import {}
impl Cast<dyn ResourceParameterType> for Import {}
impl Cast<dyn ResourceParameterTypeMut> for Import {}
impl Cast<dyn ResourceParameterBindingType> for Import {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Import {}
impl Cast<dyn ResourceRoleType> for Import {}
impl Cast<dyn ResourceRoleTypeMut> for Import {}
impl Cast<dyn RootElementType> for Import {}
impl Cast<dyn RootElementTypeMut> for Import {}
impl Cast<dyn ScriptTaskType> for Import {}
impl Cast<dyn ScriptTaskTypeMut> for Import {}
impl Cast<dyn ScriptType> for Import {}
impl Cast<dyn ScriptTypeMut> for Import {}
impl Cast<dyn SendTaskType> for Import {}
impl Cast<dyn SendTaskTypeMut> for Import {}
impl Cast<dyn SequenceFlowType> for Import {}
impl Cast<dyn SequenceFlowTypeMut> for Import {}
impl Cast<dyn ServiceTaskType> for Import {}
impl Cast<dyn ServiceTaskTypeMut> for Import {}
impl Cast<dyn SignalType> for Import {}
impl Cast<dyn SignalTypeMut> for Import {}
impl Cast<dyn SignalEventDefinitionType> for Import {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Import {}
impl Cast<dyn StandardLoopCharacteristicsType> for Import {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Import {}
impl Cast<dyn StartEventType> for Import {}
impl Cast<dyn StartEventTypeMut> for Import {}
impl Cast<dyn SubChoreographyType> for Import {}
impl Cast<dyn SubChoreographyTypeMut> for Import {}
impl Cast<dyn SubConversationType> for Import {}
impl Cast<dyn SubConversationTypeMut> for Import {}
impl Cast<dyn SubProcessType> for Import {}
impl Cast<dyn SubProcessTypeMut> for Import {}
impl Cast<dyn TaskType> for Import {}
impl Cast<dyn TaskTypeMut> for Import {}
impl Cast<dyn TerminateEventDefinitionType> for Import {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Import {}
impl Cast<dyn TextAnnotationType> for Import {}
impl Cast<dyn TextAnnotationTypeMut> for Import {}
impl Cast<dyn TextType> for Import {}
impl Cast<dyn TextTypeMut> for Import {}
impl Cast<dyn ThrowEventType> for Import {}
impl Cast<dyn ThrowEventTypeMut> for Import {}
impl Cast<dyn TimerEventDefinitionType> for Import {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Import {}
impl Cast<dyn TransactionType> for Import {}
impl Cast<dyn TransactionTypeMut> for Import {}
impl Cast<dyn UserTaskType> for Import {}
impl Cast<dyn UserTaskTypeMut> for Import {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:activity")]
#[serde(tag = "type")]
pub enum Activity {}
impl Activity {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for Activity {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for Activity {
    fn element(&self) -> Element {
        Element::Activity
    }
}
/// Access to `activity`
pub trait ActivityType: FlowNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `isForCompensation`
    fn is_for_compensation(&self) -> &Option<bool>;
    /// Get value of attribute `startQuantity`
    fn start_quantity(&self) -> &Option<Integer>;
    /// Get value of attribute `completionQuantity`
    fn completion_quantity(&self) -> &Option<Integer>;
    /// Get value of attribute `default`
    fn default(&self) -> &Option<String>;
    /// Get value of `ioSpecification` child
    fn io_specification(&self) -> &Option<InputOutputSpecification>;
    /// Get value of `property` child
    fn properties(&self) -> &Vec<Property>;
    /// Get value of `dataInputAssociation` child
    fn data_input_associations(&self) -> &Vec<DataInputAssociation>;
    /// Get value of `dataOutputAssociation` child
    fn data_output_associations(&self) -> &Vec<DataOutputAssociation>;
    /// Get value of `resourceRole` child
    fn resource_roles(&self) -> &Vec<ResourceRole>;
    /// Get value of `loopCharacteristics` child
    fn loop_characteristics(&self) -> &Option<LoopCharacteristics>;
}
dyn_clone::clone_trait_object!(ActivityType);
impl_downcast!(ActivityType);
/// Mutable access to `activity`
pub trait ActivityTypeMut:
    FlowNodeTypeMut + Downcast + Debug + Send + DynClone + ActivityType
{
    /// Set value of attribute `isForCompensation`
    fn set_is_for_compensation(&mut self, value: Option<bool>);
    /// Set value of attribute `startQuantity`
    fn set_start_quantity(&mut self, value: Option<Integer>);
    /// Set value of attribute `completionQuantity`
    fn set_completion_quantity(&mut self, value: Option<Integer>);
    /// Set value of attribute `default`
    fn set_default(&mut self, value: Option<String>);
    /// Get a mutable value of `ioSpecification` child
    fn io_specification_mut(&mut self) -> &mut Option<InputOutputSpecification>;
    /// Set value of `ioSpecification` child
    fn set_io_specification(&mut self, value: Option<InputOutputSpecification>);
    /// Get a mutable value of `property` child
    fn properties_mut(&mut self) -> &mut Vec<Property>;
    /// Set value of `property` child
    fn set_properties(&mut self, value: Vec<Property>);
    /// Get a mutable value of `dataInputAssociation` child
    fn data_input_associations_mut(&mut self) -> &mut Vec<DataInputAssociation>;
    /// Set value of `dataInputAssociation` child
    fn set_data_input_associations(&mut self, value: Vec<DataInputAssociation>);
    /// Get a mutable value of `dataOutputAssociation` child
    fn data_output_associations_mut(&mut self) -> &mut Vec<DataOutputAssociation>;
    /// Set value of `dataOutputAssociation` child
    fn set_data_output_associations(&mut self, value: Vec<DataOutputAssociation>);
    /// Get a mutable value of `resourceRole` child
    fn resource_roles_mut(&mut self) -> &mut Vec<ResourceRole>;
    /// Set value of `resourceRole` child
    fn set_resource_roles(&mut self, value: Vec<ResourceRole>);
    /// Get a mutable value of `loopCharacteristics` child
    fn loop_characteristics_mut(&mut self) -> &mut Option<LoopCharacteristics>;
    /// Set value of `loopCharacteristics` child
    fn set_loop_characteristics(&mut self, value: Option<LoopCharacteristics>);
}
dyn_clone::clone_trait_object!(ActivityTypeMut);
impl_downcast!(ActivityTypeMut);
impl Cast<dyn DefinitionsType> for Activity {}
impl Cast<dyn DefinitionsTypeMut> for Activity {}
impl Cast<dyn ImportType> for Activity {}
impl Cast<dyn ImportTypeMut> for Activity {}
impl Cast<dyn ActivityType> for Activity {}
impl Cast<dyn ActivityTypeMut> for Activity {}
impl Cast<dyn AdHocSubProcessType> for Activity {}
impl Cast<dyn AdHocSubProcessTypeMut> for Activity {}
impl Cast<dyn ArtifactType> for Activity {}
impl Cast<dyn ArtifactTypeMut> for Activity {}
impl Cast<dyn AssignmentType> for Activity {}
impl Cast<dyn AssignmentTypeMut> for Activity {}
impl Cast<dyn AssociationType> for Activity {}
impl Cast<dyn AssociationTypeMut> for Activity {}
impl Cast<dyn AuditingType> for Activity {}
impl Cast<dyn AuditingTypeMut> for Activity {}
impl Cast<dyn BaseElementType> for Activity {}
impl Cast<dyn BaseElementTypeMut> for Activity {}
impl Cast<dyn BaseElementWithMixedContentType> for Activity {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Activity {}
impl Cast<dyn BoundaryEventType> for Activity {}
impl Cast<dyn BoundaryEventTypeMut> for Activity {}
impl Cast<dyn BusinessRuleTaskType> for Activity {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Activity {}
impl Cast<dyn CallableElementType> for Activity {}
impl Cast<dyn CallableElementTypeMut> for Activity {}
impl Cast<dyn CallActivityType> for Activity {}
impl Cast<dyn CallActivityTypeMut> for Activity {}
impl Cast<dyn CallChoreographyType> for Activity {}
impl Cast<dyn CallChoreographyTypeMut> for Activity {}
impl Cast<dyn CallConversationType> for Activity {}
impl Cast<dyn CallConversationTypeMut> for Activity {}
impl Cast<dyn CancelEventDefinitionType> for Activity {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Activity {}
impl Cast<dyn CatchEventType> for Activity {}
impl Cast<dyn CatchEventTypeMut> for Activity {}
impl Cast<dyn CategoryType> for Activity {}
impl Cast<dyn CategoryTypeMut> for Activity {}
impl Cast<dyn CategoryValueType> for Activity {}
impl Cast<dyn CategoryValueTypeMut> for Activity {}
impl Cast<dyn ChoreographyType> for Activity {}
impl Cast<dyn ChoreographyTypeMut> for Activity {}
impl Cast<dyn ChoreographyActivityType> for Activity {}
impl Cast<dyn ChoreographyActivityTypeMut> for Activity {}
impl Cast<dyn ChoreographyTaskType> for Activity {}
impl Cast<dyn ChoreographyTaskTypeMut> for Activity {}
impl Cast<dyn CollaborationType> for Activity {}
impl Cast<dyn CollaborationTypeMut> for Activity {}
impl Cast<dyn CompensateEventDefinitionType> for Activity {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Activity {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Activity {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Activity {}
impl Cast<dyn ComplexGatewayType> for Activity {}
impl Cast<dyn ComplexGatewayTypeMut> for Activity {}
impl Cast<dyn ConditionalEventDefinitionType> for Activity {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Activity {}
impl Cast<dyn ConversationType> for Activity {}
impl Cast<dyn ConversationTypeMut> for Activity {}
impl Cast<dyn ConversationAssociationType> for Activity {}
impl Cast<dyn ConversationAssociationTypeMut> for Activity {}
impl Cast<dyn ConversationLinkType> for Activity {}
impl Cast<dyn ConversationLinkTypeMut> for Activity {}
impl Cast<dyn ConversationNodeType> for Activity {}
impl Cast<dyn ConversationNodeTypeMut> for Activity {}
impl Cast<dyn CorrelationKeyType> for Activity {}
impl Cast<dyn CorrelationKeyTypeMut> for Activity {}
impl Cast<dyn CorrelationPropertyType> for Activity {}
impl Cast<dyn CorrelationPropertyTypeMut> for Activity {}
impl Cast<dyn CorrelationPropertyBindingType> for Activity {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Activity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Activity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Activity {}
impl Cast<dyn CorrelationSubscriptionType> for Activity {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Activity {}
impl Cast<dyn DataAssociationType> for Activity {}
impl Cast<dyn DataAssociationTypeMut> for Activity {}
impl Cast<dyn DataInputType> for Activity {}
impl Cast<dyn DataInputTypeMut> for Activity {}
impl Cast<dyn DataInputAssociationType> for Activity {}
impl Cast<dyn DataInputAssociationTypeMut> for Activity {}
impl Cast<dyn DataObjectType> for Activity {}
impl Cast<dyn DataObjectTypeMut> for Activity {}
impl Cast<dyn DataObjectReferenceType> for Activity {}
impl Cast<dyn DataObjectReferenceTypeMut> for Activity {}
impl Cast<dyn DataOutputType> for Activity {}
impl Cast<dyn DataOutputTypeMut> for Activity {}
impl Cast<dyn DataOutputAssociationType> for Activity {}
impl Cast<dyn DataOutputAssociationTypeMut> for Activity {}
impl Cast<dyn DataStateType> for Activity {}
impl Cast<dyn DataStateTypeMut> for Activity {}
impl Cast<dyn DataStoreType> for Activity {}
impl Cast<dyn DataStoreTypeMut> for Activity {}
impl Cast<dyn DataStoreReferenceType> for Activity {}
impl Cast<dyn DataStoreReferenceTypeMut> for Activity {}
impl Cast<dyn DocumentationType> for Activity {}
impl Cast<dyn DocumentationTypeMut> for Activity {}
impl Cast<dyn EndEventType> for Activity {}
impl Cast<dyn EndEventTypeMut> for Activity {}
impl Cast<dyn EndPointType> for Activity {}
impl Cast<dyn EndPointTypeMut> for Activity {}
impl Cast<dyn ErrorType> for Activity {}
impl Cast<dyn ErrorTypeMut> for Activity {}
impl Cast<dyn ErrorEventDefinitionType> for Activity {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Activity {}
impl Cast<dyn EscalationType> for Activity {}
impl Cast<dyn EscalationTypeMut> for Activity {}
impl Cast<dyn EscalationEventDefinitionType> for Activity {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Activity {}
impl Cast<dyn EventType> for Activity {}
impl Cast<dyn EventTypeMut> for Activity {}
impl Cast<dyn EventBasedGatewayType> for Activity {}
impl Cast<dyn EventBasedGatewayTypeMut> for Activity {}
impl Cast<dyn EventDefinitionType> for Activity {}
impl Cast<dyn EventDefinitionTypeMut> for Activity {}
impl Cast<dyn ExclusiveGatewayType> for Activity {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Activity {}
impl Cast<dyn ExpressionType> for Activity {}
impl Cast<dyn ExpressionTypeMut> for Activity {}
impl Cast<dyn ExtensionType> for Activity {}
impl Cast<dyn ExtensionTypeMut> for Activity {}
impl Cast<dyn ExtensionElementsType> for Activity {}
impl Cast<dyn ExtensionElementsTypeMut> for Activity {}
impl Cast<dyn FlowElementType> for Activity {}
impl Cast<dyn FlowElementTypeMut> for Activity {}
impl Cast<dyn FlowNodeType> for Activity {}
impl Cast<dyn FlowNodeTypeMut> for Activity {}
impl Cast<dyn FormalExpressionType> for Activity {}
impl Cast<dyn FormalExpressionTypeMut> for Activity {}
impl Cast<dyn GatewayType> for Activity {}
impl Cast<dyn GatewayTypeMut> for Activity {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Activity {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Activity {}
impl Cast<dyn GlobalChoreographyTaskType> for Activity {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Activity {}
impl Cast<dyn GlobalConversationType> for Activity {}
impl Cast<dyn GlobalConversationTypeMut> for Activity {}
impl Cast<dyn GlobalManualTaskType> for Activity {}
impl Cast<dyn GlobalManualTaskTypeMut> for Activity {}
impl Cast<dyn GlobalScriptTaskType> for Activity {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Activity {}
impl Cast<dyn GlobalTaskType> for Activity {}
impl Cast<dyn GlobalTaskTypeMut> for Activity {}
impl Cast<dyn GlobalUserTaskType> for Activity {}
impl Cast<dyn GlobalUserTaskTypeMut> for Activity {}
impl Cast<dyn GroupType> for Activity {}
impl Cast<dyn GroupTypeMut> for Activity {}
impl Cast<dyn HumanPerformerType> for Activity {}
impl Cast<dyn HumanPerformerTypeMut> for Activity {}
impl Cast<dyn ImplicitThrowEventType> for Activity {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Activity {}
impl Cast<dyn InclusiveGatewayType> for Activity {}
impl Cast<dyn InclusiveGatewayTypeMut> for Activity {}
impl Cast<dyn InputSetType> for Activity {}
impl Cast<dyn InputSetTypeMut> for Activity {}
impl Cast<dyn InterfaceType> for Activity {}
impl Cast<dyn InterfaceTypeMut> for Activity {}
impl Cast<dyn IntermediateCatchEventType> for Activity {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Activity {}
impl Cast<dyn IntermediateThrowEventType> for Activity {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Activity {}
impl Cast<dyn InputOutputBindingType> for Activity {}
impl Cast<dyn InputOutputBindingTypeMut> for Activity {}
impl Cast<dyn InputOutputSpecificationType> for Activity {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Activity {}
impl Cast<dyn ItemDefinitionType> for Activity {}
impl Cast<dyn ItemDefinitionTypeMut> for Activity {}
impl Cast<dyn LaneType> for Activity {}
impl Cast<dyn LaneTypeMut> for Activity {}
impl Cast<dyn LaneSetType> for Activity {}
impl Cast<dyn LaneSetTypeMut> for Activity {}
impl Cast<dyn LinkEventDefinitionType> for Activity {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Activity {}
impl Cast<dyn LoopCharacteristicsType> for Activity {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Activity {}
impl Cast<dyn ManualTaskType> for Activity {}
impl Cast<dyn ManualTaskTypeMut> for Activity {}
impl Cast<dyn MessageType> for Activity {}
impl Cast<dyn MessageTypeMut> for Activity {}
impl Cast<dyn MessageEventDefinitionType> for Activity {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Activity {}
impl Cast<dyn MessageFlowType> for Activity {}
impl Cast<dyn MessageFlowTypeMut> for Activity {}
impl Cast<dyn MessageFlowAssociationType> for Activity {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Activity {}
impl Cast<dyn MonitoringType> for Activity {}
impl Cast<dyn MonitoringTypeMut> for Activity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Activity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Activity {}
impl Cast<dyn OperationType> for Activity {}
impl Cast<dyn OperationTypeMut> for Activity {}
impl Cast<dyn OutputSetType> for Activity {}
impl Cast<dyn OutputSetTypeMut> for Activity {}
impl Cast<dyn ParallelGatewayType> for Activity {}
impl Cast<dyn ParallelGatewayTypeMut> for Activity {}
impl Cast<dyn ParticipantType> for Activity {}
impl Cast<dyn ParticipantTypeMut> for Activity {}
impl Cast<dyn ParticipantAssociationType> for Activity {}
impl Cast<dyn ParticipantAssociationTypeMut> for Activity {}
impl Cast<dyn ParticipantMultiplicityType> for Activity {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Activity {}
impl Cast<dyn PartnerEntityType> for Activity {}
impl Cast<dyn PartnerEntityTypeMut> for Activity {}
impl Cast<dyn PartnerRoleType> for Activity {}
impl Cast<dyn PartnerRoleTypeMut> for Activity {}
impl Cast<dyn PerformerType> for Activity {}
impl Cast<dyn PerformerTypeMut> for Activity {}
impl Cast<dyn PotentialOwnerType> for Activity {}
impl Cast<dyn PotentialOwnerTypeMut> for Activity {}
impl Cast<dyn ProcessType> for Activity {}
impl Cast<dyn ProcessTypeMut> for Activity {}
impl Cast<dyn PropertyType> for Activity {}
impl Cast<dyn PropertyTypeMut> for Activity {}
impl Cast<dyn ReceiveTaskType> for Activity {}
impl Cast<dyn ReceiveTaskTypeMut> for Activity {}
impl Cast<dyn RelationshipType> for Activity {}
impl Cast<dyn RelationshipTypeMut> for Activity {}
impl Cast<dyn RenderingType> for Activity {}
impl Cast<dyn RenderingTypeMut> for Activity {}
impl Cast<dyn ResourceType> for Activity {}
impl Cast<dyn ResourceTypeMut> for Activity {}
impl Cast<dyn ResourceAssignmentExpressionType> for Activity {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Activity {}
impl Cast<dyn ResourceParameterType> for Activity {}
impl Cast<dyn ResourceParameterTypeMut> for Activity {}
impl Cast<dyn ResourceParameterBindingType> for Activity {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Activity {}
impl Cast<dyn ResourceRoleType> for Activity {}
impl Cast<dyn ResourceRoleTypeMut> for Activity {}
impl Cast<dyn RootElementType> for Activity {}
impl Cast<dyn RootElementTypeMut> for Activity {}
impl Cast<dyn ScriptTaskType> for Activity {}
impl Cast<dyn ScriptTaskTypeMut> for Activity {}
impl Cast<dyn ScriptType> for Activity {}
impl Cast<dyn ScriptTypeMut> for Activity {}
impl Cast<dyn SendTaskType> for Activity {}
impl Cast<dyn SendTaskTypeMut> for Activity {}
impl Cast<dyn SequenceFlowType> for Activity {}
impl Cast<dyn SequenceFlowTypeMut> for Activity {}
impl Cast<dyn ServiceTaskType> for Activity {}
impl Cast<dyn ServiceTaskTypeMut> for Activity {}
impl Cast<dyn SignalType> for Activity {}
impl Cast<dyn SignalTypeMut> for Activity {}
impl Cast<dyn SignalEventDefinitionType> for Activity {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Activity {}
impl Cast<dyn StandardLoopCharacteristicsType> for Activity {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Activity {}
impl Cast<dyn StartEventType> for Activity {}
impl Cast<dyn StartEventTypeMut> for Activity {}
impl Cast<dyn SubChoreographyType> for Activity {}
impl Cast<dyn SubChoreographyTypeMut> for Activity {}
impl Cast<dyn SubConversationType> for Activity {}
impl Cast<dyn SubConversationTypeMut> for Activity {}
impl Cast<dyn SubProcessType> for Activity {}
impl Cast<dyn SubProcessTypeMut> for Activity {}
impl Cast<dyn TaskType> for Activity {}
impl Cast<dyn TaskTypeMut> for Activity {}
impl Cast<dyn TerminateEventDefinitionType> for Activity {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Activity {}
impl Cast<dyn TextAnnotationType> for Activity {}
impl Cast<dyn TextAnnotationTypeMut> for Activity {}
impl Cast<dyn TextType> for Activity {}
impl Cast<dyn TextTypeMut> for Activity {}
impl Cast<dyn ThrowEventType> for Activity {}
impl Cast<dyn ThrowEventTypeMut> for Activity {}
impl Cast<dyn TimerEventDefinitionType> for Activity {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Activity {}
impl Cast<dyn TransactionType> for Activity {}
impl Cast<dyn TransactionTypeMut> for Activity {}
impl Cast<dyn UserTaskType> for Activity {}
impl Cast<dyn UserTaskTypeMut> for Activity {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:adHocSubProcess")]
pub struct AdHocSubProcess {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "triggeredByEvent")]
    #[tia("SubProcessType",rg*="triggered_byevent","SubProcessTypeMut",s)]
    pub triggered_byevent: Option<bool>,
    #[xml(child = "bpmn:laneSet")]
    #[tia("SubProcessType",rg*="lane_sets","SubProcessTypeMut",s,rmg*="lane_sets_mut")]
    pub lane_sets: Vec<LaneSet>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("SubProcessType",rg*="flow_elements","SubProcessTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("SubProcessType",rg*="artifacts","SubProcessTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(attr = "cancelRemainingInstances")]
    #[tia("AdHocSubProcessType",rg*="cancel_remaining_instances","AdHocSubProcessTypeMut",s)]
    pub cancel_remaining_instances: Option<bool>,
    #[xml(attr = "ordering")]
    #[tia("AdHocSubProcessType",rg*="ordering","AdHocSubProcessTypeMut",s)]
    pub ordering: Option<String>,
    #[xml(child = "bpmn:completionCondition")]
    #[tia("AdHocSubProcessType",rg*="completion_condition","AdHocSubProcessTypeMut",s,rmg*="completion_condition_mut")]
    pub completion_condition: Option<AdHocSubProcessCompletionCondition>,
}
impl DocumentElement for AdHocSubProcess {
    fn element(&self) -> Element {
        Element::AdHocSubProcess
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for AdHocSubProcess {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.completion_condition.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.completion_condition.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `adHocSubProcess`
pub trait AdHocSubProcessType: SubProcessType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `cancelRemainingInstances`
    fn cancel_remaining_instances(&self) -> &Option<bool>;
    /// Get value of attribute `ordering`
    fn ordering(&self) -> &Option<String>;
    /// Get value of `completionCondition` child
    fn completion_condition(&self) -> &Option<AdHocSubProcessCompletionCondition>;
}
dyn_clone::clone_trait_object!(AdHocSubProcessType);
impl_downcast!(AdHocSubProcessType);
/// Mutable access to `adHocSubProcess`
pub trait AdHocSubProcessTypeMut:
    SubProcessTypeMut + Downcast + Debug + Send + DynClone + AdHocSubProcessType
{
    /// Set value of attribute `cancelRemainingInstances`
    fn set_cancel_remaining_instances(&mut self, value: Option<bool>);
    /// Set value of attribute `ordering`
    fn set_ordering(&mut self, value: Option<String>);
    /// Get a mutable value of `completionCondition` child
    fn completion_condition_mut(&mut self) -> &mut Option<AdHocSubProcessCompletionCondition>;
    /// Set value of `completionCondition` child
    fn set_completion_condition(&mut self, value: Option<AdHocSubProcessCompletionCondition>);
}
dyn_clone::clone_trait_object!(AdHocSubProcessTypeMut);
impl_downcast!(AdHocSubProcessTypeMut);
impl Cast<dyn DefinitionsType> for AdHocSubProcess {}
impl Cast<dyn DefinitionsTypeMut> for AdHocSubProcess {}
impl Cast<dyn ImportType> for AdHocSubProcess {}
impl Cast<dyn ImportTypeMut> for AdHocSubProcess {}
impl Cast<dyn ActivityType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ArtifactType> for AdHocSubProcess {}
impl Cast<dyn ArtifactTypeMut> for AdHocSubProcess {}
impl Cast<dyn AssignmentType> for AdHocSubProcess {}
impl Cast<dyn AssignmentTypeMut> for AdHocSubProcess {}
impl Cast<dyn AssociationType> for AdHocSubProcess {}
impl Cast<dyn AssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn AuditingType> for AdHocSubProcess {}
impl Cast<dyn AuditingTypeMut> for AdHocSubProcess {}
impl Cast<dyn BaseElementType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for AdHocSubProcess {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for AdHocSubProcess {}
impl Cast<dyn BoundaryEventType> for AdHocSubProcess {}
impl Cast<dyn BoundaryEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn BusinessRuleTaskType> for AdHocSubProcess {}
impl Cast<dyn BusinessRuleTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn CallableElementType> for AdHocSubProcess {}
impl Cast<dyn CallableElementTypeMut> for AdHocSubProcess {}
impl Cast<dyn CallActivityType> for AdHocSubProcess {}
impl Cast<dyn CallActivityTypeMut> for AdHocSubProcess {}
impl Cast<dyn CallChoreographyType> for AdHocSubProcess {}
impl Cast<dyn CallChoreographyTypeMut> for AdHocSubProcess {}
impl Cast<dyn CallConversationType> for AdHocSubProcess {}
impl Cast<dyn CallConversationTypeMut> for AdHocSubProcess {}
impl Cast<dyn CancelEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn CancelEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn CatchEventType> for AdHocSubProcess {}
impl Cast<dyn CatchEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn CategoryType> for AdHocSubProcess {}
impl Cast<dyn CategoryTypeMut> for AdHocSubProcess {}
impl Cast<dyn CategoryValueType> for AdHocSubProcess {}
impl Cast<dyn CategoryValueTypeMut> for AdHocSubProcess {}
impl Cast<dyn ChoreographyType> for AdHocSubProcess {}
impl Cast<dyn ChoreographyTypeMut> for AdHocSubProcess {}
impl Cast<dyn ChoreographyActivityType> for AdHocSubProcess {}
impl Cast<dyn ChoreographyActivityTypeMut> for AdHocSubProcess {}
impl Cast<dyn ChoreographyTaskType> for AdHocSubProcess {}
impl Cast<dyn ChoreographyTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn CollaborationType> for AdHocSubProcess {}
impl Cast<dyn CollaborationTypeMut> for AdHocSubProcess {}
impl Cast<dyn CompensateEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ComplexBehaviorDefinitionType> for AdHocSubProcess {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ComplexGatewayType> for AdHocSubProcess {}
impl Cast<dyn ComplexGatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn ConditionalEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ConversationType> for AdHocSubProcess {}
impl Cast<dyn ConversationTypeMut> for AdHocSubProcess {}
impl Cast<dyn ConversationAssociationType> for AdHocSubProcess {}
impl Cast<dyn ConversationAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn ConversationLinkType> for AdHocSubProcess {}
impl Cast<dyn ConversationLinkTypeMut> for AdHocSubProcess {}
impl Cast<dyn ConversationNodeType> for AdHocSubProcess {}
impl Cast<dyn ConversationNodeTypeMut> for AdHocSubProcess {}
impl Cast<dyn CorrelationKeyType> for AdHocSubProcess {}
impl Cast<dyn CorrelationKeyTypeMut> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyType> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyTypeMut> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyBindingType> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for AdHocSubProcess {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for AdHocSubProcess {}
impl Cast<dyn CorrelationSubscriptionType> for AdHocSubProcess {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataAssociationType> for AdHocSubProcess {}
impl Cast<dyn DataAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataInputType> for AdHocSubProcess {}
impl Cast<dyn DataInputTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataInputAssociationType> for AdHocSubProcess {}
impl Cast<dyn DataInputAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataObjectType> for AdHocSubProcess {}
impl Cast<dyn DataObjectTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataObjectReferenceType> for AdHocSubProcess {}
impl Cast<dyn DataObjectReferenceTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataOutputType> for AdHocSubProcess {}
impl Cast<dyn DataOutputTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataOutputAssociationType> for AdHocSubProcess {}
impl Cast<dyn DataOutputAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataStateType> for AdHocSubProcess {}
impl Cast<dyn DataStateTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataStoreType> for AdHocSubProcess {}
impl Cast<dyn DataStoreTypeMut> for AdHocSubProcess {}
impl Cast<dyn DataStoreReferenceType> for AdHocSubProcess {}
impl Cast<dyn DataStoreReferenceTypeMut> for AdHocSubProcess {}
impl Cast<dyn DocumentationType> for AdHocSubProcess {}
impl Cast<dyn DocumentationTypeMut> for AdHocSubProcess {}
impl Cast<dyn EndEventType> for AdHocSubProcess {}
impl Cast<dyn EndEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn EndPointType> for AdHocSubProcess {}
impl Cast<dyn EndPointTypeMut> for AdHocSubProcess {}
impl Cast<dyn ErrorType> for AdHocSubProcess {}
impl Cast<dyn ErrorTypeMut> for AdHocSubProcess {}
impl Cast<dyn ErrorEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn EscalationType> for AdHocSubProcess {}
impl Cast<dyn EscalationTypeMut> for AdHocSubProcess {}
impl Cast<dyn EscalationEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn EventType> for AdHocSubProcess {}
impl Cast<dyn EventTypeMut> for AdHocSubProcess {}
impl Cast<dyn EventBasedGatewayType> for AdHocSubProcess {}
impl Cast<dyn EventBasedGatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn EventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn EventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ExclusiveGatewayType> for AdHocSubProcess {}
impl Cast<dyn ExclusiveGatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn ExpressionType> for AdHocSubProcess {}
impl Cast<dyn ExpressionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ExtensionType> for AdHocSubProcess {}
impl Cast<dyn ExtensionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ExtensionElementsType> for AdHocSubProcess {}
impl Cast<dyn ExtensionElementsTypeMut> for AdHocSubProcess {}
impl Cast<dyn FlowElementType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for AdHocSubProcess {}
impl Cast<dyn FormalExpressionTypeMut> for AdHocSubProcess {}
impl Cast<dyn GatewayType> for AdHocSubProcess {}
impl Cast<dyn GatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalBusinessRuleTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalChoreographyTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalConversationType> for AdHocSubProcess {}
impl Cast<dyn GlobalConversationTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalManualTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalManualTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalScriptTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalScriptTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GlobalUserTaskType> for AdHocSubProcess {}
impl Cast<dyn GlobalUserTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn GroupType> for AdHocSubProcess {}
impl Cast<dyn GroupTypeMut> for AdHocSubProcess {}
impl Cast<dyn HumanPerformerType> for AdHocSubProcess {}
impl Cast<dyn HumanPerformerTypeMut> for AdHocSubProcess {}
impl Cast<dyn ImplicitThrowEventType> for AdHocSubProcess {}
impl Cast<dyn ImplicitThrowEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn InclusiveGatewayType> for AdHocSubProcess {}
impl Cast<dyn InclusiveGatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn InputSetType> for AdHocSubProcess {}
impl Cast<dyn InputSetTypeMut> for AdHocSubProcess {}
impl Cast<dyn InterfaceType> for AdHocSubProcess {}
impl Cast<dyn InterfaceTypeMut> for AdHocSubProcess {}
impl Cast<dyn IntermediateCatchEventType> for AdHocSubProcess {}
impl Cast<dyn IntermediateCatchEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn IntermediateThrowEventType> for AdHocSubProcess {}
impl Cast<dyn IntermediateThrowEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn InputOutputBindingType> for AdHocSubProcess {}
impl Cast<dyn InputOutputBindingTypeMut> for AdHocSubProcess {}
impl Cast<dyn InputOutputSpecificationType> for AdHocSubProcess {}
impl Cast<dyn InputOutputSpecificationTypeMut> for AdHocSubProcess {}
impl Cast<dyn ItemDefinitionType> for AdHocSubProcess {}
impl Cast<dyn ItemDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn LaneType> for AdHocSubProcess {}
impl Cast<dyn LaneTypeMut> for AdHocSubProcess {}
impl Cast<dyn LaneSetType> for AdHocSubProcess {}
impl Cast<dyn LaneSetTypeMut> for AdHocSubProcess {}
impl Cast<dyn LinkEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn LinkEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn LoopCharacteristicsType> for AdHocSubProcess {}
impl Cast<dyn LoopCharacteristicsTypeMut> for AdHocSubProcess {}
impl Cast<dyn ManualTaskType> for AdHocSubProcess {}
impl Cast<dyn ManualTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn MessageType> for AdHocSubProcess {}
impl Cast<dyn MessageTypeMut> for AdHocSubProcess {}
impl Cast<dyn MessageEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn MessageEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn MessageFlowType> for AdHocSubProcess {}
impl Cast<dyn MessageFlowTypeMut> for AdHocSubProcess {}
impl Cast<dyn MessageFlowAssociationType> for AdHocSubProcess {}
impl Cast<dyn MessageFlowAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn MonitoringType> for AdHocSubProcess {}
impl Cast<dyn MonitoringTypeMut> for AdHocSubProcess {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for AdHocSubProcess {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for AdHocSubProcess {}
impl Cast<dyn OperationType> for AdHocSubProcess {}
impl Cast<dyn OperationTypeMut> for AdHocSubProcess {}
impl Cast<dyn OutputSetType> for AdHocSubProcess {}
impl Cast<dyn OutputSetTypeMut> for AdHocSubProcess {}
impl Cast<dyn ParallelGatewayType> for AdHocSubProcess {}
impl Cast<dyn ParallelGatewayTypeMut> for AdHocSubProcess {}
impl Cast<dyn ParticipantType> for AdHocSubProcess {}
impl Cast<dyn ParticipantTypeMut> for AdHocSubProcess {}
impl Cast<dyn ParticipantAssociationType> for AdHocSubProcess {}
impl Cast<dyn ParticipantAssociationTypeMut> for AdHocSubProcess {}
impl Cast<dyn ParticipantMultiplicityType> for AdHocSubProcess {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for AdHocSubProcess {}
impl Cast<dyn PartnerEntityType> for AdHocSubProcess {}
impl Cast<dyn PartnerEntityTypeMut> for AdHocSubProcess {}
impl Cast<dyn PartnerRoleType> for AdHocSubProcess {}
impl Cast<dyn PartnerRoleTypeMut> for AdHocSubProcess {}
impl Cast<dyn PerformerType> for AdHocSubProcess {}
impl Cast<dyn PerformerTypeMut> for AdHocSubProcess {}
impl Cast<dyn PotentialOwnerType> for AdHocSubProcess {}
impl Cast<dyn PotentialOwnerTypeMut> for AdHocSubProcess {}
impl Cast<dyn ProcessType> for AdHocSubProcess {}
impl Cast<dyn ProcessTypeMut> for AdHocSubProcess {}
impl Cast<dyn PropertyType> for AdHocSubProcess {}
impl Cast<dyn PropertyTypeMut> for AdHocSubProcess {}
impl Cast<dyn ReceiveTaskType> for AdHocSubProcess {}
impl Cast<dyn ReceiveTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn RelationshipType> for AdHocSubProcess {}
impl Cast<dyn RelationshipTypeMut> for AdHocSubProcess {}
impl Cast<dyn RenderingType> for AdHocSubProcess {}
impl Cast<dyn RenderingTypeMut> for AdHocSubProcess {}
impl Cast<dyn ResourceType> for AdHocSubProcess {}
impl Cast<dyn ResourceTypeMut> for AdHocSubProcess {}
impl Cast<dyn ResourceAssignmentExpressionType> for AdHocSubProcess {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for AdHocSubProcess {}
impl Cast<dyn ResourceParameterType> for AdHocSubProcess {}
impl Cast<dyn ResourceParameterTypeMut> for AdHocSubProcess {}
impl Cast<dyn ResourceParameterBindingType> for AdHocSubProcess {}
impl Cast<dyn ResourceParameterBindingTypeMut> for AdHocSubProcess {}
impl Cast<dyn ResourceRoleType> for AdHocSubProcess {}
impl Cast<dyn ResourceRoleTypeMut> for AdHocSubProcess {}
impl Cast<dyn RootElementType> for AdHocSubProcess {}
impl Cast<dyn RootElementTypeMut> for AdHocSubProcess {}
impl Cast<dyn ScriptTaskType> for AdHocSubProcess {}
impl Cast<dyn ScriptTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn ScriptType> for AdHocSubProcess {}
impl Cast<dyn ScriptTypeMut> for AdHocSubProcess {}
impl Cast<dyn SendTaskType> for AdHocSubProcess {}
impl Cast<dyn SendTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn SequenceFlowType> for AdHocSubProcess {}
impl Cast<dyn SequenceFlowTypeMut> for AdHocSubProcess {}
impl Cast<dyn ServiceTaskType> for AdHocSubProcess {}
impl Cast<dyn ServiceTaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn SignalType> for AdHocSubProcess {}
impl Cast<dyn SignalTypeMut> for AdHocSubProcess {}
impl Cast<dyn SignalEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn SignalEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn StandardLoopCharacteristicsType> for AdHocSubProcess {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for AdHocSubProcess {}
impl Cast<dyn StartEventType> for AdHocSubProcess {}
impl Cast<dyn StartEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn SubChoreographyType> for AdHocSubProcess {}
impl Cast<dyn SubChoreographyTypeMut> for AdHocSubProcess {}
impl Cast<dyn SubConversationType> for AdHocSubProcess {}
impl Cast<dyn SubConversationTypeMut> for AdHocSubProcess {}
impl Cast<dyn SubProcessType> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubProcessTypeMut> for AdHocSubProcess {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskType> for AdHocSubProcess {}
impl Cast<dyn TaskTypeMut> for AdHocSubProcess {}
impl Cast<dyn TerminateEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn TextAnnotationType> for AdHocSubProcess {}
impl Cast<dyn TextAnnotationTypeMut> for AdHocSubProcess {}
impl Cast<dyn TextType> for AdHocSubProcess {}
impl Cast<dyn TextTypeMut> for AdHocSubProcess {}
impl Cast<dyn ThrowEventType> for AdHocSubProcess {}
impl Cast<dyn ThrowEventTypeMut> for AdHocSubProcess {}
impl Cast<dyn TimerEventDefinitionType> for AdHocSubProcess {}
impl Cast<dyn TimerEventDefinitionTypeMut> for AdHocSubProcess {}
impl Cast<dyn TransactionType> for AdHocSubProcess {}
impl Cast<dyn TransactionTypeMut> for AdHocSubProcess {}
impl Cast<dyn UserTaskType> for AdHocSubProcess {}
impl Cast<dyn UserTaskTypeMut> for AdHocSubProcess {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:artifact")]
#[serde(tag = "type")]
pub enum Artifact {
    #[xml(tag = "bpmn:association")]
    Association(Association),
    #[xml(tag = "bpmn:group")]
    Group(Group),
    #[xml(tag = "bpmn:textAnnotation")]
    TextAnnotation(TextAnnotation),
}
impl Artifact {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            Artifact::Association(e) => Box::new(e) as Box<dyn DocumentElement>,
            Artifact::Group(e) => Box::new(e) as Box<dyn DocumentElement>,
            Artifact::TextAnnotation(e) => Box::new(e) as Box<dyn DocumentElement>,
        }
    }
}
impl DocumentElementContainer for Artifact {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            Artifact::Association(e) => e.find_by_id_mut(id),
            Artifact::Group(e) => e.find_by_id_mut(id),
            Artifact::TextAnnotation(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            Artifact::Association(e) => e.find_by_id(id),
            Artifact::Group(e) => e.find_by_id(id),
            Artifact::TextAnnotation(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for Artifact {
    fn element(&self) -> Element {
        Element::Artifact
    }
}
/// Access to `artifact`
pub trait ArtifactType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ArtifactType);
impl_downcast!(ArtifactType);
/// Mutable access to `artifact`
pub trait ArtifactTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ArtifactType
{
}
dyn_clone::clone_trait_object!(ArtifactTypeMut);
impl_downcast!(ArtifactTypeMut);
impl Cast<dyn DefinitionsType> for Artifact {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DefinitionsType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DefinitionsType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for Artifact {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImportType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ImportType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImportType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ImportType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImportTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ImportTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for Artifact {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ActivityType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ActivityType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ActivityType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ActivityType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for Artifact {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            Artifact::Group(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactType> for Artifact {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ArtifactType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ArtifactType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for Artifact {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssignmentType>::cast(e),
            Artifact::Group(e) => Cast::<dyn AssignmentType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn AssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for Artifact {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AuditingType>::cast(e),
            Artifact::Group(e) => Cast::<dyn AuditingType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AuditingType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AuditingType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for Artifact {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementType>::cast(e),
            Artifact::Group(e) => Cast::<dyn BaseElementType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Artifact {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            Artifact::Group(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BoundaryEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn BoundaryEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementType> for Artifact {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallableElementType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallableElementType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallableElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityType> for Artifact {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallActivityType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallActivityType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyType> for Artifact {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallChoreographyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallChoreographyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationType> for Artifact {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallConversationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallConversationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CatchEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CatchEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for Artifact {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CategoryType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CategoryType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for Artifact {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryValueType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CategoryValueType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyType> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationType> for Artifact {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CollaborationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CollaborationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexGatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationType> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkType> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationLinkType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationLinkType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeType> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationNodeType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationNodeType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyType> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            Artifact::Group(e) => Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            Artifact::Group(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            Artifact::Group(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            Artifact::Group(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            Artifact::TextAnnotation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataInputType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataInputType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataObjectType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataOutputType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStateType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStateType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStateType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStateType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStoreType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationType> for Artifact {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DocumentationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn DocumentationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EndEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EndEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for Artifact {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndPointType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EndPointType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndPointType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EndPointType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for Artifact {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ErrorType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ErrorType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationType> for Artifact {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EscalationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EscalationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventType> for Artifact {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExpressionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExpressionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExtensionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for Artifact {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementType> for Artifact {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowElementType>::cast(e),
            Artifact::Group(e) => Cast::<dyn FlowElementType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for Artifact {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowNodeType>::cast(e),
            Artifact::Group(e) => Cast::<dyn FlowNodeType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for Artifact {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FormalExpressionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn FormalExpressionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalConversationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalConversationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupType> for Artifact {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GroupType>::cast(e),
            Artifact::Group(e) => Cast::<dyn GroupType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GroupType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GroupType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GroupTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn GroupTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for Artifact {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn HumanPerformerType>::cast(e),
            Artifact::Group(e) => Cast::<dyn HumanPerformerType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetType> for Artifact {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputSetType>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputSetType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputSetType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputSetType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for Artifact {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InterfaceType>::cast(e),
            Artifact::Group(e) => Cast::<dyn InterfaceType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingType> for Artifact {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for Artifact {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneType> for Artifact {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneType>::cast(e),
            Artifact::Group(e) => Cast::<dyn LaneType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LaneType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn LaneTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for Artifact {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneSetType>::cast(e),
            Artifact::Group(e) => Cast::<dyn LaneSetType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for Artifact {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            Artifact::Group(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ManualTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ManualTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowType> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringType> for Artifact {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MonitoringType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MonitoringType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Artifact {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            Artifact::Group(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            Artifact::Group(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            Artifact::Group(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            Artifact::Group(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for Artifact {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OperationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn OperationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OperationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn OperationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OperationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn OperationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for Artifact {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OutputSetType>::cast(e),
            Artifact::Group(e) => Cast::<dyn OutputSetType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for Artifact {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantType> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityType> for Artifact {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerEntityType>::cast(e),
            Artifact::Group(e) => Cast::<dyn PartnerEntityType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleType> for Artifact {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerRoleType>::cast(e),
            Artifact::Group(e) => Cast::<dyn PartnerRoleType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for Artifact {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PerformerType>::cast(e),
            Artifact::Group(e) => Cast::<dyn PerformerType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PerformerType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PerformerType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for Artifact {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            Artifact::Group(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessType> for Artifact {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ProcessType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ProcessType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ProcessType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ProcessType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for Artifact {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PropertyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn PropertyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PropertyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PropertyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for Artifact {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RelationshipType>::cast(e),
            Artifact::Group(e) => Cast::<dyn RelationshipType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingType> for Artifact {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RenderingType>::cast(e),
            Artifact::Group(e) => Cast::<dyn RenderingType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RenderingType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RenderingType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            Artifact::Group(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleType> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceRoleType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceRoleType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementType> for Artifact {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RootElementType>::cast(e),
            Artifact::Group(e) => Cast::<dyn RootElementType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RootElementType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RootElementType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ScriptTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for Artifact {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ScriptType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ScriptType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SendTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SendTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for Artifact {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SequenceFlowType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SequenceFlowType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ServiceTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ServiceTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for Artifact {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SignalType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SignalType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SignalTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for Artifact {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            Artifact::Group(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StartEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn StartEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StartEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn StartEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for Artifact {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubChoreographyType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubChoreographyType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationType> for Artifact {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubConversationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubConversationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessType> for Artifact {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubProcessType>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubProcessType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationType> for Artifact {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextAnnotationType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TextAnnotationType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextType> for Artifact {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TextType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TextType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TextTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for Artifact {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ThrowEventType>::cast(e),
            Artifact::Group(e) => Cast::<dyn ThrowEventType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for Artifact {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionType> for Artifact {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TransactionType>::cast(e),
            Artifact::Group(e) => Cast::<dyn TransactionType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TransactionType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TransactionType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for Artifact {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn UserTaskType>::cast(e),
            Artifact::Group(e) => Cast::<dyn UserTaskType>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for Artifact {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            Artifact::Group(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            Artifact::TextAnnotation(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            Artifact::Association(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            Artifact::Group(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            Artifact::TextAnnotation(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:assignment")]
pub struct Assignment {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:from")]
    #[tia("AssignmentType",rg*="from","AssignmentTypeMut",s,rmg*="from_mut")]
    pub from: AssignmentFrom,
    #[xml(child = "bpmn:to")]
    #[tia("AssignmentType",rg*="to","AssignmentTypeMut",s,rmg*="to_mut")]
    pub to: AssignmentTo,
}
impl DocumentElement for Assignment {
    fn element(&self) -> Element {
        Element::Assignment
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Assignment {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.from.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.to.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.from.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.to.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `assignment`
pub trait AssignmentType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of `from` child
    fn from(&self) -> &AssignmentFrom;
    /// Get value of `to` child
    fn to(&self) -> &AssignmentTo;
}
dyn_clone::clone_trait_object!(AssignmentType);
impl_downcast!(AssignmentType);
/// Mutable access to `assignment`
pub trait AssignmentTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + AssignmentType
{
    /// Get a mutable value of `from` child
    fn from_mut(&mut self) -> &mut AssignmentFrom;
    /// Set value of `from` child
    fn set_from(&mut self, value: AssignmentFrom);
    /// Get a mutable value of `to` child
    fn to_mut(&mut self) -> &mut AssignmentTo;
    /// Set value of `to` child
    fn set_to(&mut self, value: AssignmentTo);
}
dyn_clone::clone_trait_object!(AssignmentTypeMut);
impl_downcast!(AssignmentTypeMut);
impl Cast<dyn DefinitionsType> for Assignment {}
impl Cast<dyn DefinitionsTypeMut> for Assignment {}
impl Cast<dyn ImportType> for Assignment {}
impl Cast<dyn ImportTypeMut> for Assignment {}
impl Cast<dyn ActivityType> for Assignment {}
impl Cast<dyn ActivityTypeMut> for Assignment {}
impl Cast<dyn AdHocSubProcessType> for Assignment {}
impl Cast<dyn AdHocSubProcessTypeMut> for Assignment {}
impl Cast<dyn ArtifactType> for Assignment {}
impl Cast<dyn ArtifactTypeMut> for Assignment {}
impl Cast<dyn AssignmentType> for Assignment {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssignmentTypeMut> for Assignment {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssociationType> for Assignment {}
impl Cast<dyn AssociationTypeMut> for Assignment {}
impl Cast<dyn AuditingType> for Assignment {}
impl Cast<dyn AuditingTypeMut> for Assignment {}
impl Cast<dyn BaseElementType> for Assignment {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Assignment {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Assignment {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Assignment {}
impl Cast<dyn BoundaryEventType> for Assignment {}
impl Cast<dyn BoundaryEventTypeMut> for Assignment {}
impl Cast<dyn BusinessRuleTaskType> for Assignment {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Assignment {}
impl Cast<dyn CallableElementType> for Assignment {}
impl Cast<dyn CallableElementTypeMut> for Assignment {}
impl Cast<dyn CallActivityType> for Assignment {}
impl Cast<dyn CallActivityTypeMut> for Assignment {}
impl Cast<dyn CallChoreographyType> for Assignment {}
impl Cast<dyn CallChoreographyTypeMut> for Assignment {}
impl Cast<dyn CallConversationType> for Assignment {}
impl Cast<dyn CallConversationTypeMut> for Assignment {}
impl Cast<dyn CancelEventDefinitionType> for Assignment {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn CatchEventType> for Assignment {}
impl Cast<dyn CatchEventTypeMut> for Assignment {}
impl Cast<dyn CategoryType> for Assignment {}
impl Cast<dyn CategoryTypeMut> for Assignment {}
impl Cast<dyn CategoryValueType> for Assignment {}
impl Cast<dyn CategoryValueTypeMut> for Assignment {}
impl Cast<dyn ChoreographyType> for Assignment {}
impl Cast<dyn ChoreographyTypeMut> for Assignment {}
impl Cast<dyn ChoreographyActivityType> for Assignment {}
impl Cast<dyn ChoreographyActivityTypeMut> for Assignment {}
impl Cast<dyn ChoreographyTaskType> for Assignment {}
impl Cast<dyn ChoreographyTaskTypeMut> for Assignment {}
impl Cast<dyn CollaborationType> for Assignment {}
impl Cast<dyn CollaborationTypeMut> for Assignment {}
impl Cast<dyn CompensateEventDefinitionType> for Assignment {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Assignment {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Assignment {}
impl Cast<dyn ComplexGatewayType> for Assignment {}
impl Cast<dyn ComplexGatewayTypeMut> for Assignment {}
impl Cast<dyn ConditionalEventDefinitionType> for Assignment {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn ConversationType> for Assignment {}
impl Cast<dyn ConversationTypeMut> for Assignment {}
impl Cast<dyn ConversationAssociationType> for Assignment {}
impl Cast<dyn ConversationAssociationTypeMut> for Assignment {}
impl Cast<dyn ConversationLinkType> for Assignment {}
impl Cast<dyn ConversationLinkTypeMut> for Assignment {}
impl Cast<dyn ConversationNodeType> for Assignment {}
impl Cast<dyn ConversationNodeTypeMut> for Assignment {}
impl Cast<dyn CorrelationKeyType> for Assignment {}
impl Cast<dyn CorrelationKeyTypeMut> for Assignment {}
impl Cast<dyn CorrelationPropertyType> for Assignment {}
impl Cast<dyn CorrelationPropertyTypeMut> for Assignment {}
impl Cast<dyn CorrelationPropertyBindingType> for Assignment {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Assignment {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Assignment {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Assignment {}
impl Cast<dyn CorrelationSubscriptionType> for Assignment {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Assignment {}
impl Cast<dyn DataAssociationType> for Assignment {}
impl Cast<dyn DataAssociationTypeMut> for Assignment {}
impl Cast<dyn DataInputType> for Assignment {}
impl Cast<dyn DataInputTypeMut> for Assignment {}
impl Cast<dyn DataInputAssociationType> for Assignment {}
impl Cast<dyn DataInputAssociationTypeMut> for Assignment {}
impl Cast<dyn DataObjectType> for Assignment {}
impl Cast<dyn DataObjectTypeMut> for Assignment {}
impl Cast<dyn DataObjectReferenceType> for Assignment {}
impl Cast<dyn DataObjectReferenceTypeMut> for Assignment {}
impl Cast<dyn DataOutputType> for Assignment {}
impl Cast<dyn DataOutputTypeMut> for Assignment {}
impl Cast<dyn DataOutputAssociationType> for Assignment {}
impl Cast<dyn DataOutputAssociationTypeMut> for Assignment {}
impl Cast<dyn DataStateType> for Assignment {}
impl Cast<dyn DataStateTypeMut> for Assignment {}
impl Cast<dyn DataStoreType> for Assignment {}
impl Cast<dyn DataStoreTypeMut> for Assignment {}
impl Cast<dyn DataStoreReferenceType> for Assignment {}
impl Cast<dyn DataStoreReferenceTypeMut> for Assignment {}
impl Cast<dyn DocumentationType> for Assignment {}
impl Cast<dyn DocumentationTypeMut> for Assignment {}
impl Cast<dyn EndEventType> for Assignment {}
impl Cast<dyn EndEventTypeMut> for Assignment {}
impl Cast<dyn EndPointType> for Assignment {}
impl Cast<dyn EndPointTypeMut> for Assignment {}
impl Cast<dyn ErrorType> for Assignment {}
impl Cast<dyn ErrorTypeMut> for Assignment {}
impl Cast<dyn ErrorEventDefinitionType> for Assignment {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn EscalationType> for Assignment {}
impl Cast<dyn EscalationTypeMut> for Assignment {}
impl Cast<dyn EscalationEventDefinitionType> for Assignment {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn EventType> for Assignment {}
impl Cast<dyn EventTypeMut> for Assignment {}
impl Cast<dyn EventBasedGatewayType> for Assignment {}
impl Cast<dyn EventBasedGatewayTypeMut> for Assignment {}
impl Cast<dyn EventDefinitionType> for Assignment {}
impl Cast<dyn EventDefinitionTypeMut> for Assignment {}
impl Cast<dyn ExclusiveGatewayType> for Assignment {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Assignment {}
impl Cast<dyn ExpressionType> for Assignment {}
impl Cast<dyn ExpressionTypeMut> for Assignment {}
impl Cast<dyn ExtensionType> for Assignment {}
impl Cast<dyn ExtensionTypeMut> for Assignment {}
impl Cast<dyn ExtensionElementsType> for Assignment {}
impl Cast<dyn ExtensionElementsTypeMut> for Assignment {}
impl Cast<dyn FlowElementType> for Assignment {}
impl Cast<dyn FlowElementTypeMut> for Assignment {}
impl Cast<dyn FlowNodeType> for Assignment {}
impl Cast<dyn FlowNodeTypeMut> for Assignment {}
impl Cast<dyn FormalExpressionType> for Assignment {}
impl Cast<dyn FormalExpressionTypeMut> for Assignment {}
impl Cast<dyn GatewayType> for Assignment {}
impl Cast<dyn GatewayTypeMut> for Assignment {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Assignment {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Assignment {}
impl Cast<dyn GlobalChoreographyTaskType> for Assignment {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Assignment {}
impl Cast<dyn GlobalConversationType> for Assignment {}
impl Cast<dyn GlobalConversationTypeMut> for Assignment {}
impl Cast<dyn GlobalManualTaskType> for Assignment {}
impl Cast<dyn GlobalManualTaskTypeMut> for Assignment {}
impl Cast<dyn GlobalScriptTaskType> for Assignment {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Assignment {}
impl Cast<dyn GlobalTaskType> for Assignment {}
impl Cast<dyn GlobalTaskTypeMut> for Assignment {}
impl Cast<dyn GlobalUserTaskType> for Assignment {}
impl Cast<dyn GlobalUserTaskTypeMut> for Assignment {}
impl Cast<dyn GroupType> for Assignment {}
impl Cast<dyn GroupTypeMut> for Assignment {}
impl Cast<dyn HumanPerformerType> for Assignment {}
impl Cast<dyn HumanPerformerTypeMut> for Assignment {}
impl Cast<dyn ImplicitThrowEventType> for Assignment {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Assignment {}
impl Cast<dyn InclusiveGatewayType> for Assignment {}
impl Cast<dyn InclusiveGatewayTypeMut> for Assignment {}
impl Cast<dyn InputSetType> for Assignment {}
impl Cast<dyn InputSetTypeMut> for Assignment {}
impl Cast<dyn InterfaceType> for Assignment {}
impl Cast<dyn InterfaceTypeMut> for Assignment {}
impl Cast<dyn IntermediateCatchEventType> for Assignment {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Assignment {}
impl Cast<dyn IntermediateThrowEventType> for Assignment {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Assignment {}
impl Cast<dyn InputOutputBindingType> for Assignment {}
impl Cast<dyn InputOutputBindingTypeMut> for Assignment {}
impl Cast<dyn InputOutputSpecificationType> for Assignment {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Assignment {}
impl Cast<dyn ItemDefinitionType> for Assignment {}
impl Cast<dyn ItemDefinitionTypeMut> for Assignment {}
impl Cast<dyn LaneType> for Assignment {}
impl Cast<dyn LaneTypeMut> for Assignment {}
impl Cast<dyn LaneSetType> for Assignment {}
impl Cast<dyn LaneSetTypeMut> for Assignment {}
impl Cast<dyn LinkEventDefinitionType> for Assignment {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn LoopCharacteristicsType> for Assignment {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Assignment {}
impl Cast<dyn ManualTaskType> for Assignment {}
impl Cast<dyn ManualTaskTypeMut> for Assignment {}
impl Cast<dyn MessageType> for Assignment {}
impl Cast<dyn MessageTypeMut> for Assignment {}
impl Cast<dyn MessageEventDefinitionType> for Assignment {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn MessageFlowType> for Assignment {}
impl Cast<dyn MessageFlowTypeMut> for Assignment {}
impl Cast<dyn MessageFlowAssociationType> for Assignment {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Assignment {}
impl Cast<dyn MonitoringType> for Assignment {}
impl Cast<dyn MonitoringTypeMut> for Assignment {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Assignment {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Assignment {}
impl Cast<dyn OperationType> for Assignment {}
impl Cast<dyn OperationTypeMut> for Assignment {}
impl Cast<dyn OutputSetType> for Assignment {}
impl Cast<dyn OutputSetTypeMut> for Assignment {}
impl Cast<dyn ParallelGatewayType> for Assignment {}
impl Cast<dyn ParallelGatewayTypeMut> for Assignment {}
impl Cast<dyn ParticipantType> for Assignment {}
impl Cast<dyn ParticipantTypeMut> for Assignment {}
impl Cast<dyn ParticipantAssociationType> for Assignment {}
impl Cast<dyn ParticipantAssociationTypeMut> for Assignment {}
impl Cast<dyn ParticipantMultiplicityType> for Assignment {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Assignment {}
impl Cast<dyn PartnerEntityType> for Assignment {}
impl Cast<dyn PartnerEntityTypeMut> for Assignment {}
impl Cast<dyn PartnerRoleType> for Assignment {}
impl Cast<dyn PartnerRoleTypeMut> for Assignment {}
impl Cast<dyn PerformerType> for Assignment {}
impl Cast<dyn PerformerTypeMut> for Assignment {}
impl Cast<dyn PotentialOwnerType> for Assignment {}
impl Cast<dyn PotentialOwnerTypeMut> for Assignment {}
impl Cast<dyn ProcessType> for Assignment {}
impl Cast<dyn ProcessTypeMut> for Assignment {}
impl Cast<dyn PropertyType> for Assignment {}
impl Cast<dyn PropertyTypeMut> for Assignment {}
impl Cast<dyn ReceiveTaskType> for Assignment {}
impl Cast<dyn ReceiveTaskTypeMut> for Assignment {}
impl Cast<dyn RelationshipType> for Assignment {}
impl Cast<dyn RelationshipTypeMut> for Assignment {}
impl Cast<dyn RenderingType> for Assignment {}
impl Cast<dyn RenderingTypeMut> for Assignment {}
impl Cast<dyn ResourceType> for Assignment {}
impl Cast<dyn ResourceTypeMut> for Assignment {}
impl Cast<dyn ResourceAssignmentExpressionType> for Assignment {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Assignment {}
impl Cast<dyn ResourceParameterType> for Assignment {}
impl Cast<dyn ResourceParameterTypeMut> for Assignment {}
impl Cast<dyn ResourceParameterBindingType> for Assignment {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Assignment {}
impl Cast<dyn ResourceRoleType> for Assignment {}
impl Cast<dyn ResourceRoleTypeMut> for Assignment {}
impl Cast<dyn RootElementType> for Assignment {}
impl Cast<dyn RootElementTypeMut> for Assignment {}
impl Cast<dyn ScriptTaskType> for Assignment {}
impl Cast<dyn ScriptTaskTypeMut> for Assignment {}
impl Cast<dyn ScriptType> for Assignment {}
impl Cast<dyn ScriptTypeMut> for Assignment {}
impl Cast<dyn SendTaskType> for Assignment {}
impl Cast<dyn SendTaskTypeMut> for Assignment {}
impl Cast<dyn SequenceFlowType> for Assignment {}
impl Cast<dyn SequenceFlowTypeMut> for Assignment {}
impl Cast<dyn ServiceTaskType> for Assignment {}
impl Cast<dyn ServiceTaskTypeMut> for Assignment {}
impl Cast<dyn SignalType> for Assignment {}
impl Cast<dyn SignalTypeMut> for Assignment {}
impl Cast<dyn SignalEventDefinitionType> for Assignment {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn StandardLoopCharacteristicsType> for Assignment {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Assignment {}
impl Cast<dyn StartEventType> for Assignment {}
impl Cast<dyn StartEventTypeMut> for Assignment {}
impl Cast<dyn SubChoreographyType> for Assignment {}
impl Cast<dyn SubChoreographyTypeMut> for Assignment {}
impl Cast<dyn SubConversationType> for Assignment {}
impl Cast<dyn SubConversationTypeMut> for Assignment {}
impl Cast<dyn SubProcessType> for Assignment {}
impl Cast<dyn SubProcessTypeMut> for Assignment {}
impl Cast<dyn TaskType> for Assignment {}
impl Cast<dyn TaskTypeMut> for Assignment {}
impl Cast<dyn TerminateEventDefinitionType> for Assignment {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn TextAnnotationType> for Assignment {}
impl Cast<dyn TextAnnotationTypeMut> for Assignment {}
impl Cast<dyn TextType> for Assignment {}
impl Cast<dyn TextTypeMut> for Assignment {}
impl Cast<dyn ThrowEventType> for Assignment {}
impl Cast<dyn ThrowEventTypeMut> for Assignment {}
impl Cast<dyn TimerEventDefinitionType> for Assignment {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Assignment {}
impl Cast<dyn TransactionType> for Assignment {}
impl Cast<dyn TransactionTypeMut> for Assignment {}
impl Cast<dyn UserTaskType> for Assignment {}
impl Cast<dyn UserTaskTypeMut> for Assignment {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:association")]
pub struct Association {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "sourceRef")]
    #[tia("AssociationType",rg*="source_ref","AssociationTypeMut",s)]
    pub source_ref: String,
    #[xml(attr = "targetRef")]
    #[tia("AssociationType",rg*="target_ref","AssociationTypeMut",s)]
    pub target_ref: String,
    #[xml(attr = "associationDirection")]
    #[tia("AssociationType",rg*="association_direction","AssociationTypeMut",s)]
    pub association_direction: Option<String>,
}
impl DocumentElement for Association {
    fn element(&self) -> Element {
        Element::Association
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Association {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ArtifactType for Association {}
impl ArtifactTypeMut for Association {}
//

/// Access to `association`
pub trait AssociationType: ArtifactType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `sourceRef`
    fn source_ref(&self) -> &String;
    /// Get value of attribute `targetRef`
    fn target_ref(&self) -> &String;
    /// Get value of attribute `associationDirection`
    fn association_direction(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(AssociationType);
impl_downcast!(AssociationType);
/// Mutable access to `association`
pub trait AssociationTypeMut:
    ArtifactTypeMut + Downcast + Debug + Send + DynClone + AssociationType
{
    /// Set value of attribute `sourceRef`
    fn set_source_ref(&mut self, value: String);
    /// Set value of attribute `targetRef`
    fn set_target_ref(&mut self, value: String);
    /// Set value of attribute `associationDirection`
    fn set_association_direction(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(AssociationTypeMut);
impl_downcast!(AssociationTypeMut);
impl Cast<dyn DefinitionsType> for Association {}
impl Cast<dyn DefinitionsTypeMut> for Association {}
impl Cast<dyn ImportType> for Association {}
impl Cast<dyn ImportTypeMut> for Association {}
impl Cast<dyn ActivityType> for Association {}
impl Cast<dyn ActivityTypeMut> for Association {}
impl Cast<dyn AdHocSubProcessType> for Association {}
impl Cast<dyn AdHocSubProcessTypeMut> for Association {}
impl Cast<dyn ArtifactType> for Association {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ArtifactTypeMut> for Association {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssignmentType> for Association {}
impl Cast<dyn AssignmentTypeMut> for Association {}
impl Cast<dyn AssociationType> for Association {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssociationTypeMut> for Association {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AuditingType> for Association {}
impl Cast<dyn AuditingTypeMut> for Association {}
impl Cast<dyn BaseElementType> for Association {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Association {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Association {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Association {}
impl Cast<dyn BoundaryEventType> for Association {}
impl Cast<dyn BoundaryEventTypeMut> for Association {}
impl Cast<dyn BusinessRuleTaskType> for Association {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Association {}
impl Cast<dyn CallableElementType> for Association {}
impl Cast<dyn CallableElementTypeMut> for Association {}
impl Cast<dyn CallActivityType> for Association {}
impl Cast<dyn CallActivityTypeMut> for Association {}
impl Cast<dyn CallChoreographyType> for Association {}
impl Cast<dyn CallChoreographyTypeMut> for Association {}
impl Cast<dyn CallConversationType> for Association {}
impl Cast<dyn CallConversationTypeMut> for Association {}
impl Cast<dyn CancelEventDefinitionType> for Association {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Association {}
impl Cast<dyn CatchEventType> for Association {}
impl Cast<dyn CatchEventTypeMut> for Association {}
impl Cast<dyn CategoryType> for Association {}
impl Cast<dyn CategoryTypeMut> for Association {}
impl Cast<dyn CategoryValueType> for Association {}
impl Cast<dyn CategoryValueTypeMut> for Association {}
impl Cast<dyn ChoreographyType> for Association {}
impl Cast<dyn ChoreographyTypeMut> for Association {}
impl Cast<dyn ChoreographyActivityType> for Association {}
impl Cast<dyn ChoreographyActivityTypeMut> for Association {}
impl Cast<dyn ChoreographyTaskType> for Association {}
impl Cast<dyn ChoreographyTaskTypeMut> for Association {}
impl Cast<dyn CollaborationType> for Association {}
impl Cast<dyn CollaborationTypeMut> for Association {}
impl Cast<dyn CompensateEventDefinitionType> for Association {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Association {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Association {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Association {}
impl Cast<dyn ComplexGatewayType> for Association {}
impl Cast<dyn ComplexGatewayTypeMut> for Association {}
impl Cast<dyn ConditionalEventDefinitionType> for Association {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Association {}
impl Cast<dyn ConversationType> for Association {}
impl Cast<dyn ConversationTypeMut> for Association {}
impl Cast<dyn ConversationAssociationType> for Association {}
impl Cast<dyn ConversationAssociationTypeMut> for Association {}
impl Cast<dyn ConversationLinkType> for Association {}
impl Cast<dyn ConversationLinkTypeMut> for Association {}
impl Cast<dyn ConversationNodeType> for Association {}
impl Cast<dyn ConversationNodeTypeMut> for Association {}
impl Cast<dyn CorrelationKeyType> for Association {}
impl Cast<dyn CorrelationKeyTypeMut> for Association {}
impl Cast<dyn CorrelationPropertyType> for Association {}
impl Cast<dyn CorrelationPropertyTypeMut> for Association {}
impl Cast<dyn CorrelationPropertyBindingType> for Association {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Association {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Association {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Association {}
impl Cast<dyn CorrelationSubscriptionType> for Association {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Association {}
impl Cast<dyn DataAssociationType> for Association {}
impl Cast<dyn DataAssociationTypeMut> for Association {}
impl Cast<dyn DataInputType> for Association {}
impl Cast<dyn DataInputTypeMut> for Association {}
impl Cast<dyn DataInputAssociationType> for Association {}
impl Cast<dyn DataInputAssociationTypeMut> for Association {}
impl Cast<dyn DataObjectType> for Association {}
impl Cast<dyn DataObjectTypeMut> for Association {}
impl Cast<dyn DataObjectReferenceType> for Association {}
impl Cast<dyn DataObjectReferenceTypeMut> for Association {}
impl Cast<dyn DataOutputType> for Association {}
impl Cast<dyn DataOutputTypeMut> for Association {}
impl Cast<dyn DataOutputAssociationType> for Association {}
impl Cast<dyn DataOutputAssociationTypeMut> for Association {}
impl Cast<dyn DataStateType> for Association {}
impl Cast<dyn DataStateTypeMut> for Association {}
impl Cast<dyn DataStoreType> for Association {}
impl Cast<dyn DataStoreTypeMut> for Association {}
impl Cast<dyn DataStoreReferenceType> for Association {}
impl Cast<dyn DataStoreReferenceTypeMut> for Association {}
impl Cast<dyn DocumentationType> for Association {}
impl Cast<dyn DocumentationTypeMut> for Association {}
impl Cast<dyn EndEventType> for Association {}
impl Cast<dyn EndEventTypeMut> for Association {}
impl Cast<dyn EndPointType> for Association {}
impl Cast<dyn EndPointTypeMut> for Association {}
impl Cast<dyn ErrorType> for Association {}
impl Cast<dyn ErrorTypeMut> for Association {}
impl Cast<dyn ErrorEventDefinitionType> for Association {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Association {}
impl Cast<dyn EscalationType> for Association {}
impl Cast<dyn EscalationTypeMut> for Association {}
impl Cast<dyn EscalationEventDefinitionType> for Association {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Association {}
impl Cast<dyn EventType> for Association {}
impl Cast<dyn EventTypeMut> for Association {}
impl Cast<dyn EventBasedGatewayType> for Association {}
impl Cast<dyn EventBasedGatewayTypeMut> for Association {}
impl Cast<dyn EventDefinitionType> for Association {}
impl Cast<dyn EventDefinitionTypeMut> for Association {}
impl Cast<dyn ExclusiveGatewayType> for Association {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Association {}
impl Cast<dyn ExpressionType> for Association {}
impl Cast<dyn ExpressionTypeMut> for Association {}
impl Cast<dyn ExtensionType> for Association {}
impl Cast<dyn ExtensionTypeMut> for Association {}
impl Cast<dyn ExtensionElementsType> for Association {}
impl Cast<dyn ExtensionElementsTypeMut> for Association {}
impl Cast<dyn FlowElementType> for Association {}
impl Cast<dyn FlowElementTypeMut> for Association {}
impl Cast<dyn FlowNodeType> for Association {}
impl Cast<dyn FlowNodeTypeMut> for Association {}
impl Cast<dyn FormalExpressionType> for Association {}
impl Cast<dyn FormalExpressionTypeMut> for Association {}
impl Cast<dyn GatewayType> for Association {}
impl Cast<dyn GatewayTypeMut> for Association {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Association {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Association {}
impl Cast<dyn GlobalChoreographyTaskType> for Association {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Association {}
impl Cast<dyn GlobalConversationType> for Association {}
impl Cast<dyn GlobalConversationTypeMut> for Association {}
impl Cast<dyn GlobalManualTaskType> for Association {}
impl Cast<dyn GlobalManualTaskTypeMut> for Association {}
impl Cast<dyn GlobalScriptTaskType> for Association {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Association {}
impl Cast<dyn GlobalTaskType> for Association {}
impl Cast<dyn GlobalTaskTypeMut> for Association {}
impl Cast<dyn GlobalUserTaskType> for Association {}
impl Cast<dyn GlobalUserTaskTypeMut> for Association {}
impl Cast<dyn GroupType> for Association {}
impl Cast<dyn GroupTypeMut> for Association {}
impl Cast<dyn HumanPerformerType> for Association {}
impl Cast<dyn HumanPerformerTypeMut> for Association {}
impl Cast<dyn ImplicitThrowEventType> for Association {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Association {}
impl Cast<dyn InclusiveGatewayType> for Association {}
impl Cast<dyn InclusiveGatewayTypeMut> for Association {}
impl Cast<dyn InputSetType> for Association {}
impl Cast<dyn InputSetTypeMut> for Association {}
impl Cast<dyn InterfaceType> for Association {}
impl Cast<dyn InterfaceTypeMut> for Association {}
impl Cast<dyn IntermediateCatchEventType> for Association {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Association {}
impl Cast<dyn IntermediateThrowEventType> for Association {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Association {}
impl Cast<dyn InputOutputBindingType> for Association {}
impl Cast<dyn InputOutputBindingTypeMut> for Association {}
impl Cast<dyn InputOutputSpecificationType> for Association {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Association {}
impl Cast<dyn ItemDefinitionType> for Association {}
impl Cast<dyn ItemDefinitionTypeMut> for Association {}
impl Cast<dyn LaneType> for Association {}
impl Cast<dyn LaneTypeMut> for Association {}
impl Cast<dyn LaneSetType> for Association {}
impl Cast<dyn LaneSetTypeMut> for Association {}
impl Cast<dyn LinkEventDefinitionType> for Association {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Association {}
impl Cast<dyn LoopCharacteristicsType> for Association {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Association {}
impl Cast<dyn ManualTaskType> for Association {}
impl Cast<dyn ManualTaskTypeMut> for Association {}
impl Cast<dyn MessageType> for Association {}
impl Cast<dyn MessageTypeMut> for Association {}
impl Cast<dyn MessageEventDefinitionType> for Association {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Association {}
impl Cast<dyn MessageFlowType> for Association {}
impl Cast<dyn MessageFlowTypeMut> for Association {}
impl Cast<dyn MessageFlowAssociationType> for Association {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Association {}
impl Cast<dyn MonitoringType> for Association {}
impl Cast<dyn MonitoringTypeMut> for Association {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Association {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Association {}
impl Cast<dyn OperationType> for Association {}
impl Cast<dyn OperationTypeMut> for Association {}
impl Cast<dyn OutputSetType> for Association {}
impl Cast<dyn OutputSetTypeMut> for Association {}
impl Cast<dyn ParallelGatewayType> for Association {}
impl Cast<dyn ParallelGatewayTypeMut> for Association {}
impl Cast<dyn ParticipantType> for Association {}
impl Cast<dyn ParticipantTypeMut> for Association {}
impl Cast<dyn ParticipantAssociationType> for Association {}
impl Cast<dyn ParticipantAssociationTypeMut> for Association {}
impl Cast<dyn ParticipantMultiplicityType> for Association {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Association {}
impl Cast<dyn PartnerEntityType> for Association {}
impl Cast<dyn PartnerEntityTypeMut> for Association {}
impl Cast<dyn PartnerRoleType> for Association {}
impl Cast<dyn PartnerRoleTypeMut> for Association {}
impl Cast<dyn PerformerType> for Association {}
impl Cast<dyn PerformerTypeMut> for Association {}
impl Cast<dyn PotentialOwnerType> for Association {}
impl Cast<dyn PotentialOwnerTypeMut> for Association {}
impl Cast<dyn ProcessType> for Association {}
impl Cast<dyn ProcessTypeMut> for Association {}
impl Cast<dyn PropertyType> for Association {}
impl Cast<dyn PropertyTypeMut> for Association {}
impl Cast<dyn ReceiveTaskType> for Association {}
impl Cast<dyn ReceiveTaskTypeMut> for Association {}
impl Cast<dyn RelationshipType> for Association {}
impl Cast<dyn RelationshipTypeMut> for Association {}
impl Cast<dyn RenderingType> for Association {}
impl Cast<dyn RenderingTypeMut> for Association {}
impl Cast<dyn ResourceType> for Association {}
impl Cast<dyn ResourceTypeMut> for Association {}
impl Cast<dyn ResourceAssignmentExpressionType> for Association {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Association {}
impl Cast<dyn ResourceParameterType> for Association {}
impl Cast<dyn ResourceParameterTypeMut> for Association {}
impl Cast<dyn ResourceParameterBindingType> for Association {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Association {}
impl Cast<dyn ResourceRoleType> for Association {}
impl Cast<dyn ResourceRoleTypeMut> for Association {}
impl Cast<dyn RootElementType> for Association {}
impl Cast<dyn RootElementTypeMut> for Association {}
impl Cast<dyn ScriptTaskType> for Association {}
impl Cast<dyn ScriptTaskTypeMut> for Association {}
impl Cast<dyn ScriptType> for Association {}
impl Cast<dyn ScriptTypeMut> for Association {}
impl Cast<dyn SendTaskType> for Association {}
impl Cast<dyn SendTaskTypeMut> for Association {}
impl Cast<dyn SequenceFlowType> for Association {}
impl Cast<dyn SequenceFlowTypeMut> for Association {}
impl Cast<dyn ServiceTaskType> for Association {}
impl Cast<dyn ServiceTaskTypeMut> for Association {}
impl Cast<dyn SignalType> for Association {}
impl Cast<dyn SignalTypeMut> for Association {}
impl Cast<dyn SignalEventDefinitionType> for Association {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Association {}
impl Cast<dyn StandardLoopCharacteristicsType> for Association {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Association {}
impl Cast<dyn StartEventType> for Association {}
impl Cast<dyn StartEventTypeMut> for Association {}
impl Cast<dyn SubChoreographyType> for Association {}
impl Cast<dyn SubChoreographyTypeMut> for Association {}
impl Cast<dyn SubConversationType> for Association {}
impl Cast<dyn SubConversationTypeMut> for Association {}
impl Cast<dyn SubProcessType> for Association {}
impl Cast<dyn SubProcessTypeMut> for Association {}
impl Cast<dyn TaskType> for Association {}
impl Cast<dyn TaskTypeMut> for Association {}
impl Cast<dyn TerminateEventDefinitionType> for Association {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Association {}
impl Cast<dyn TextAnnotationType> for Association {}
impl Cast<dyn TextAnnotationTypeMut> for Association {}
impl Cast<dyn TextType> for Association {}
impl Cast<dyn TextTypeMut> for Association {}
impl Cast<dyn ThrowEventType> for Association {}
impl Cast<dyn ThrowEventTypeMut> for Association {}
impl Cast<dyn TimerEventDefinitionType> for Association {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Association {}
impl Cast<dyn TransactionType> for Association {}
impl Cast<dyn TransactionTypeMut> for Association {}
impl Cast<dyn UserTaskType> for Association {}
impl Cast<dyn UserTaskTypeMut> for Association {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:auditing")]
pub struct Auditing {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for Auditing {
    fn element(&self) -> Element {
        Element::Auditing
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Auditing {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl AuditingType for Auditing {}
impl AuditingTypeMut for Auditing {}
//

/// Access to `auditing`
pub trait AuditingType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(AuditingType);
impl_downcast!(AuditingType);
/// Mutable access to `auditing`
pub trait AuditingTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + AuditingType
{
}
dyn_clone::clone_trait_object!(AuditingTypeMut);
impl_downcast!(AuditingTypeMut);
impl Cast<dyn DefinitionsType> for Auditing {}
impl Cast<dyn DefinitionsTypeMut> for Auditing {}
impl Cast<dyn ImportType> for Auditing {}
impl Cast<dyn ImportTypeMut> for Auditing {}
impl Cast<dyn ActivityType> for Auditing {}
impl Cast<dyn ActivityTypeMut> for Auditing {}
impl Cast<dyn AdHocSubProcessType> for Auditing {}
impl Cast<dyn AdHocSubProcessTypeMut> for Auditing {}
impl Cast<dyn ArtifactType> for Auditing {}
impl Cast<dyn ArtifactTypeMut> for Auditing {}
impl Cast<dyn AssignmentType> for Auditing {}
impl Cast<dyn AssignmentTypeMut> for Auditing {}
impl Cast<dyn AssociationType> for Auditing {}
impl Cast<dyn AssociationTypeMut> for Auditing {}
impl Cast<dyn AuditingType> for Auditing {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AuditingTypeMut> for Auditing {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementType> for Auditing {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Auditing {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Auditing {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Auditing {}
impl Cast<dyn BoundaryEventType> for Auditing {}
impl Cast<dyn BoundaryEventTypeMut> for Auditing {}
impl Cast<dyn BusinessRuleTaskType> for Auditing {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Auditing {}
impl Cast<dyn CallableElementType> for Auditing {}
impl Cast<dyn CallableElementTypeMut> for Auditing {}
impl Cast<dyn CallActivityType> for Auditing {}
impl Cast<dyn CallActivityTypeMut> for Auditing {}
impl Cast<dyn CallChoreographyType> for Auditing {}
impl Cast<dyn CallChoreographyTypeMut> for Auditing {}
impl Cast<dyn CallConversationType> for Auditing {}
impl Cast<dyn CallConversationTypeMut> for Auditing {}
impl Cast<dyn CancelEventDefinitionType> for Auditing {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn CatchEventType> for Auditing {}
impl Cast<dyn CatchEventTypeMut> for Auditing {}
impl Cast<dyn CategoryType> for Auditing {}
impl Cast<dyn CategoryTypeMut> for Auditing {}
impl Cast<dyn CategoryValueType> for Auditing {}
impl Cast<dyn CategoryValueTypeMut> for Auditing {}
impl Cast<dyn ChoreographyType> for Auditing {}
impl Cast<dyn ChoreographyTypeMut> for Auditing {}
impl Cast<dyn ChoreographyActivityType> for Auditing {}
impl Cast<dyn ChoreographyActivityTypeMut> for Auditing {}
impl Cast<dyn ChoreographyTaskType> for Auditing {}
impl Cast<dyn ChoreographyTaskTypeMut> for Auditing {}
impl Cast<dyn CollaborationType> for Auditing {}
impl Cast<dyn CollaborationTypeMut> for Auditing {}
impl Cast<dyn CompensateEventDefinitionType> for Auditing {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Auditing {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Auditing {}
impl Cast<dyn ComplexGatewayType> for Auditing {}
impl Cast<dyn ComplexGatewayTypeMut> for Auditing {}
impl Cast<dyn ConditionalEventDefinitionType> for Auditing {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn ConversationType> for Auditing {}
impl Cast<dyn ConversationTypeMut> for Auditing {}
impl Cast<dyn ConversationAssociationType> for Auditing {}
impl Cast<dyn ConversationAssociationTypeMut> for Auditing {}
impl Cast<dyn ConversationLinkType> for Auditing {}
impl Cast<dyn ConversationLinkTypeMut> for Auditing {}
impl Cast<dyn ConversationNodeType> for Auditing {}
impl Cast<dyn ConversationNodeTypeMut> for Auditing {}
impl Cast<dyn CorrelationKeyType> for Auditing {}
impl Cast<dyn CorrelationKeyTypeMut> for Auditing {}
impl Cast<dyn CorrelationPropertyType> for Auditing {}
impl Cast<dyn CorrelationPropertyTypeMut> for Auditing {}
impl Cast<dyn CorrelationPropertyBindingType> for Auditing {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Auditing {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Auditing {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Auditing {}
impl Cast<dyn CorrelationSubscriptionType> for Auditing {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Auditing {}
impl Cast<dyn DataAssociationType> for Auditing {}
impl Cast<dyn DataAssociationTypeMut> for Auditing {}
impl Cast<dyn DataInputType> for Auditing {}
impl Cast<dyn DataInputTypeMut> for Auditing {}
impl Cast<dyn DataInputAssociationType> for Auditing {}
impl Cast<dyn DataInputAssociationTypeMut> for Auditing {}
impl Cast<dyn DataObjectType> for Auditing {}
impl Cast<dyn DataObjectTypeMut> for Auditing {}
impl Cast<dyn DataObjectReferenceType> for Auditing {}
impl Cast<dyn DataObjectReferenceTypeMut> for Auditing {}
impl Cast<dyn DataOutputType> for Auditing {}
impl Cast<dyn DataOutputTypeMut> for Auditing {}
impl Cast<dyn DataOutputAssociationType> for Auditing {}
impl Cast<dyn DataOutputAssociationTypeMut> for Auditing {}
impl Cast<dyn DataStateType> for Auditing {}
impl Cast<dyn DataStateTypeMut> for Auditing {}
impl Cast<dyn DataStoreType> for Auditing {}
impl Cast<dyn DataStoreTypeMut> for Auditing {}
impl Cast<dyn DataStoreReferenceType> for Auditing {}
impl Cast<dyn DataStoreReferenceTypeMut> for Auditing {}
impl Cast<dyn DocumentationType> for Auditing {}
impl Cast<dyn DocumentationTypeMut> for Auditing {}
impl Cast<dyn EndEventType> for Auditing {}
impl Cast<dyn EndEventTypeMut> for Auditing {}
impl Cast<dyn EndPointType> for Auditing {}
impl Cast<dyn EndPointTypeMut> for Auditing {}
impl Cast<dyn ErrorType> for Auditing {}
impl Cast<dyn ErrorTypeMut> for Auditing {}
impl Cast<dyn ErrorEventDefinitionType> for Auditing {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn EscalationType> for Auditing {}
impl Cast<dyn EscalationTypeMut> for Auditing {}
impl Cast<dyn EscalationEventDefinitionType> for Auditing {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn EventType> for Auditing {}
impl Cast<dyn EventTypeMut> for Auditing {}
impl Cast<dyn EventBasedGatewayType> for Auditing {}
impl Cast<dyn EventBasedGatewayTypeMut> for Auditing {}
impl Cast<dyn EventDefinitionType> for Auditing {}
impl Cast<dyn EventDefinitionTypeMut> for Auditing {}
impl Cast<dyn ExclusiveGatewayType> for Auditing {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Auditing {}
impl Cast<dyn ExpressionType> for Auditing {}
impl Cast<dyn ExpressionTypeMut> for Auditing {}
impl Cast<dyn ExtensionType> for Auditing {}
impl Cast<dyn ExtensionTypeMut> for Auditing {}
impl Cast<dyn ExtensionElementsType> for Auditing {}
impl Cast<dyn ExtensionElementsTypeMut> for Auditing {}
impl Cast<dyn FlowElementType> for Auditing {}
impl Cast<dyn FlowElementTypeMut> for Auditing {}
impl Cast<dyn FlowNodeType> for Auditing {}
impl Cast<dyn FlowNodeTypeMut> for Auditing {}
impl Cast<dyn FormalExpressionType> for Auditing {}
impl Cast<dyn FormalExpressionTypeMut> for Auditing {}
impl Cast<dyn GatewayType> for Auditing {}
impl Cast<dyn GatewayTypeMut> for Auditing {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Auditing {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Auditing {}
impl Cast<dyn GlobalChoreographyTaskType> for Auditing {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Auditing {}
impl Cast<dyn GlobalConversationType> for Auditing {}
impl Cast<dyn GlobalConversationTypeMut> for Auditing {}
impl Cast<dyn GlobalManualTaskType> for Auditing {}
impl Cast<dyn GlobalManualTaskTypeMut> for Auditing {}
impl Cast<dyn GlobalScriptTaskType> for Auditing {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Auditing {}
impl Cast<dyn GlobalTaskType> for Auditing {}
impl Cast<dyn GlobalTaskTypeMut> for Auditing {}
impl Cast<dyn GlobalUserTaskType> for Auditing {}
impl Cast<dyn GlobalUserTaskTypeMut> for Auditing {}
impl Cast<dyn GroupType> for Auditing {}
impl Cast<dyn GroupTypeMut> for Auditing {}
impl Cast<dyn HumanPerformerType> for Auditing {}
impl Cast<dyn HumanPerformerTypeMut> for Auditing {}
impl Cast<dyn ImplicitThrowEventType> for Auditing {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Auditing {}
impl Cast<dyn InclusiveGatewayType> for Auditing {}
impl Cast<dyn InclusiveGatewayTypeMut> for Auditing {}
impl Cast<dyn InputSetType> for Auditing {}
impl Cast<dyn InputSetTypeMut> for Auditing {}
impl Cast<dyn InterfaceType> for Auditing {}
impl Cast<dyn InterfaceTypeMut> for Auditing {}
impl Cast<dyn IntermediateCatchEventType> for Auditing {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Auditing {}
impl Cast<dyn IntermediateThrowEventType> for Auditing {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Auditing {}
impl Cast<dyn InputOutputBindingType> for Auditing {}
impl Cast<dyn InputOutputBindingTypeMut> for Auditing {}
impl Cast<dyn InputOutputSpecificationType> for Auditing {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Auditing {}
impl Cast<dyn ItemDefinitionType> for Auditing {}
impl Cast<dyn ItemDefinitionTypeMut> for Auditing {}
impl Cast<dyn LaneType> for Auditing {}
impl Cast<dyn LaneTypeMut> for Auditing {}
impl Cast<dyn LaneSetType> for Auditing {}
impl Cast<dyn LaneSetTypeMut> for Auditing {}
impl Cast<dyn LinkEventDefinitionType> for Auditing {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn LoopCharacteristicsType> for Auditing {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Auditing {}
impl Cast<dyn ManualTaskType> for Auditing {}
impl Cast<dyn ManualTaskTypeMut> for Auditing {}
impl Cast<dyn MessageType> for Auditing {}
impl Cast<dyn MessageTypeMut> for Auditing {}
impl Cast<dyn MessageEventDefinitionType> for Auditing {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn MessageFlowType> for Auditing {}
impl Cast<dyn MessageFlowTypeMut> for Auditing {}
impl Cast<dyn MessageFlowAssociationType> for Auditing {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Auditing {}
impl Cast<dyn MonitoringType> for Auditing {}
impl Cast<dyn MonitoringTypeMut> for Auditing {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Auditing {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Auditing {}
impl Cast<dyn OperationType> for Auditing {}
impl Cast<dyn OperationTypeMut> for Auditing {}
impl Cast<dyn OutputSetType> for Auditing {}
impl Cast<dyn OutputSetTypeMut> for Auditing {}
impl Cast<dyn ParallelGatewayType> for Auditing {}
impl Cast<dyn ParallelGatewayTypeMut> for Auditing {}
impl Cast<dyn ParticipantType> for Auditing {}
impl Cast<dyn ParticipantTypeMut> for Auditing {}
impl Cast<dyn ParticipantAssociationType> for Auditing {}
impl Cast<dyn ParticipantAssociationTypeMut> for Auditing {}
impl Cast<dyn ParticipantMultiplicityType> for Auditing {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Auditing {}
impl Cast<dyn PartnerEntityType> for Auditing {}
impl Cast<dyn PartnerEntityTypeMut> for Auditing {}
impl Cast<dyn PartnerRoleType> for Auditing {}
impl Cast<dyn PartnerRoleTypeMut> for Auditing {}
impl Cast<dyn PerformerType> for Auditing {}
impl Cast<dyn PerformerTypeMut> for Auditing {}
impl Cast<dyn PotentialOwnerType> for Auditing {}
impl Cast<dyn PotentialOwnerTypeMut> for Auditing {}
impl Cast<dyn ProcessType> for Auditing {}
impl Cast<dyn ProcessTypeMut> for Auditing {}
impl Cast<dyn PropertyType> for Auditing {}
impl Cast<dyn PropertyTypeMut> for Auditing {}
impl Cast<dyn ReceiveTaskType> for Auditing {}
impl Cast<dyn ReceiveTaskTypeMut> for Auditing {}
impl Cast<dyn RelationshipType> for Auditing {}
impl Cast<dyn RelationshipTypeMut> for Auditing {}
impl Cast<dyn RenderingType> for Auditing {}
impl Cast<dyn RenderingTypeMut> for Auditing {}
impl Cast<dyn ResourceType> for Auditing {}
impl Cast<dyn ResourceTypeMut> for Auditing {}
impl Cast<dyn ResourceAssignmentExpressionType> for Auditing {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Auditing {}
impl Cast<dyn ResourceParameterType> for Auditing {}
impl Cast<dyn ResourceParameterTypeMut> for Auditing {}
impl Cast<dyn ResourceParameterBindingType> for Auditing {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Auditing {}
impl Cast<dyn ResourceRoleType> for Auditing {}
impl Cast<dyn ResourceRoleTypeMut> for Auditing {}
impl Cast<dyn RootElementType> for Auditing {}
impl Cast<dyn RootElementTypeMut> for Auditing {}
impl Cast<dyn ScriptTaskType> for Auditing {}
impl Cast<dyn ScriptTaskTypeMut> for Auditing {}
impl Cast<dyn ScriptType> for Auditing {}
impl Cast<dyn ScriptTypeMut> for Auditing {}
impl Cast<dyn SendTaskType> for Auditing {}
impl Cast<dyn SendTaskTypeMut> for Auditing {}
impl Cast<dyn SequenceFlowType> for Auditing {}
impl Cast<dyn SequenceFlowTypeMut> for Auditing {}
impl Cast<dyn ServiceTaskType> for Auditing {}
impl Cast<dyn ServiceTaskTypeMut> for Auditing {}
impl Cast<dyn SignalType> for Auditing {}
impl Cast<dyn SignalTypeMut> for Auditing {}
impl Cast<dyn SignalEventDefinitionType> for Auditing {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn StandardLoopCharacteristicsType> for Auditing {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Auditing {}
impl Cast<dyn StartEventType> for Auditing {}
impl Cast<dyn StartEventTypeMut> for Auditing {}
impl Cast<dyn SubChoreographyType> for Auditing {}
impl Cast<dyn SubChoreographyTypeMut> for Auditing {}
impl Cast<dyn SubConversationType> for Auditing {}
impl Cast<dyn SubConversationTypeMut> for Auditing {}
impl Cast<dyn SubProcessType> for Auditing {}
impl Cast<dyn SubProcessTypeMut> for Auditing {}
impl Cast<dyn TaskType> for Auditing {}
impl Cast<dyn TaskTypeMut> for Auditing {}
impl Cast<dyn TerminateEventDefinitionType> for Auditing {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn TextAnnotationType> for Auditing {}
impl Cast<dyn TextAnnotationTypeMut> for Auditing {}
impl Cast<dyn TextType> for Auditing {}
impl Cast<dyn TextTypeMut> for Auditing {}
impl Cast<dyn ThrowEventType> for Auditing {}
impl Cast<dyn ThrowEventTypeMut> for Auditing {}
impl Cast<dyn TimerEventDefinitionType> for Auditing {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Auditing {}
impl Cast<dyn TransactionType> for Auditing {}
impl Cast<dyn TransactionTypeMut> for Auditing {}
impl Cast<dyn UserTaskType> for Auditing {}
impl Cast<dyn UserTaskTypeMut> for Auditing {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:baseElement")]
#[serde(tag = "type")]
pub enum BaseElement {}
impl BaseElement {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for BaseElement {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for BaseElement {
    fn element(&self) -> Element {
        Element::BaseElement
    }
}
/// Access to `baseElement`
pub trait BaseElementType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `id`
    fn id(&self) -> &Option<Id>;
    /// Get value of `documentation` child
    fn documentations(&self) -> &Vec<Documentation>;
    /// Get value of `extensionElements` child
    fn extension_elements(&self) -> &Option<ExtensionElements>;
}
dyn_clone::clone_trait_object!(BaseElementType);
impl_downcast!(BaseElementType);
/// Mutable access to `baseElement`
pub trait BaseElementTypeMut: Downcast + Debug + Send + DynClone + BaseElementType {
    /// Set value of attribute `id`
    fn set_id(&mut self, value: Option<Id>);
    /// Get a mutable value of `documentation` child
    fn documentations_mut(&mut self) -> &mut Vec<Documentation>;
    /// Set value of `documentation` child
    fn set_documentations(&mut self, value: Vec<Documentation>);
    /// Get a mutable value of `extensionElements` child
    fn extension_elements_mut(&mut self) -> &mut Option<ExtensionElements>;
    /// Set value of `extensionElements` child
    fn set_extension_elements(&mut self, value: Option<ExtensionElements>);
}
dyn_clone::clone_trait_object!(BaseElementTypeMut);
impl_downcast!(BaseElementTypeMut);
impl Cast<dyn DefinitionsType> for BaseElement {}
impl Cast<dyn DefinitionsTypeMut> for BaseElement {}
impl Cast<dyn ImportType> for BaseElement {}
impl Cast<dyn ImportTypeMut> for BaseElement {}
impl Cast<dyn ActivityType> for BaseElement {}
impl Cast<dyn ActivityTypeMut> for BaseElement {}
impl Cast<dyn AdHocSubProcessType> for BaseElement {}
impl Cast<dyn AdHocSubProcessTypeMut> for BaseElement {}
impl Cast<dyn ArtifactType> for BaseElement {}
impl Cast<dyn ArtifactTypeMut> for BaseElement {}
impl Cast<dyn AssignmentType> for BaseElement {}
impl Cast<dyn AssignmentTypeMut> for BaseElement {}
impl Cast<dyn AssociationType> for BaseElement {}
impl Cast<dyn AssociationTypeMut> for BaseElement {}
impl Cast<dyn AuditingType> for BaseElement {}
impl Cast<dyn AuditingTypeMut> for BaseElement {}
impl Cast<dyn BaseElementType> for BaseElement {}
impl Cast<dyn BaseElementTypeMut> for BaseElement {}
impl Cast<dyn BaseElementWithMixedContentType> for BaseElement {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for BaseElement {}
impl Cast<dyn BoundaryEventType> for BaseElement {}
impl Cast<dyn BoundaryEventTypeMut> for BaseElement {}
impl Cast<dyn BusinessRuleTaskType> for BaseElement {}
impl Cast<dyn BusinessRuleTaskTypeMut> for BaseElement {}
impl Cast<dyn CallableElementType> for BaseElement {}
impl Cast<dyn CallableElementTypeMut> for BaseElement {}
impl Cast<dyn CallActivityType> for BaseElement {}
impl Cast<dyn CallActivityTypeMut> for BaseElement {}
impl Cast<dyn CallChoreographyType> for BaseElement {}
impl Cast<dyn CallChoreographyTypeMut> for BaseElement {}
impl Cast<dyn CallConversationType> for BaseElement {}
impl Cast<dyn CallConversationTypeMut> for BaseElement {}
impl Cast<dyn CancelEventDefinitionType> for BaseElement {}
impl Cast<dyn CancelEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn CatchEventType> for BaseElement {}
impl Cast<dyn CatchEventTypeMut> for BaseElement {}
impl Cast<dyn CategoryType> for BaseElement {}
impl Cast<dyn CategoryTypeMut> for BaseElement {}
impl Cast<dyn CategoryValueType> for BaseElement {}
impl Cast<dyn CategoryValueTypeMut> for BaseElement {}
impl Cast<dyn ChoreographyType> for BaseElement {}
impl Cast<dyn ChoreographyTypeMut> for BaseElement {}
impl Cast<dyn ChoreographyActivityType> for BaseElement {}
impl Cast<dyn ChoreographyActivityTypeMut> for BaseElement {}
impl Cast<dyn ChoreographyTaskType> for BaseElement {}
impl Cast<dyn ChoreographyTaskTypeMut> for BaseElement {}
impl Cast<dyn CollaborationType> for BaseElement {}
impl Cast<dyn CollaborationTypeMut> for BaseElement {}
impl Cast<dyn CompensateEventDefinitionType> for BaseElement {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn ComplexBehaviorDefinitionType> for BaseElement {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for BaseElement {}
impl Cast<dyn ComplexGatewayType> for BaseElement {}
impl Cast<dyn ComplexGatewayTypeMut> for BaseElement {}
impl Cast<dyn ConditionalEventDefinitionType> for BaseElement {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn ConversationType> for BaseElement {}
impl Cast<dyn ConversationTypeMut> for BaseElement {}
impl Cast<dyn ConversationAssociationType> for BaseElement {}
impl Cast<dyn ConversationAssociationTypeMut> for BaseElement {}
impl Cast<dyn ConversationLinkType> for BaseElement {}
impl Cast<dyn ConversationLinkTypeMut> for BaseElement {}
impl Cast<dyn ConversationNodeType> for BaseElement {}
impl Cast<dyn ConversationNodeTypeMut> for BaseElement {}
impl Cast<dyn CorrelationKeyType> for BaseElement {}
impl Cast<dyn CorrelationKeyTypeMut> for BaseElement {}
impl Cast<dyn CorrelationPropertyType> for BaseElement {}
impl Cast<dyn CorrelationPropertyTypeMut> for BaseElement {}
impl Cast<dyn CorrelationPropertyBindingType> for BaseElement {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for BaseElement {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for BaseElement {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for BaseElement {}
impl Cast<dyn CorrelationSubscriptionType> for BaseElement {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for BaseElement {}
impl Cast<dyn DataAssociationType> for BaseElement {}
impl Cast<dyn DataAssociationTypeMut> for BaseElement {}
impl Cast<dyn DataInputType> for BaseElement {}
impl Cast<dyn DataInputTypeMut> for BaseElement {}
impl Cast<dyn DataInputAssociationType> for BaseElement {}
impl Cast<dyn DataInputAssociationTypeMut> for BaseElement {}
impl Cast<dyn DataObjectType> for BaseElement {}
impl Cast<dyn DataObjectTypeMut> for BaseElement {}
impl Cast<dyn DataObjectReferenceType> for BaseElement {}
impl Cast<dyn DataObjectReferenceTypeMut> for BaseElement {}
impl Cast<dyn DataOutputType> for BaseElement {}
impl Cast<dyn DataOutputTypeMut> for BaseElement {}
impl Cast<dyn DataOutputAssociationType> for BaseElement {}
impl Cast<dyn DataOutputAssociationTypeMut> for BaseElement {}
impl Cast<dyn DataStateType> for BaseElement {}
impl Cast<dyn DataStateTypeMut> for BaseElement {}
impl Cast<dyn DataStoreType> for BaseElement {}
impl Cast<dyn DataStoreTypeMut> for BaseElement {}
impl Cast<dyn DataStoreReferenceType> for BaseElement {}
impl Cast<dyn DataStoreReferenceTypeMut> for BaseElement {}
impl Cast<dyn DocumentationType> for BaseElement {}
impl Cast<dyn DocumentationTypeMut> for BaseElement {}
impl Cast<dyn EndEventType> for BaseElement {}
impl Cast<dyn EndEventTypeMut> for BaseElement {}
impl Cast<dyn EndPointType> for BaseElement {}
impl Cast<dyn EndPointTypeMut> for BaseElement {}
impl Cast<dyn ErrorType> for BaseElement {}
impl Cast<dyn ErrorTypeMut> for BaseElement {}
impl Cast<dyn ErrorEventDefinitionType> for BaseElement {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn EscalationType> for BaseElement {}
impl Cast<dyn EscalationTypeMut> for BaseElement {}
impl Cast<dyn EscalationEventDefinitionType> for BaseElement {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn EventType> for BaseElement {}
impl Cast<dyn EventTypeMut> for BaseElement {}
impl Cast<dyn EventBasedGatewayType> for BaseElement {}
impl Cast<dyn EventBasedGatewayTypeMut> for BaseElement {}
impl Cast<dyn EventDefinitionType> for BaseElement {}
impl Cast<dyn EventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn ExclusiveGatewayType> for BaseElement {}
impl Cast<dyn ExclusiveGatewayTypeMut> for BaseElement {}
impl Cast<dyn ExpressionType> for BaseElement {}
impl Cast<dyn ExpressionTypeMut> for BaseElement {}
impl Cast<dyn ExtensionType> for BaseElement {}
impl Cast<dyn ExtensionTypeMut> for BaseElement {}
impl Cast<dyn ExtensionElementsType> for BaseElement {}
impl Cast<dyn ExtensionElementsTypeMut> for BaseElement {}
impl Cast<dyn FlowElementType> for BaseElement {}
impl Cast<dyn FlowElementTypeMut> for BaseElement {}
impl Cast<dyn FlowNodeType> for BaseElement {}
impl Cast<dyn FlowNodeTypeMut> for BaseElement {}
impl Cast<dyn FormalExpressionType> for BaseElement {}
impl Cast<dyn FormalExpressionTypeMut> for BaseElement {}
impl Cast<dyn GatewayType> for BaseElement {}
impl Cast<dyn GatewayTypeMut> for BaseElement {}
impl Cast<dyn GlobalBusinessRuleTaskType> for BaseElement {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for BaseElement {}
impl Cast<dyn GlobalChoreographyTaskType> for BaseElement {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for BaseElement {}
impl Cast<dyn GlobalConversationType> for BaseElement {}
impl Cast<dyn GlobalConversationTypeMut> for BaseElement {}
impl Cast<dyn GlobalManualTaskType> for BaseElement {}
impl Cast<dyn GlobalManualTaskTypeMut> for BaseElement {}
impl Cast<dyn GlobalScriptTaskType> for BaseElement {}
impl Cast<dyn GlobalScriptTaskTypeMut> for BaseElement {}
impl Cast<dyn GlobalTaskType> for BaseElement {}
impl Cast<dyn GlobalTaskTypeMut> for BaseElement {}
impl Cast<dyn GlobalUserTaskType> for BaseElement {}
impl Cast<dyn GlobalUserTaskTypeMut> for BaseElement {}
impl Cast<dyn GroupType> for BaseElement {}
impl Cast<dyn GroupTypeMut> for BaseElement {}
impl Cast<dyn HumanPerformerType> for BaseElement {}
impl Cast<dyn HumanPerformerTypeMut> for BaseElement {}
impl Cast<dyn ImplicitThrowEventType> for BaseElement {}
impl Cast<dyn ImplicitThrowEventTypeMut> for BaseElement {}
impl Cast<dyn InclusiveGatewayType> for BaseElement {}
impl Cast<dyn InclusiveGatewayTypeMut> for BaseElement {}
impl Cast<dyn InputSetType> for BaseElement {}
impl Cast<dyn InputSetTypeMut> for BaseElement {}
impl Cast<dyn InterfaceType> for BaseElement {}
impl Cast<dyn InterfaceTypeMut> for BaseElement {}
impl Cast<dyn IntermediateCatchEventType> for BaseElement {}
impl Cast<dyn IntermediateCatchEventTypeMut> for BaseElement {}
impl Cast<dyn IntermediateThrowEventType> for BaseElement {}
impl Cast<dyn IntermediateThrowEventTypeMut> for BaseElement {}
impl Cast<dyn InputOutputBindingType> for BaseElement {}
impl Cast<dyn InputOutputBindingTypeMut> for BaseElement {}
impl Cast<dyn InputOutputSpecificationType> for BaseElement {}
impl Cast<dyn InputOutputSpecificationTypeMut> for BaseElement {}
impl Cast<dyn ItemDefinitionType> for BaseElement {}
impl Cast<dyn ItemDefinitionTypeMut> for BaseElement {}
impl Cast<dyn LaneType> for BaseElement {}
impl Cast<dyn LaneTypeMut> for BaseElement {}
impl Cast<dyn LaneSetType> for BaseElement {}
impl Cast<dyn LaneSetTypeMut> for BaseElement {}
impl Cast<dyn LinkEventDefinitionType> for BaseElement {}
impl Cast<dyn LinkEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn LoopCharacteristicsType> for BaseElement {}
impl Cast<dyn LoopCharacteristicsTypeMut> for BaseElement {}
impl Cast<dyn ManualTaskType> for BaseElement {}
impl Cast<dyn ManualTaskTypeMut> for BaseElement {}
impl Cast<dyn MessageType> for BaseElement {}
impl Cast<dyn MessageTypeMut> for BaseElement {}
impl Cast<dyn MessageEventDefinitionType> for BaseElement {}
impl Cast<dyn MessageEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn MessageFlowType> for BaseElement {}
impl Cast<dyn MessageFlowTypeMut> for BaseElement {}
impl Cast<dyn MessageFlowAssociationType> for BaseElement {}
impl Cast<dyn MessageFlowAssociationTypeMut> for BaseElement {}
impl Cast<dyn MonitoringType> for BaseElement {}
impl Cast<dyn MonitoringTypeMut> for BaseElement {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for BaseElement {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for BaseElement {}
impl Cast<dyn OperationType> for BaseElement {}
impl Cast<dyn OperationTypeMut> for BaseElement {}
impl Cast<dyn OutputSetType> for BaseElement {}
impl Cast<dyn OutputSetTypeMut> for BaseElement {}
impl Cast<dyn ParallelGatewayType> for BaseElement {}
impl Cast<dyn ParallelGatewayTypeMut> for BaseElement {}
impl Cast<dyn ParticipantType> for BaseElement {}
impl Cast<dyn ParticipantTypeMut> for BaseElement {}
impl Cast<dyn ParticipantAssociationType> for BaseElement {}
impl Cast<dyn ParticipantAssociationTypeMut> for BaseElement {}
impl Cast<dyn ParticipantMultiplicityType> for BaseElement {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for BaseElement {}
impl Cast<dyn PartnerEntityType> for BaseElement {}
impl Cast<dyn PartnerEntityTypeMut> for BaseElement {}
impl Cast<dyn PartnerRoleType> for BaseElement {}
impl Cast<dyn PartnerRoleTypeMut> for BaseElement {}
impl Cast<dyn PerformerType> for BaseElement {}
impl Cast<dyn PerformerTypeMut> for BaseElement {}
impl Cast<dyn PotentialOwnerType> for BaseElement {}
impl Cast<dyn PotentialOwnerTypeMut> for BaseElement {}
impl Cast<dyn ProcessType> for BaseElement {}
impl Cast<dyn ProcessTypeMut> for BaseElement {}
impl Cast<dyn PropertyType> for BaseElement {}
impl Cast<dyn PropertyTypeMut> for BaseElement {}
impl Cast<dyn ReceiveTaskType> for BaseElement {}
impl Cast<dyn ReceiveTaskTypeMut> for BaseElement {}
impl Cast<dyn RelationshipType> for BaseElement {}
impl Cast<dyn RelationshipTypeMut> for BaseElement {}
impl Cast<dyn RenderingType> for BaseElement {}
impl Cast<dyn RenderingTypeMut> for BaseElement {}
impl Cast<dyn ResourceType> for BaseElement {}
impl Cast<dyn ResourceTypeMut> for BaseElement {}
impl Cast<dyn ResourceAssignmentExpressionType> for BaseElement {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for BaseElement {}
impl Cast<dyn ResourceParameterType> for BaseElement {}
impl Cast<dyn ResourceParameterTypeMut> for BaseElement {}
impl Cast<dyn ResourceParameterBindingType> for BaseElement {}
impl Cast<dyn ResourceParameterBindingTypeMut> for BaseElement {}
impl Cast<dyn ResourceRoleType> for BaseElement {}
impl Cast<dyn ResourceRoleTypeMut> for BaseElement {}
impl Cast<dyn RootElementType> for BaseElement {}
impl Cast<dyn RootElementTypeMut> for BaseElement {}
impl Cast<dyn ScriptTaskType> for BaseElement {}
impl Cast<dyn ScriptTaskTypeMut> for BaseElement {}
impl Cast<dyn ScriptType> for BaseElement {}
impl Cast<dyn ScriptTypeMut> for BaseElement {}
impl Cast<dyn SendTaskType> for BaseElement {}
impl Cast<dyn SendTaskTypeMut> for BaseElement {}
impl Cast<dyn SequenceFlowType> for BaseElement {}
impl Cast<dyn SequenceFlowTypeMut> for BaseElement {}
impl Cast<dyn ServiceTaskType> for BaseElement {}
impl Cast<dyn ServiceTaskTypeMut> for BaseElement {}
impl Cast<dyn SignalType> for BaseElement {}
impl Cast<dyn SignalTypeMut> for BaseElement {}
impl Cast<dyn SignalEventDefinitionType> for BaseElement {}
impl Cast<dyn SignalEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn StandardLoopCharacteristicsType> for BaseElement {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for BaseElement {}
impl Cast<dyn StartEventType> for BaseElement {}
impl Cast<dyn StartEventTypeMut> for BaseElement {}
impl Cast<dyn SubChoreographyType> for BaseElement {}
impl Cast<dyn SubChoreographyTypeMut> for BaseElement {}
impl Cast<dyn SubConversationType> for BaseElement {}
impl Cast<dyn SubConversationTypeMut> for BaseElement {}
impl Cast<dyn SubProcessType> for BaseElement {}
impl Cast<dyn SubProcessTypeMut> for BaseElement {}
impl Cast<dyn TaskType> for BaseElement {}
impl Cast<dyn TaskTypeMut> for BaseElement {}
impl Cast<dyn TerminateEventDefinitionType> for BaseElement {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn TextAnnotationType> for BaseElement {}
impl Cast<dyn TextAnnotationTypeMut> for BaseElement {}
impl Cast<dyn TextType> for BaseElement {}
impl Cast<dyn TextTypeMut> for BaseElement {}
impl Cast<dyn ThrowEventType> for BaseElement {}
impl Cast<dyn ThrowEventTypeMut> for BaseElement {}
impl Cast<dyn TimerEventDefinitionType> for BaseElement {}
impl Cast<dyn TimerEventDefinitionTypeMut> for BaseElement {}
impl Cast<dyn TransactionType> for BaseElement {}
impl Cast<dyn TransactionTypeMut> for BaseElement {}
impl Cast<dyn UserTaskType> for BaseElement {}
impl Cast<dyn UserTaskTypeMut> for BaseElement {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:baseElementWithMixedContent")]
#[serde(tag = "type")]
pub enum BaseElementWithMixedContent {}
impl BaseElementWithMixedContent {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for BaseElementWithMixedContent {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for BaseElementWithMixedContent {
    fn element(&self) -> Element {
        Element::BaseElementWithMixedContent
    }
}
/// Access to `baseElementWithMixedContent`
pub trait BaseElementWithMixedContentType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `id`
    fn id(&self) -> &Option<Id>;
    /// Get value of `documentation` child
    fn documentations(&self) -> &Vec<Documentation>;
    /// Get value of `extensionElements` child
    fn extension_elements(&self) -> &Option<ExtensionElements>;
}
dyn_clone::clone_trait_object!(BaseElementWithMixedContentType);
impl_downcast!(BaseElementWithMixedContentType);
/// Mutable access to `baseElementWithMixedContent`
pub trait BaseElementWithMixedContentTypeMut:
    Downcast + Debug + Send + DynClone + BaseElementWithMixedContentType
{
    /// Set value of attribute `id`
    fn set_id(&mut self, value: Option<Id>);
    /// Get a mutable value of `documentation` child
    fn documentations_mut(&mut self) -> &mut Vec<Documentation>;
    /// Set value of `documentation` child
    fn set_documentations(&mut self, value: Vec<Documentation>);
    /// Get a mutable value of `extensionElements` child
    fn extension_elements_mut(&mut self) -> &mut Option<ExtensionElements>;
    /// Set value of `extensionElements` child
    fn set_extension_elements(&mut self, value: Option<ExtensionElements>);
}
dyn_clone::clone_trait_object!(BaseElementWithMixedContentTypeMut);
impl_downcast!(BaseElementWithMixedContentTypeMut);
impl Cast<dyn DefinitionsType> for BaseElementWithMixedContent {}
impl Cast<dyn DefinitionsTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ImportType> for BaseElementWithMixedContent {}
impl Cast<dyn ImportTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ActivityType> for BaseElementWithMixedContent {}
impl Cast<dyn ActivityTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn AdHocSubProcessType> for BaseElementWithMixedContent {}
impl Cast<dyn AdHocSubProcessTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ArtifactType> for BaseElementWithMixedContent {}
impl Cast<dyn ArtifactTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn AssignmentType> for BaseElementWithMixedContent {}
impl Cast<dyn AssignmentTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn AssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn AssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn AuditingType> for BaseElementWithMixedContent {}
impl Cast<dyn AuditingTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn BaseElementType> for BaseElementWithMixedContent {}
impl Cast<dyn BaseElementTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn BaseElementWithMixedContentType> for BaseElementWithMixedContent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn BoundaryEventType> for BaseElementWithMixedContent {}
impl Cast<dyn BoundaryEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn BusinessRuleTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CallableElementType> for BaseElementWithMixedContent {}
impl Cast<dyn CallableElementTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CallActivityType> for BaseElementWithMixedContent {}
impl Cast<dyn CallActivityTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CallChoreographyType> for BaseElementWithMixedContent {}
impl Cast<dyn CallChoreographyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CallConversationType> for BaseElementWithMixedContent {}
impl Cast<dyn CallConversationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CancelEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CatchEventType> for BaseElementWithMixedContent {}
impl Cast<dyn CatchEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CategoryType> for BaseElementWithMixedContent {}
impl Cast<dyn CategoryTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CategoryValueType> for BaseElementWithMixedContent {}
impl Cast<dyn CategoryValueTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyType> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyActivityType> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyActivityTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn ChoreographyTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CollaborationType> for BaseElementWithMixedContent {}
impl Cast<dyn CollaborationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CompensateEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ComplexGatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn ComplexGatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ConditionalEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationType> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationLinkType> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationLinkTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationNodeType> for BaseElementWithMixedContent {}
impl Cast<dyn ConversationNodeTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationKeyType> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationKeyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyType> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyBindingType> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationSubscriptionType> for BaseElementWithMixedContent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn DataAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataInputType> for BaseElementWithMixedContent {}
impl Cast<dyn DataInputTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataInputAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn DataInputAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataObjectType> for BaseElementWithMixedContent {}
impl Cast<dyn DataObjectTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataObjectReferenceType> for BaseElementWithMixedContent {}
impl Cast<dyn DataObjectReferenceTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataOutputType> for BaseElementWithMixedContent {}
impl Cast<dyn DataOutputTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataOutputAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn DataOutputAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataStateType> for BaseElementWithMixedContent {}
impl Cast<dyn DataStateTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataStoreType> for BaseElementWithMixedContent {}
impl Cast<dyn DataStoreTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DataStoreReferenceType> for BaseElementWithMixedContent {}
impl Cast<dyn DataStoreReferenceTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn DocumentationType> for BaseElementWithMixedContent {}
impl Cast<dyn DocumentationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EndEventType> for BaseElementWithMixedContent {}
impl Cast<dyn EndEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EndPointType> for BaseElementWithMixedContent {}
impl Cast<dyn EndPointTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ErrorType> for BaseElementWithMixedContent {}
impl Cast<dyn ErrorTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ErrorEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EscalationType> for BaseElementWithMixedContent {}
impl Cast<dyn EscalationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EscalationEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EventType> for BaseElementWithMixedContent {}
impl Cast<dyn EventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EventBasedGatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn EventBasedGatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn EventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn EventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ExclusiveGatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ExpressionType> for BaseElementWithMixedContent {}
impl Cast<dyn ExpressionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ExtensionType> for BaseElementWithMixedContent {}
impl Cast<dyn ExtensionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ExtensionElementsType> for BaseElementWithMixedContent {}
impl Cast<dyn ExtensionElementsTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn FlowElementType> for BaseElementWithMixedContent {}
impl Cast<dyn FlowElementTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn FlowNodeType> for BaseElementWithMixedContent {}
impl Cast<dyn FlowNodeTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn FormalExpressionType> for BaseElementWithMixedContent {}
impl Cast<dyn FormalExpressionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn GatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalChoreographyTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalConversationType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalConversationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalManualTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalManualTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalScriptTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalUserTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn GlobalUserTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn GroupType> for BaseElementWithMixedContent {}
impl Cast<dyn GroupTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn HumanPerformerType> for BaseElementWithMixedContent {}
impl Cast<dyn HumanPerformerTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ImplicitThrowEventType> for BaseElementWithMixedContent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn InclusiveGatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn InclusiveGatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn InputSetType> for BaseElementWithMixedContent {}
impl Cast<dyn InputSetTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn InterfaceType> for BaseElementWithMixedContent {}
impl Cast<dyn InterfaceTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn IntermediateCatchEventType> for BaseElementWithMixedContent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn IntermediateThrowEventType> for BaseElementWithMixedContent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn InputOutputBindingType> for BaseElementWithMixedContent {}
impl Cast<dyn InputOutputBindingTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn InputOutputSpecificationType> for BaseElementWithMixedContent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ItemDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn ItemDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn LaneType> for BaseElementWithMixedContent {}
impl Cast<dyn LaneTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn LaneSetType> for BaseElementWithMixedContent {}
impl Cast<dyn LaneSetTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn LinkEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn LoopCharacteristicsType> for BaseElementWithMixedContent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ManualTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn ManualTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MessageType> for BaseElementWithMixedContent {}
impl Cast<dyn MessageTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MessageEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MessageFlowType> for BaseElementWithMixedContent {}
impl Cast<dyn MessageFlowTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MessageFlowAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MonitoringType> for BaseElementWithMixedContent {}
impl Cast<dyn MonitoringTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for BaseElementWithMixedContent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn OperationType> for BaseElementWithMixedContent {}
impl Cast<dyn OperationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn OutputSetType> for BaseElementWithMixedContent {}
impl Cast<dyn OutputSetTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ParallelGatewayType> for BaseElementWithMixedContent {}
impl Cast<dyn ParallelGatewayTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantType> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantAssociationType> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantAssociationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantMultiplicityType> for BaseElementWithMixedContent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn PartnerEntityType> for BaseElementWithMixedContent {}
impl Cast<dyn PartnerEntityTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn PartnerRoleType> for BaseElementWithMixedContent {}
impl Cast<dyn PartnerRoleTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn PerformerType> for BaseElementWithMixedContent {}
impl Cast<dyn PerformerTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn PotentialOwnerType> for BaseElementWithMixedContent {}
impl Cast<dyn PotentialOwnerTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ProcessType> for BaseElementWithMixedContent {}
impl Cast<dyn ProcessTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn PropertyType> for BaseElementWithMixedContent {}
impl Cast<dyn PropertyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ReceiveTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn ReceiveTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn RelationshipType> for BaseElementWithMixedContent {}
impl Cast<dyn RelationshipTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn RenderingType> for BaseElementWithMixedContent {}
impl Cast<dyn RenderingTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceType> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceAssignmentExpressionType> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceParameterType> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceParameterTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceParameterBindingType> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceRoleType> for BaseElementWithMixedContent {}
impl Cast<dyn ResourceRoleTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn RootElementType> for BaseElementWithMixedContent {}
impl Cast<dyn RootElementTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ScriptTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn ScriptTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ScriptType> for BaseElementWithMixedContent {}
impl Cast<dyn ScriptTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SendTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn SendTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SequenceFlowType> for BaseElementWithMixedContent {}
impl Cast<dyn SequenceFlowTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ServiceTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn ServiceTaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SignalType> for BaseElementWithMixedContent {}
impl Cast<dyn SignalTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SignalEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn StandardLoopCharacteristicsType> for BaseElementWithMixedContent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn StartEventType> for BaseElementWithMixedContent {}
impl Cast<dyn StartEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SubChoreographyType> for BaseElementWithMixedContent {}
impl Cast<dyn SubChoreographyTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SubConversationType> for BaseElementWithMixedContent {}
impl Cast<dyn SubConversationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn SubProcessType> for BaseElementWithMixedContent {}
impl Cast<dyn SubProcessTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TaskType> for BaseElementWithMixedContent {}
impl Cast<dyn TaskTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TerminateEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TextAnnotationType> for BaseElementWithMixedContent {}
impl Cast<dyn TextAnnotationTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TextType> for BaseElementWithMixedContent {}
impl Cast<dyn TextTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn ThrowEventType> for BaseElementWithMixedContent {}
impl Cast<dyn ThrowEventTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TimerEventDefinitionType> for BaseElementWithMixedContent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn TransactionType> for BaseElementWithMixedContent {}
impl Cast<dyn TransactionTypeMut> for BaseElementWithMixedContent {}
impl Cast<dyn UserTaskType> for BaseElementWithMixedContent {}
impl Cast<dyn UserTaskTypeMut> for BaseElementWithMixedContent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:boundaryEvent")]
pub struct BoundaryEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(attr = "parallelMultiple")]
    #[tia("CatchEventType",rg*="parallel_multiple","CatchEventTypeMut",s)]
    pub parallel_multiple: Option<bool>,
    #[xml(child = "bpmn:dataOutput")]
    #[tia("CatchEventType",rg*="data_outputs","CatchEventTypeMut",s,rmg*="data_outputs_mut")]
    pub data_outputs: Vec<DataOutput>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("CatchEventType",rg*="data_output_associations","CatchEventTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:outputSet")]
    #[tia("CatchEventType",rg*="output_set","CatchEventTypeMut",s,rmg*="output_set_mut")]
    pub output_set: Option<OutputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("CatchEventType",rg*="event_definitions","CatchEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("CatchEventType",rg*="event_definition_refs","CatchEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
    #[xml(attr = "cancelActivity")]
    #[tia("BoundaryEventType",rg*="cancel_activity","BoundaryEventTypeMut",s)]
    pub cancel_activity: Option<bool>,
    #[xml(attr = "attachedToRef")]
    #[tia("BoundaryEventType",rg*="attached_toref","BoundaryEventTypeMut",s)]
    pub attached_toref: String,
}
impl DocumentElement for BoundaryEvent {
    fn element(&self) -> Element {
        Element::BoundaryEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for BoundaryEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `boundaryEvent`
pub trait BoundaryEventType: CatchEventType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `cancelActivity`
    fn cancel_activity(&self) -> &Option<bool>;
    /// Get value of attribute `attachedToRef`
    fn attached_toref(&self) -> &String;
}
dyn_clone::clone_trait_object!(BoundaryEventType);
impl_downcast!(BoundaryEventType);
/// Mutable access to `boundaryEvent`
pub trait BoundaryEventTypeMut:
    CatchEventTypeMut + Downcast + Debug + Send + DynClone + BoundaryEventType
{
    /// Set value of attribute `cancelActivity`
    fn set_cancel_activity(&mut self, value: Option<bool>);
    /// Set value of attribute `attachedToRef`
    fn set_attached_toref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(BoundaryEventTypeMut);
impl_downcast!(BoundaryEventTypeMut);
impl Cast<dyn DefinitionsType> for BoundaryEvent {}
impl Cast<dyn DefinitionsTypeMut> for BoundaryEvent {}
impl Cast<dyn ImportType> for BoundaryEvent {}
impl Cast<dyn ImportTypeMut> for BoundaryEvent {}
impl Cast<dyn ActivityType> for BoundaryEvent {}
impl Cast<dyn ActivityTypeMut> for BoundaryEvent {}
impl Cast<dyn AdHocSubProcessType> for BoundaryEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for BoundaryEvent {}
impl Cast<dyn ArtifactType> for BoundaryEvent {}
impl Cast<dyn ArtifactTypeMut> for BoundaryEvent {}
impl Cast<dyn AssignmentType> for BoundaryEvent {}
impl Cast<dyn AssignmentTypeMut> for BoundaryEvent {}
impl Cast<dyn AssociationType> for BoundaryEvent {}
impl Cast<dyn AssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn AuditingType> for BoundaryEvent {}
impl Cast<dyn AuditingTypeMut> for BoundaryEvent {}
impl Cast<dyn BaseElementType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for BoundaryEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for BoundaryEvent {}
impl Cast<dyn BoundaryEventType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BoundaryEventTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BusinessRuleTaskType> for BoundaryEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn CallableElementType> for BoundaryEvent {}
impl Cast<dyn CallableElementTypeMut> for BoundaryEvent {}
impl Cast<dyn CallActivityType> for BoundaryEvent {}
impl Cast<dyn CallActivityTypeMut> for BoundaryEvent {}
impl Cast<dyn CallChoreographyType> for BoundaryEvent {}
impl Cast<dyn CallChoreographyTypeMut> for BoundaryEvent {}
impl Cast<dyn CallConversationType> for BoundaryEvent {}
impl Cast<dyn CallConversationTypeMut> for BoundaryEvent {}
impl Cast<dyn CancelEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn CatchEventType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CatchEventTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryType> for BoundaryEvent {}
impl Cast<dyn CategoryTypeMut> for BoundaryEvent {}
impl Cast<dyn CategoryValueType> for BoundaryEvent {}
impl Cast<dyn CategoryValueTypeMut> for BoundaryEvent {}
impl Cast<dyn ChoreographyType> for BoundaryEvent {}
impl Cast<dyn ChoreographyTypeMut> for BoundaryEvent {}
impl Cast<dyn ChoreographyActivityType> for BoundaryEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for BoundaryEvent {}
impl Cast<dyn ChoreographyTaskType> for BoundaryEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn CollaborationType> for BoundaryEvent {}
impl Cast<dyn CollaborationTypeMut> for BoundaryEvent {}
impl Cast<dyn CompensateEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for BoundaryEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn ComplexGatewayType> for BoundaryEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn ConversationType> for BoundaryEvent {}
impl Cast<dyn ConversationTypeMut> for BoundaryEvent {}
impl Cast<dyn ConversationAssociationType> for BoundaryEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn ConversationLinkType> for BoundaryEvent {}
impl Cast<dyn ConversationLinkTypeMut> for BoundaryEvent {}
impl Cast<dyn ConversationNodeType> for BoundaryEvent {}
impl Cast<dyn ConversationNodeTypeMut> for BoundaryEvent {}
impl Cast<dyn CorrelationKeyType> for BoundaryEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyType> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for BoundaryEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for BoundaryEvent {}
impl Cast<dyn CorrelationSubscriptionType> for BoundaryEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for BoundaryEvent {}
impl Cast<dyn DataAssociationType> for BoundaryEvent {}
impl Cast<dyn DataAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn DataInputType> for BoundaryEvent {}
impl Cast<dyn DataInputTypeMut> for BoundaryEvent {}
impl Cast<dyn DataInputAssociationType> for BoundaryEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn DataObjectType> for BoundaryEvent {}
impl Cast<dyn DataObjectTypeMut> for BoundaryEvent {}
impl Cast<dyn DataObjectReferenceType> for BoundaryEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for BoundaryEvent {}
impl Cast<dyn DataOutputType> for BoundaryEvent {}
impl Cast<dyn DataOutputTypeMut> for BoundaryEvent {}
impl Cast<dyn DataOutputAssociationType> for BoundaryEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn DataStateType> for BoundaryEvent {}
impl Cast<dyn DataStateTypeMut> for BoundaryEvent {}
impl Cast<dyn DataStoreType> for BoundaryEvent {}
impl Cast<dyn DataStoreTypeMut> for BoundaryEvent {}
impl Cast<dyn DataStoreReferenceType> for BoundaryEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for BoundaryEvent {}
impl Cast<dyn DocumentationType> for BoundaryEvent {}
impl Cast<dyn DocumentationTypeMut> for BoundaryEvent {}
impl Cast<dyn EndEventType> for BoundaryEvent {}
impl Cast<dyn EndEventTypeMut> for BoundaryEvent {}
impl Cast<dyn EndPointType> for BoundaryEvent {}
impl Cast<dyn EndPointTypeMut> for BoundaryEvent {}
impl Cast<dyn ErrorType> for BoundaryEvent {}
impl Cast<dyn ErrorTypeMut> for BoundaryEvent {}
impl Cast<dyn ErrorEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn EscalationType> for BoundaryEvent {}
impl Cast<dyn EscalationTypeMut> for BoundaryEvent {}
impl Cast<dyn EscalationEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn EventType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for BoundaryEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn EventDefinitionType> for BoundaryEvent {}
impl Cast<dyn EventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn ExclusiveGatewayType> for BoundaryEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn ExpressionType> for BoundaryEvent {}
impl Cast<dyn ExpressionTypeMut> for BoundaryEvent {}
impl Cast<dyn ExtensionType> for BoundaryEvent {}
impl Cast<dyn ExtensionTypeMut> for BoundaryEvent {}
impl Cast<dyn ExtensionElementsType> for BoundaryEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for BoundaryEvent {}
impl Cast<dyn FlowElementType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for BoundaryEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for BoundaryEvent {}
impl Cast<dyn FormalExpressionTypeMut> for BoundaryEvent {}
impl Cast<dyn GatewayType> for BoundaryEvent {}
impl Cast<dyn GatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalConversationType> for BoundaryEvent {}
impl Cast<dyn GlobalConversationTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalManualTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalScriptTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GlobalUserTaskType> for BoundaryEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn GroupType> for BoundaryEvent {}
impl Cast<dyn GroupTypeMut> for BoundaryEvent {}
impl Cast<dyn HumanPerformerType> for BoundaryEvent {}
impl Cast<dyn HumanPerformerTypeMut> for BoundaryEvent {}
impl Cast<dyn ImplicitThrowEventType> for BoundaryEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for BoundaryEvent {}
impl Cast<dyn InclusiveGatewayType> for BoundaryEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn InputSetType> for BoundaryEvent {}
impl Cast<dyn InputSetTypeMut> for BoundaryEvent {}
impl Cast<dyn InterfaceType> for BoundaryEvent {}
impl Cast<dyn InterfaceTypeMut> for BoundaryEvent {}
impl Cast<dyn IntermediateCatchEventType> for BoundaryEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for BoundaryEvent {}
impl Cast<dyn IntermediateThrowEventType> for BoundaryEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for BoundaryEvent {}
impl Cast<dyn InputOutputBindingType> for BoundaryEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for BoundaryEvent {}
impl Cast<dyn InputOutputSpecificationType> for BoundaryEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for BoundaryEvent {}
impl Cast<dyn ItemDefinitionType> for BoundaryEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn LaneType> for BoundaryEvent {}
impl Cast<dyn LaneTypeMut> for BoundaryEvent {}
impl Cast<dyn LaneSetType> for BoundaryEvent {}
impl Cast<dyn LaneSetTypeMut> for BoundaryEvent {}
impl Cast<dyn LinkEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn LoopCharacteristicsType> for BoundaryEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for BoundaryEvent {}
impl Cast<dyn ManualTaskType> for BoundaryEvent {}
impl Cast<dyn ManualTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn MessageType> for BoundaryEvent {}
impl Cast<dyn MessageTypeMut> for BoundaryEvent {}
impl Cast<dyn MessageEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn MessageFlowType> for BoundaryEvent {}
impl Cast<dyn MessageFlowTypeMut> for BoundaryEvent {}
impl Cast<dyn MessageFlowAssociationType> for BoundaryEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn MonitoringType> for BoundaryEvent {}
impl Cast<dyn MonitoringTypeMut> for BoundaryEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for BoundaryEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for BoundaryEvent {}
impl Cast<dyn OperationType> for BoundaryEvent {}
impl Cast<dyn OperationTypeMut> for BoundaryEvent {}
impl Cast<dyn OutputSetType> for BoundaryEvent {}
impl Cast<dyn OutputSetTypeMut> for BoundaryEvent {}
impl Cast<dyn ParallelGatewayType> for BoundaryEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for BoundaryEvent {}
impl Cast<dyn ParticipantType> for BoundaryEvent {}
impl Cast<dyn ParticipantTypeMut> for BoundaryEvent {}
impl Cast<dyn ParticipantAssociationType> for BoundaryEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for BoundaryEvent {}
impl Cast<dyn ParticipantMultiplicityType> for BoundaryEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for BoundaryEvent {}
impl Cast<dyn PartnerEntityType> for BoundaryEvent {}
impl Cast<dyn PartnerEntityTypeMut> for BoundaryEvent {}
impl Cast<dyn PartnerRoleType> for BoundaryEvent {}
impl Cast<dyn PartnerRoleTypeMut> for BoundaryEvent {}
impl Cast<dyn PerformerType> for BoundaryEvent {}
impl Cast<dyn PerformerTypeMut> for BoundaryEvent {}
impl Cast<dyn PotentialOwnerType> for BoundaryEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for BoundaryEvent {}
impl Cast<dyn ProcessType> for BoundaryEvent {}
impl Cast<dyn ProcessTypeMut> for BoundaryEvent {}
impl Cast<dyn PropertyType> for BoundaryEvent {}
impl Cast<dyn PropertyTypeMut> for BoundaryEvent {}
impl Cast<dyn ReceiveTaskType> for BoundaryEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn RelationshipType> for BoundaryEvent {}
impl Cast<dyn RelationshipTypeMut> for BoundaryEvent {}
impl Cast<dyn RenderingType> for BoundaryEvent {}
impl Cast<dyn RenderingTypeMut> for BoundaryEvent {}
impl Cast<dyn ResourceType> for BoundaryEvent {}
impl Cast<dyn ResourceTypeMut> for BoundaryEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for BoundaryEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for BoundaryEvent {}
impl Cast<dyn ResourceParameterType> for BoundaryEvent {}
impl Cast<dyn ResourceParameterTypeMut> for BoundaryEvent {}
impl Cast<dyn ResourceParameterBindingType> for BoundaryEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for BoundaryEvent {}
impl Cast<dyn ResourceRoleType> for BoundaryEvent {}
impl Cast<dyn ResourceRoleTypeMut> for BoundaryEvent {}
impl Cast<dyn RootElementType> for BoundaryEvent {}
impl Cast<dyn RootElementTypeMut> for BoundaryEvent {}
impl Cast<dyn ScriptTaskType> for BoundaryEvent {}
impl Cast<dyn ScriptTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn ScriptType> for BoundaryEvent {}
impl Cast<dyn ScriptTypeMut> for BoundaryEvent {}
impl Cast<dyn SendTaskType> for BoundaryEvent {}
impl Cast<dyn SendTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn SequenceFlowType> for BoundaryEvent {}
impl Cast<dyn SequenceFlowTypeMut> for BoundaryEvent {}
impl Cast<dyn ServiceTaskType> for BoundaryEvent {}
impl Cast<dyn ServiceTaskTypeMut> for BoundaryEvent {}
impl Cast<dyn SignalType> for BoundaryEvent {}
impl Cast<dyn SignalTypeMut> for BoundaryEvent {}
impl Cast<dyn SignalEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for BoundaryEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for BoundaryEvent {}
impl Cast<dyn StartEventType> for BoundaryEvent {}
impl Cast<dyn StartEventTypeMut> for BoundaryEvent {}
impl Cast<dyn SubChoreographyType> for BoundaryEvent {}
impl Cast<dyn SubChoreographyTypeMut> for BoundaryEvent {}
impl Cast<dyn SubConversationType> for BoundaryEvent {}
impl Cast<dyn SubConversationTypeMut> for BoundaryEvent {}
impl Cast<dyn SubProcessType> for BoundaryEvent {}
impl Cast<dyn SubProcessTypeMut> for BoundaryEvent {}
impl Cast<dyn TaskType> for BoundaryEvent {}
impl Cast<dyn TaskTypeMut> for BoundaryEvent {}
impl Cast<dyn TerminateEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn TextAnnotationType> for BoundaryEvent {}
impl Cast<dyn TextAnnotationTypeMut> for BoundaryEvent {}
impl Cast<dyn TextType> for BoundaryEvent {}
impl Cast<dyn TextTypeMut> for BoundaryEvent {}
impl Cast<dyn ThrowEventType> for BoundaryEvent {}
impl Cast<dyn ThrowEventTypeMut> for BoundaryEvent {}
impl Cast<dyn TimerEventDefinitionType> for BoundaryEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for BoundaryEvent {}
impl Cast<dyn TransactionType> for BoundaryEvent {}
impl Cast<dyn TransactionTypeMut> for BoundaryEvent {}
impl Cast<dyn UserTaskType> for BoundaryEvent {}
impl Cast<dyn UserTaskTypeMut> for BoundaryEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:businessRuleTask")]
pub struct BusinessRuleTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "implementation")]
    #[tia("BusinessRuleTaskType",rg*="implementation","BusinessRuleTaskTypeMut",s)]
    pub implementation: Option<String>,
}
impl DocumentElement for BusinessRuleTask {
    fn element(&self) -> Element {
        Element::BusinessRuleTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for BusinessRuleTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TaskType for BusinessRuleTask {}
impl TaskTypeMut for BusinessRuleTask {}
//

/// Access to `businessRuleTask`
pub trait BusinessRuleTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(BusinessRuleTaskType);
impl_downcast!(BusinessRuleTaskType);
/// Mutable access to `businessRuleTask`
pub trait BusinessRuleTaskTypeMut:
    TaskTypeMut + Downcast + Debug + Send + DynClone + BusinessRuleTaskType
{
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(BusinessRuleTaskTypeMut);
impl_downcast!(BusinessRuleTaskTypeMut);
impl Cast<dyn DefinitionsType> for BusinessRuleTask {}
impl Cast<dyn DefinitionsTypeMut> for BusinessRuleTask {}
impl Cast<dyn ImportType> for BusinessRuleTask {}
impl Cast<dyn ImportTypeMut> for BusinessRuleTask {}
impl Cast<dyn ActivityType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for BusinessRuleTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for BusinessRuleTask {}
impl Cast<dyn ArtifactType> for BusinessRuleTask {}
impl Cast<dyn ArtifactTypeMut> for BusinessRuleTask {}
impl Cast<dyn AssignmentType> for BusinessRuleTask {}
impl Cast<dyn AssignmentTypeMut> for BusinessRuleTask {}
impl Cast<dyn AssociationType> for BusinessRuleTask {}
impl Cast<dyn AssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn AuditingType> for BusinessRuleTask {}
impl Cast<dyn AuditingTypeMut> for BusinessRuleTask {}
impl Cast<dyn BaseElementType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for BusinessRuleTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for BusinessRuleTask {}
impl Cast<dyn BoundaryEventType> for BusinessRuleTask {}
impl Cast<dyn BoundaryEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn BusinessRuleTaskType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementType> for BusinessRuleTask {}
impl Cast<dyn CallableElementTypeMut> for BusinessRuleTask {}
impl Cast<dyn CallActivityType> for BusinessRuleTask {}
impl Cast<dyn CallActivityTypeMut> for BusinessRuleTask {}
impl Cast<dyn CallChoreographyType> for BusinessRuleTask {}
impl Cast<dyn CallChoreographyTypeMut> for BusinessRuleTask {}
impl Cast<dyn CallConversationType> for BusinessRuleTask {}
impl Cast<dyn CallConversationTypeMut> for BusinessRuleTask {}
impl Cast<dyn CancelEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn CatchEventType> for BusinessRuleTask {}
impl Cast<dyn CatchEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn CategoryType> for BusinessRuleTask {}
impl Cast<dyn CategoryTypeMut> for BusinessRuleTask {}
impl Cast<dyn CategoryValueType> for BusinessRuleTask {}
impl Cast<dyn CategoryValueTypeMut> for BusinessRuleTask {}
impl Cast<dyn ChoreographyType> for BusinessRuleTask {}
impl Cast<dyn ChoreographyTypeMut> for BusinessRuleTask {}
impl Cast<dyn ChoreographyActivityType> for BusinessRuleTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for BusinessRuleTask {}
impl Cast<dyn ChoreographyTaskType> for BusinessRuleTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn CollaborationType> for BusinessRuleTask {}
impl Cast<dyn CollaborationTypeMut> for BusinessRuleTask {}
impl Cast<dyn CompensateEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for BusinessRuleTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ComplexGatewayType> for BusinessRuleTask {}
impl Cast<dyn ComplexGatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn ConditionalEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ConversationType> for BusinessRuleTask {}
impl Cast<dyn ConversationTypeMut> for BusinessRuleTask {}
impl Cast<dyn ConversationAssociationType> for BusinessRuleTask {}
impl Cast<dyn ConversationAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn ConversationLinkType> for BusinessRuleTask {}
impl Cast<dyn ConversationLinkTypeMut> for BusinessRuleTask {}
impl Cast<dyn ConversationNodeType> for BusinessRuleTask {}
impl Cast<dyn ConversationNodeTypeMut> for BusinessRuleTask {}
impl Cast<dyn CorrelationKeyType> for BusinessRuleTask {}
impl Cast<dyn CorrelationKeyTypeMut> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyType> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyBindingType> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for BusinessRuleTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for BusinessRuleTask {}
impl Cast<dyn CorrelationSubscriptionType> for BusinessRuleTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataAssociationType> for BusinessRuleTask {}
impl Cast<dyn DataAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataInputType> for BusinessRuleTask {}
impl Cast<dyn DataInputTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataInputAssociationType> for BusinessRuleTask {}
impl Cast<dyn DataInputAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataObjectType> for BusinessRuleTask {}
impl Cast<dyn DataObjectTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataObjectReferenceType> for BusinessRuleTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataOutputType> for BusinessRuleTask {}
impl Cast<dyn DataOutputTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataOutputAssociationType> for BusinessRuleTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataStateType> for BusinessRuleTask {}
impl Cast<dyn DataStateTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataStoreType> for BusinessRuleTask {}
impl Cast<dyn DataStoreTypeMut> for BusinessRuleTask {}
impl Cast<dyn DataStoreReferenceType> for BusinessRuleTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for BusinessRuleTask {}
impl Cast<dyn DocumentationType> for BusinessRuleTask {}
impl Cast<dyn DocumentationTypeMut> for BusinessRuleTask {}
impl Cast<dyn EndEventType> for BusinessRuleTask {}
impl Cast<dyn EndEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn EndPointType> for BusinessRuleTask {}
impl Cast<dyn EndPointTypeMut> for BusinessRuleTask {}
impl Cast<dyn ErrorType> for BusinessRuleTask {}
impl Cast<dyn ErrorTypeMut> for BusinessRuleTask {}
impl Cast<dyn ErrorEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn EscalationType> for BusinessRuleTask {}
impl Cast<dyn EscalationTypeMut> for BusinessRuleTask {}
impl Cast<dyn EscalationEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn EventType> for BusinessRuleTask {}
impl Cast<dyn EventTypeMut> for BusinessRuleTask {}
impl Cast<dyn EventBasedGatewayType> for BusinessRuleTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn EventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn EventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ExclusiveGatewayType> for BusinessRuleTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn ExpressionType> for BusinessRuleTask {}
impl Cast<dyn ExpressionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ExtensionType> for BusinessRuleTask {}
impl Cast<dyn ExtensionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ExtensionElementsType> for BusinessRuleTask {}
impl Cast<dyn ExtensionElementsTypeMut> for BusinessRuleTask {}
impl Cast<dyn FlowElementType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for BusinessRuleTask {}
impl Cast<dyn FormalExpressionTypeMut> for BusinessRuleTask {}
impl Cast<dyn GatewayType> for BusinessRuleTask {}
impl Cast<dyn GatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalChoreographyTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalConversationType> for BusinessRuleTask {}
impl Cast<dyn GlobalConversationTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalManualTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalScriptTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GlobalUserTaskType> for BusinessRuleTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn GroupType> for BusinessRuleTask {}
impl Cast<dyn GroupTypeMut> for BusinessRuleTask {}
impl Cast<dyn HumanPerformerType> for BusinessRuleTask {}
impl Cast<dyn HumanPerformerTypeMut> for BusinessRuleTask {}
impl Cast<dyn ImplicitThrowEventType> for BusinessRuleTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn InclusiveGatewayType> for BusinessRuleTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn InputSetType> for BusinessRuleTask {}
impl Cast<dyn InputSetTypeMut> for BusinessRuleTask {}
impl Cast<dyn InterfaceType> for BusinessRuleTask {}
impl Cast<dyn InterfaceTypeMut> for BusinessRuleTask {}
impl Cast<dyn IntermediateCatchEventType> for BusinessRuleTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn IntermediateThrowEventType> for BusinessRuleTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn InputOutputBindingType> for BusinessRuleTask {}
impl Cast<dyn InputOutputBindingTypeMut> for BusinessRuleTask {}
impl Cast<dyn InputOutputSpecificationType> for BusinessRuleTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for BusinessRuleTask {}
impl Cast<dyn ItemDefinitionType> for BusinessRuleTask {}
impl Cast<dyn ItemDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn LaneType> for BusinessRuleTask {}
impl Cast<dyn LaneTypeMut> for BusinessRuleTask {}
impl Cast<dyn LaneSetType> for BusinessRuleTask {}
impl Cast<dyn LaneSetTypeMut> for BusinessRuleTask {}
impl Cast<dyn LinkEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn LoopCharacteristicsType> for BusinessRuleTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for BusinessRuleTask {}
impl Cast<dyn ManualTaskType> for BusinessRuleTask {}
impl Cast<dyn ManualTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn MessageType> for BusinessRuleTask {}
impl Cast<dyn MessageTypeMut> for BusinessRuleTask {}
impl Cast<dyn MessageEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn MessageFlowType> for BusinessRuleTask {}
impl Cast<dyn MessageFlowTypeMut> for BusinessRuleTask {}
impl Cast<dyn MessageFlowAssociationType> for BusinessRuleTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn MonitoringType> for BusinessRuleTask {}
impl Cast<dyn MonitoringTypeMut> for BusinessRuleTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for BusinessRuleTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for BusinessRuleTask {}
impl Cast<dyn OperationType> for BusinessRuleTask {}
impl Cast<dyn OperationTypeMut> for BusinessRuleTask {}
impl Cast<dyn OutputSetType> for BusinessRuleTask {}
impl Cast<dyn OutputSetTypeMut> for BusinessRuleTask {}
impl Cast<dyn ParallelGatewayType> for BusinessRuleTask {}
impl Cast<dyn ParallelGatewayTypeMut> for BusinessRuleTask {}
impl Cast<dyn ParticipantType> for BusinessRuleTask {}
impl Cast<dyn ParticipantTypeMut> for BusinessRuleTask {}
impl Cast<dyn ParticipantAssociationType> for BusinessRuleTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for BusinessRuleTask {}
impl Cast<dyn ParticipantMultiplicityType> for BusinessRuleTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for BusinessRuleTask {}
impl Cast<dyn PartnerEntityType> for BusinessRuleTask {}
impl Cast<dyn PartnerEntityTypeMut> for BusinessRuleTask {}
impl Cast<dyn PartnerRoleType> for BusinessRuleTask {}
impl Cast<dyn PartnerRoleTypeMut> for BusinessRuleTask {}
impl Cast<dyn PerformerType> for BusinessRuleTask {}
impl Cast<dyn PerformerTypeMut> for BusinessRuleTask {}
impl Cast<dyn PotentialOwnerType> for BusinessRuleTask {}
impl Cast<dyn PotentialOwnerTypeMut> for BusinessRuleTask {}
impl Cast<dyn ProcessType> for BusinessRuleTask {}
impl Cast<dyn ProcessTypeMut> for BusinessRuleTask {}
impl Cast<dyn PropertyType> for BusinessRuleTask {}
impl Cast<dyn PropertyTypeMut> for BusinessRuleTask {}
impl Cast<dyn ReceiveTaskType> for BusinessRuleTask {}
impl Cast<dyn ReceiveTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn RelationshipType> for BusinessRuleTask {}
impl Cast<dyn RelationshipTypeMut> for BusinessRuleTask {}
impl Cast<dyn RenderingType> for BusinessRuleTask {}
impl Cast<dyn RenderingTypeMut> for BusinessRuleTask {}
impl Cast<dyn ResourceType> for BusinessRuleTask {}
impl Cast<dyn ResourceTypeMut> for BusinessRuleTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for BusinessRuleTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for BusinessRuleTask {}
impl Cast<dyn ResourceParameterType> for BusinessRuleTask {}
impl Cast<dyn ResourceParameterTypeMut> for BusinessRuleTask {}
impl Cast<dyn ResourceParameterBindingType> for BusinessRuleTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for BusinessRuleTask {}
impl Cast<dyn ResourceRoleType> for BusinessRuleTask {}
impl Cast<dyn ResourceRoleTypeMut> for BusinessRuleTask {}
impl Cast<dyn RootElementType> for BusinessRuleTask {}
impl Cast<dyn RootElementTypeMut> for BusinessRuleTask {}
impl Cast<dyn ScriptTaskType> for BusinessRuleTask {}
impl Cast<dyn ScriptTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn ScriptType> for BusinessRuleTask {}
impl Cast<dyn ScriptTypeMut> for BusinessRuleTask {}
impl Cast<dyn SendTaskType> for BusinessRuleTask {}
impl Cast<dyn SendTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn SequenceFlowType> for BusinessRuleTask {}
impl Cast<dyn SequenceFlowTypeMut> for BusinessRuleTask {}
impl Cast<dyn ServiceTaskType> for BusinessRuleTask {}
impl Cast<dyn ServiceTaskTypeMut> for BusinessRuleTask {}
impl Cast<dyn SignalType> for BusinessRuleTask {}
impl Cast<dyn SignalTypeMut> for BusinessRuleTask {}
impl Cast<dyn SignalEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for BusinessRuleTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for BusinessRuleTask {}
impl Cast<dyn StartEventType> for BusinessRuleTask {}
impl Cast<dyn StartEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn SubChoreographyType> for BusinessRuleTask {}
impl Cast<dyn SubChoreographyTypeMut> for BusinessRuleTask {}
impl Cast<dyn SubConversationType> for BusinessRuleTask {}
impl Cast<dyn SubConversationTypeMut> for BusinessRuleTask {}
impl Cast<dyn SubProcessType> for BusinessRuleTask {}
impl Cast<dyn SubProcessTypeMut> for BusinessRuleTask {}
impl Cast<dyn TaskType> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for BusinessRuleTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn TextAnnotationType> for BusinessRuleTask {}
impl Cast<dyn TextAnnotationTypeMut> for BusinessRuleTask {}
impl Cast<dyn TextType> for BusinessRuleTask {}
impl Cast<dyn TextTypeMut> for BusinessRuleTask {}
impl Cast<dyn ThrowEventType> for BusinessRuleTask {}
impl Cast<dyn ThrowEventTypeMut> for BusinessRuleTask {}
impl Cast<dyn TimerEventDefinitionType> for BusinessRuleTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for BusinessRuleTask {}
impl Cast<dyn TransactionType> for BusinessRuleTask {}
impl Cast<dyn TransactionTypeMut> for BusinessRuleTask {}
impl Cast<dyn UserTaskType> for BusinessRuleTask {}
impl Cast<dyn UserTaskTypeMut> for BusinessRuleTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:callableElement")]
pub struct CallableElement {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
}
impl DocumentElement for CallableElement {
    fn element(&self) -> Element {
        Element::CallableElement
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CallableElement {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.io_specification.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.io_bindings.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.io_specification.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.io_bindings.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for CallableElement {}
impl RootElementTypeMut for CallableElement {}
//

/// Access to `callableElement`
pub trait CallableElementType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `supportedInterfaceRef` child
    fn supported_interface_refs(&self) -> &Vec<String>;
    /// Get value of `ioSpecification` child
    fn io_specification(&self) -> &Option<InputOutputSpecification>;
    /// Get value of `ioBinding` child
    fn io_bindings(&self) -> &Vec<InputOutputBinding>;
}
dyn_clone::clone_trait_object!(CallableElementType);
impl_downcast!(CallableElementType);
/// Mutable access to `callableElement`
pub trait CallableElementTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + CallableElementType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `supportedInterfaceRef` child
    fn supported_interface_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `supportedInterfaceRef` child
    fn set_supported_interface_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `ioSpecification` child
    fn io_specification_mut(&mut self) -> &mut Option<InputOutputSpecification>;
    /// Set value of `ioSpecification` child
    fn set_io_specification(&mut self, value: Option<InputOutputSpecification>);
    /// Get a mutable value of `ioBinding` child
    fn io_bindings_mut(&mut self) -> &mut Vec<InputOutputBinding>;
    /// Set value of `ioBinding` child
    fn set_io_bindings(&mut self, value: Vec<InputOutputBinding>);
}
dyn_clone::clone_trait_object!(CallableElementTypeMut);
impl_downcast!(CallableElementTypeMut);
impl Cast<dyn DefinitionsType> for CallableElement {}
impl Cast<dyn DefinitionsTypeMut> for CallableElement {}
impl Cast<dyn ImportType> for CallableElement {}
impl Cast<dyn ImportTypeMut> for CallableElement {}
impl Cast<dyn ActivityType> for CallableElement {}
impl Cast<dyn ActivityTypeMut> for CallableElement {}
impl Cast<dyn AdHocSubProcessType> for CallableElement {}
impl Cast<dyn AdHocSubProcessTypeMut> for CallableElement {}
impl Cast<dyn ArtifactType> for CallableElement {}
impl Cast<dyn ArtifactTypeMut> for CallableElement {}
impl Cast<dyn AssignmentType> for CallableElement {}
impl Cast<dyn AssignmentTypeMut> for CallableElement {}
impl Cast<dyn AssociationType> for CallableElement {}
impl Cast<dyn AssociationTypeMut> for CallableElement {}
impl Cast<dyn AuditingType> for CallableElement {}
impl Cast<dyn AuditingTypeMut> for CallableElement {}
impl Cast<dyn BaseElementType> for CallableElement {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CallableElement {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CallableElement {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CallableElement {}
impl Cast<dyn BoundaryEventType> for CallableElement {}
impl Cast<dyn BoundaryEventTypeMut> for CallableElement {}
impl Cast<dyn BusinessRuleTaskType> for CallableElement {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CallableElement {}
impl Cast<dyn CallableElementType> for CallableElement {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for CallableElement {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for CallableElement {}
impl Cast<dyn CallActivityTypeMut> for CallableElement {}
impl Cast<dyn CallChoreographyType> for CallableElement {}
impl Cast<dyn CallChoreographyTypeMut> for CallableElement {}
impl Cast<dyn CallConversationType> for CallableElement {}
impl Cast<dyn CallConversationTypeMut> for CallableElement {}
impl Cast<dyn CancelEventDefinitionType> for CallableElement {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn CatchEventType> for CallableElement {}
impl Cast<dyn CatchEventTypeMut> for CallableElement {}
impl Cast<dyn CategoryType> for CallableElement {}
impl Cast<dyn CategoryTypeMut> for CallableElement {}
impl Cast<dyn CategoryValueType> for CallableElement {}
impl Cast<dyn CategoryValueTypeMut> for CallableElement {}
impl Cast<dyn ChoreographyType> for CallableElement {}
impl Cast<dyn ChoreographyTypeMut> for CallableElement {}
impl Cast<dyn ChoreographyActivityType> for CallableElement {}
impl Cast<dyn ChoreographyActivityTypeMut> for CallableElement {}
impl Cast<dyn ChoreographyTaskType> for CallableElement {}
impl Cast<dyn ChoreographyTaskTypeMut> for CallableElement {}
impl Cast<dyn CollaborationType> for CallableElement {}
impl Cast<dyn CollaborationTypeMut> for CallableElement {}
impl Cast<dyn CompensateEventDefinitionType> for CallableElement {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CallableElement {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CallableElement {}
impl Cast<dyn ComplexGatewayType> for CallableElement {}
impl Cast<dyn ComplexGatewayTypeMut> for CallableElement {}
impl Cast<dyn ConditionalEventDefinitionType> for CallableElement {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn ConversationType> for CallableElement {}
impl Cast<dyn ConversationTypeMut> for CallableElement {}
impl Cast<dyn ConversationAssociationType> for CallableElement {}
impl Cast<dyn ConversationAssociationTypeMut> for CallableElement {}
impl Cast<dyn ConversationLinkType> for CallableElement {}
impl Cast<dyn ConversationLinkTypeMut> for CallableElement {}
impl Cast<dyn ConversationNodeType> for CallableElement {}
impl Cast<dyn ConversationNodeTypeMut> for CallableElement {}
impl Cast<dyn CorrelationKeyType> for CallableElement {}
impl Cast<dyn CorrelationKeyTypeMut> for CallableElement {}
impl Cast<dyn CorrelationPropertyType> for CallableElement {}
impl Cast<dyn CorrelationPropertyTypeMut> for CallableElement {}
impl Cast<dyn CorrelationPropertyBindingType> for CallableElement {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CallableElement {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CallableElement {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CallableElement {}
impl Cast<dyn CorrelationSubscriptionType> for CallableElement {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CallableElement {}
impl Cast<dyn DataAssociationType> for CallableElement {}
impl Cast<dyn DataAssociationTypeMut> for CallableElement {}
impl Cast<dyn DataInputType> for CallableElement {}
impl Cast<dyn DataInputTypeMut> for CallableElement {}
impl Cast<dyn DataInputAssociationType> for CallableElement {}
impl Cast<dyn DataInputAssociationTypeMut> for CallableElement {}
impl Cast<dyn DataObjectType> for CallableElement {}
impl Cast<dyn DataObjectTypeMut> for CallableElement {}
impl Cast<dyn DataObjectReferenceType> for CallableElement {}
impl Cast<dyn DataObjectReferenceTypeMut> for CallableElement {}
impl Cast<dyn DataOutputType> for CallableElement {}
impl Cast<dyn DataOutputTypeMut> for CallableElement {}
impl Cast<dyn DataOutputAssociationType> for CallableElement {}
impl Cast<dyn DataOutputAssociationTypeMut> for CallableElement {}
impl Cast<dyn DataStateType> for CallableElement {}
impl Cast<dyn DataStateTypeMut> for CallableElement {}
impl Cast<dyn DataStoreType> for CallableElement {}
impl Cast<dyn DataStoreTypeMut> for CallableElement {}
impl Cast<dyn DataStoreReferenceType> for CallableElement {}
impl Cast<dyn DataStoreReferenceTypeMut> for CallableElement {}
impl Cast<dyn DocumentationType> for CallableElement {}
impl Cast<dyn DocumentationTypeMut> for CallableElement {}
impl Cast<dyn EndEventType> for CallableElement {}
impl Cast<dyn EndEventTypeMut> for CallableElement {}
impl Cast<dyn EndPointType> for CallableElement {}
impl Cast<dyn EndPointTypeMut> for CallableElement {}
impl Cast<dyn ErrorType> for CallableElement {}
impl Cast<dyn ErrorTypeMut> for CallableElement {}
impl Cast<dyn ErrorEventDefinitionType> for CallableElement {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn EscalationType> for CallableElement {}
impl Cast<dyn EscalationTypeMut> for CallableElement {}
impl Cast<dyn EscalationEventDefinitionType> for CallableElement {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn EventType> for CallableElement {}
impl Cast<dyn EventTypeMut> for CallableElement {}
impl Cast<dyn EventBasedGatewayType> for CallableElement {}
impl Cast<dyn EventBasedGatewayTypeMut> for CallableElement {}
impl Cast<dyn EventDefinitionType> for CallableElement {}
impl Cast<dyn EventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn ExclusiveGatewayType> for CallableElement {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CallableElement {}
impl Cast<dyn ExpressionType> for CallableElement {}
impl Cast<dyn ExpressionTypeMut> for CallableElement {}
impl Cast<dyn ExtensionType> for CallableElement {}
impl Cast<dyn ExtensionTypeMut> for CallableElement {}
impl Cast<dyn ExtensionElementsType> for CallableElement {}
impl Cast<dyn ExtensionElementsTypeMut> for CallableElement {}
impl Cast<dyn FlowElementType> for CallableElement {}
impl Cast<dyn FlowElementTypeMut> for CallableElement {}
impl Cast<dyn FlowNodeType> for CallableElement {}
impl Cast<dyn FlowNodeTypeMut> for CallableElement {}
impl Cast<dyn FormalExpressionType> for CallableElement {}
impl Cast<dyn FormalExpressionTypeMut> for CallableElement {}
impl Cast<dyn GatewayType> for CallableElement {}
impl Cast<dyn GatewayTypeMut> for CallableElement {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CallableElement {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CallableElement {}
impl Cast<dyn GlobalChoreographyTaskType> for CallableElement {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CallableElement {}
impl Cast<dyn GlobalConversationType> for CallableElement {}
impl Cast<dyn GlobalConversationTypeMut> for CallableElement {}
impl Cast<dyn GlobalManualTaskType> for CallableElement {}
impl Cast<dyn GlobalManualTaskTypeMut> for CallableElement {}
impl Cast<dyn GlobalScriptTaskType> for CallableElement {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CallableElement {}
impl Cast<dyn GlobalTaskType> for CallableElement {}
impl Cast<dyn GlobalTaskTypeMut> for CallableElement {}
impl Cast<dyn GlobalUserTaskType> for CallableElement {}
impl Cast<dyn GlobalUserTaskTypeMut> for CallableElement {}
impl Cast<dyn GroupType> for CallableElement {}
impl Cast<dyn GroupTypeMut> for CallableElement {}
impl Cast<dyn HumanPerformerType> for CallableElement {}
impl Cast<dyn HumanPerformerTypeMut> for CallableElement {}
impl Cast<dyn ImplicitThrowEventType> for CallableElement {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CallableElement {}
impl Cast<dyn InclusiveGatewayType> for CallableElement {}
impl Cast<dyn InclusiveGatewayTypeMut> for CallableElement {}
impl Cast<dyn InputSetType> for CallableElement {}
impl Cast<dyn InputSetTypeMut> for CallableElement {}
impl Cast<dyn InterfaceType> for CallableElement {}
impl Cast<dyn InterfaceTypeMut> for CallableElement {}
impl Cast<dyn IntermediateCatchEventType> for CallableElement {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CallableElement {}
impl Cast<dyn IntermediateThrowEventType> for CallableElement {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CallableElement {}
impl Cast<dyn InputOutputBindingType> for CallableElement {}
impl Cast<dyn InputOutputBindingTypeMut> for CallableElement {}
impl Cast<dyn InputOutputSpecificationType> for CallableElement {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CallableElement {}
impl Cast<dyn ItemDefinitionType> for CallableElement {}
impl Cast<dyn ItemDefinitionTypeMut> for CallableElement {}
impl Cast<dyn LaneType> for CallableElement {}
impl Cast<dyn LaneTypeMut> for CallableElement {}
impl Cast<dyn LaneSetType> for CallableElement {}
impl Cast<dyn LaneSetTypeMut> for CallableElement {}
impl Cast<dyn LinkEventDefinitionType> for CallableElement {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn LoopCharacteristicsType> for CallableElement {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CallableElement {}
impl Cast<dyn ManualTaskType> for CallableElement {}
impl Cast<dyn ManualTaskTypeMut> for CallableElement {}
impl Cast<dyn MessageType> for CallableElement {}
impl Cast<dyn MessageTypeMut> for CallableElement {}
impl Cast<dyn MessageEventDefinitionType> for CallableElement {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn MessageFlowType> for CallableElement {}
impl Cast<dyn MessageFlowTypeMut> for CallableElement {}
impl Cast<dyn MessageFlowAssociationType> for CallableElement {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CallableElement {}
impl Cast<dyn MonitoringType> for CallableElement {}
impl Cast<dyn MonitoringTypeMut> for CallableElement {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CallableElement {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CallableElement {}
impl Cast<dyn OperationType> for CallableElement {}
impl Cast<dyn OperationTypeMut> for CallableElement {}
impl Cast<dyn OutputSetType> for CallableElement {}
impl Cast<dyn OutputSetTypeMut> for CallableElement {}
impl Cast<dyn ParallelGatewayType> for CallableElement {}
impl Cast<dyn ParallelGatewayTypeMut> for CallableElement {}
impl Cast<dyn ParticipantType> for CallableElement {}
impl Cast<dyn ParticipantTypeMut> for CallableElement {}
impl Cast<dyn ParticipantAssociationType> for CallableElement {}
impl Cast<dyn ParticipantAssociationTypeMut> for CallableElement {}
impl Cast<dyn ParticipantMultiplicityType> for CallableElement {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CallableElement {}
impl Cast<dyn PartnerEntityType> for CallableElement {}
impl Cast<dyn PartnerEntityTypeMut> for CallableElement {}
impl Cast<dyn PartnerRoleType> for CallableElement {}
impl Cast<dyn PartnerRoleTypeMut> for CallableElement {}
impl Cast<dyn PerformerType> for CallableElement {}
impl Cast<dyn PerformerTypeMut> for CallableElement {}
impl Cast<dyn PotentialOwnerType> for CallableElement {}
impl Cast<dyn PotentialOwnerTypeMut> for CallableElement {}
impl Cast<dyn ProcessType> for CallableElement {}
impl Cast<dyn ProcessTypeMut> for CallableElement {}
impl Cast<dyn PropertyType> for CallableElement {}
impl Cast<dyn PropertyTypeMut> for CallableElement {}
impl Cast<dyn ReceiveTaskType> for CallableElement {}
impl Cast<dyn ReceiveTaskTypeMut> for CallableElement {}
impl Cast<dyn RelationshipType> for CallableElement {}
impl Cast<dyn RelationshipTypeMut> for CallableElement {}
impl Cast<dyn RenderingType> for CallableElement {}
impl Cast<dyn RenderingTypeMut> for CallableElement {}
impl Cast<dyn ResourceType> for CallableElement {}
impl Cast<dyn ResourceTypeMut> for CallableElement {}
impl Cast<dyn ResourceAssignmentExpressionType> for CallableElement {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CallableElement {}
impl Cast<dyn ResourceParameterType> for CallableElement {}
impl Cast<dyn ResourceParameterTypeMut> for CallableElement {}
impl Cast<dyn ResourceParameterBindingType> for CallableElement {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CallableElement {}
impl Cast<dyn ResourceRoleType> for CallableElement {}
impl Cast<dyn ResourceRoleTypeMut> for CallableElement {}
impl Cast<dyn RootElementType> for CallableElement {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for CallableElement {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for CallableElement {}
impl Cast<dyn ScriptTaskTypeMut> for CallableElement {}
impl Cast<dyn ScriptType> for CallableElement {}
impl Cast<dyn ScriptTypeMut> for CallableElement {}
impl Cast<dyn SendTaskType> for CallableElement {}
impl Cast<dyn SendTaskTypeMut> for CallableElement {}
impl Cast<dyn SequenceFlowType> for CallableElement {}
impl Cast<dyn SequenceFlowTypeMut> for CallableElement {}
impl Cast<dyn ServiceTaskType> for CallableElement {}
impl Cast<dyn ServiceTaskTypeMut> for CallableElement {}
impl Cast<dyn SignalType> for CallableElement {}
impl Cast<dyn SignalTypeMut> for CallableElement {}
impl Cast<dyn SignalEventDefinitionType> for CallableElement {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn StandardLoopCharacteristicsType> for CallableElement {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CallableElement {}
impl Cast<dyn StartEventType> for CallableElement {}
impl Cast<dyn StartEventTypeMut> for CallableElement {}
impl Cast<dyn SubChoreographyType> for CallableElement {}
impl Cast<dyn SubChoreographyTypeMut> for CallableElement {}
impl Cast<dyn SubConversationType> for CallableElement {}
impl Cast<dyn SubConversationTypeMut> for CallableElement {}
impl Cast<dyn SubProcessType> for CallableElement {}
impl Cast<dyn SubProcessTypeMut> for CallableElement {}
impl Cast<dyn TaskType> for CallableElement {}
impl Cast<dyn TaskTypeMut> for CallableElement {}
impl Cast<dyn TerminateEventDefinitionType> for CallableElement {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn TextAnnotationType> for CallableElement {}
impl Cast<dyn TextAnnotationTypeMut> for CallableElement {}
impl Cast<dyn TextType> for CallableElement {}
impl Cast<dyn TextTypeMut> for CallableElement {}
impl Cast<dyn ThrowEventType> for CallableElement {}
impl Cast<dyn ThrowEventTypeMut> for CallableElement {}
impl Cast<dyn TimerEventDefinitionType> for CallableElement {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CallableElement {}
impl Cast<dyn TransactionType> for CallableElement {}
impl Cast<dyn TransactionTypeMut> for CallableElement {}
impl Cast<dyn UserTaskType> for CallableElement {}
impl Cast<dyn UserTaskTypeMut> for CallableElement {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:callActivity")]
pub struct CallActivity {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "calledElement")]
    #[tia("CallActivityType",rg*="called_element","CallActivityTypeMut",s)]
    pub called_element: Option<String>,
}
impl DocumentElement for CallActivity {
    fn element(&self) -> Element {
        Element::CallActivity
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CallActivity {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `callActivity`
pub trait CallActivityType: ActivityType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `calledElement`
    fn called_element(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(CallActivityType);
impl_downcast!(CallActivityType);
/// Mutable access to `callActivity`
pub trait CallActivityTypeMut:
    ActivityTypeMut + Downcast + Debug + Send + DynClone + CallActivityType
{
    /// Set value of attribute `calledElement`
    fn set_called_element(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(CallActivityTypeMut);
impl_downcast!(CallActivityTypeMut);
impl Cast<dyn DefinitionsType> for CallActivity {}
impl Cast<dyn DefinitionsTypeMut> for CallActivity {}
impl Cast<dyn ImportType> for CallActivity {}
impl Cast<dyn ImportTypeMut> for CallActivity {}
impl Cast<dyn ActivityType> for CallActivity {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for CallActivity {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for CallActivity {}
impl Cast<dyn AdHocSubProcessTypeMut> for CallActivity {}
impl Cast<dyn ArtifactType> for CallActivity {}
impl Cast<dyn ArtifactTypeMut> for CallActivity {}
impl Cast<dyn AssignmentType> for CallActivity {}
impl Cast<dyn AssignmentTypeMut> for CallActivity {}
impl Cast<dyn AssociationType> for CallActivity {}
impl Cast<dyn AssociationTypeMut> for CallActivity {}
impl Cast<dyn AuditingType> for CallActivity {}
impl Cast<dyn AuditingTypeMut> for CallActivity {}
impl Cast<dyn BaseElementType> for CallActivity {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CallActivity {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CallActivity {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CallActivity {}
impl Cast<dyn BoundaryEventType> for CallActivity {}
impl Cast<dyn BoundaryEventTypeMut> for CallActivity {}
impl Cast<dyn BusinessRuleTaskType> for CallActivity {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CallActivity {}
impl Cast<dyn CallableElementType> for CallActivity {}
impl Cast<dyn CallableElementTypeMut> for CallActivity {}
impl Cast<dyn CallActivityType> for CallActivity {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityTypeMut> for CallActivity {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallChoreographyType> for CallActivity {}
impl Cast<dyn CallChoreographyTypeMut> for CallActivity {}
impl Cast<dyn CallConversationType> for CallActivity {}
impl Cast<dyn CallConversationTypeMut> for CallActivity {}
impl Cast<dyn CancelEventDefinitionType> for CallActivity {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn CatchEventType> for CallActivity {}
impl Cast<dyn CatchEventTypeMut> for CallActivity {}
impl Cast<dyn CategoryType> for CallActivity {}
impl Cast<dyn CategoryTypeMut> for CallActivity {}
impl Cast<dyn CategoryValueType> for CallActivity {}
impl Cast<dyn CategoryValueTypeMut> for CallActivity {}
impl Cast<dyn ChoreographyType> for CallActivity {}
impl Cast<dyn ChoreographyTypeMut> for CallActivity {}
impl Cast<dyn ChoreographyActivityType> for CallActivity {}
impl Cast<dyn ChoreographyActivityTypeMut> for CallActivity {}
impl Cast<dyn ChoreographyTaskType> for CallActivity {}
impl Cast<dyn ChoreographyTaskTypeMut> for CallActivity {}
impl Cast<dyn CollaborationType> for CallActivity {}
impl Cast<dyn CollaborationTypeMut> for CallActivity {}
impl Cast<dyn CompensateEventDefinitionType> for CallActivity {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CallActivity {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CallActivity {}
impl Cast<dyn ComplexGatewayType> for CallActivity {}
impl Cast<dyn ComplexGatewayTypeMut> for CallActivity {}
impl Cast<dyn ConditionalEventDefinitionType> for CallActivity {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn ConversationType> for CallActivity {}
impl Cast<dyn ConversationTypeMut> for CallActivity {}
impl Cast<dyn ConversationAssociationType> for CallActivity {}
impl Cast<dyn ConversationAssociationTypeMut> for CallActivity {}
impl Cast<dyn ConversationLinkType> for CallActivity {}
impl Cast<dyn ConversationLinkTypeMut> for CallActivity {}
impl Cast<dyn ConversationNodeType> for CallActivity {}
impl Cast<dyn ConversationNodeTypeMut> for CallActivity {}
impl Cast<dyn CorrelationKeyType> for CallActivity {}
impl Cast<dyn CorrelationKeyTypeMut> for CallActivity {}
impl Cast<dyn CorrelationPropertyType> for CallActivity {}
impl Cast<dyn CorrelationPropertyTypeMut> for CallActivity {}
impl Cast<dyn CorrelationPropertyBindingType> for CallActivity {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CallActivity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CallActivity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CallActivity {}
impl Cast<dyn CorrelationSubscriptionType> for CallActivity {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CallActivity {}
impl Cast<dyn DataAssociationType> for CallActivity {}
impl Cast<dyn DataAssociationTypeMut> for CallActivity {}
impl Cast<dyn DataInputType> for CallActivity {}
impl Cast<dyn DataInputTypeMut> for CallActivity {}
impl Cast<dyn DataInputAssociationType> for CallActivity {}
impl Cast<dyn DataInputAssociationTypeMut> for CallActivity {}
impl Cast<dyn DataObjectType> for CallActivity {}
impl Cast<dyn DataObjectTypeMut> for CallActivity {}
impl Cast<dyn DataObjectReferenceType> for CallActivity {}
impl Cast<dyn DataObjectReferenceTypeMut> for CallActivity {}
impl Cast<dyn DataOutputType> for CallActivity {}
impl Cast<dyn DataOutputTypeMut> for CallActivity {}
impl Cast<dyn DataOutputAssociationType> for CallActivity {}
impl Cast<dyn DataOutputAssociationTypeMut> for CallActivity {}
impl Cast<dyn DataStateType> for CallActivity {}
impl Cast<dyn DataStateTypeMut> for CallActivity {}
impl Cast<dyn DataStoreType> for CallActivity {}
impl Cast<dyn DataStoreTypeMut> for CallActivity {}
impl Cast<dyn DataStoreReferenceType> for CallActivity {}
impl Cast<dyn DataStoreReferenceTypeMut> for CallActivity {}
impl Cast<dyn DocumentationType> for CallActivity {}
impl Cast<dyn DocumentationTypeMut> for CallActivity {}
impl Cast<dyn EndEventType> for CallActivity {}
impl Cast<dyn EndEventTypeMut> for CallActivity {}
impl Cast<dyn EndPointType> for CallActivity {}
impl Cast<dyn EndPointTypeMut> for CallActivity {}
impl Cast<dyn ErrorType> for CallActivity {}
impl Cast<dyn ErrorTypeMut> for CallActivity {}
impl Cast<dyn ErrorEventDefinitionType> for CallActivity {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn EscalationType> for CallActivity {}
impl Cast<dyn EscalationTypeMut> for CallActivity {}
impl Cast<dyn EscalationEventDefinitionType> for CallActivity {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn EventType> for CallActivity {}
impl Cast<dyn EventTypeMut> for CallActivity {}
impl Cast<dyn EventBasedGatewayType> for CallActivity {}
impl Cast<dyn EventBasedGatewayTypeMut> for CallActivity {}
impl Cast<dyn EventDefinitionType> for CallActivity {}
impl Cast<dyn EventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn ExclusiveGatewayType> for CallActivity {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CallActivity {}
impl Cast<dyn ExpressionType> for CallActivity {}
impl Cast<dyn ExpressionTypeMut> for CallActivity {}
impl Cast<dyn ExtensionType> for CallActivity {}
impl Cast<dyn ExtensionTypeMut> for CallActivity {}
impl Cast<dyn ExtensionElementsType> for CallActivity {}
impl Cast<dyn ExtensionElementsTypeMut> for CallActivity {}
impl Cast<dyn FlowElementType> for CallActivity {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for CallActivity {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for CallActivity {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for CallActivity {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for CallActivity {}
impl Cast<dyn FormalExpressionTypeMut> for CallActivity {}
impl Cast<dyn GatewayType> for CallActivity {}
impl Cast<dyn GatewayTypeMut> for CallActivity {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CallActivity {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CallActivity {}
impl Cast<dyn GlobalChoreographyTaskType> for CallActivity {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CallActivity {}
impl Cast<dyn GlobalConversationType> for CallActivity {}
impl Cast<dyn GlobalConversationTypeMut> for CallActivity {}
impl Cast<dyn GlobalManualTaskType> for CallActivity {}
impl Cast<dyn GlobalManualTaskTypeMut> for CallActivity {}
impl Cast<dyn GlobalScriptTaskType> for CallActivity {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CallActivity {}
impl Cast<dyn GlobalTaskType> for CallActivity {}
impl Cast<dyn GlobalTaskTypeMut> for CallActivity {}
impl Cast<dyn GlobalUserTaskType> for CallActivity {}
impl Cast<dyn GlobalUserTaskTypeMut> for CallActivity {}
impl Cast<dyn GroupType> for CallActivity {}
impl Cast<dyn GroupTypeMut> for CallActivity {}
impl Cast<dyn HumanPerformerType> for CallActivity {}
impl Cast<dyn HumanPerformerTypeMut> for CallActivity {}
impl Cast<dyn ImplicitThrowEventType> for CallActivity {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CallActivity {}
impl Cast<dyn InclusiveGatewayType> for CallActivity {}
impl Cast<dyn InclusiveGatewayTypeMut> for CallActivity {}
impl Cast<dyn InputSetType> for CallActivity {}
impl Cast<dyn InputSetTypeMut> for CallActivity {}
impl Cast<dyn InterfaceType> for CallActivity {}
impl Cast<dyn InterfaceTypeMut> for CallActivity {}
impl Cast<dyn IntermediateCatchEventType> for CallActivity {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CallActivity {}
impl Cast<dyn IntermediateThrowEventType> for CallActivity {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CallActivity {}
impl Cast<dyn InputOutputBindingType> for CallActivity {}
impl Cast<dyn InputOutputBindingTypeMut> for CallActivity {}
impl Cast<dyn InputOutputSpecificationType> for CallActivity {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CallActivity {}
impl Cast<dyn ItemDefinitionType> for CallActivity {}
impl Cast<dyn ItemDefinitionTypeMut> for CallActivity {}
impl Cast<dyn LaneType> for CallActivity {}
impl Cast<dyn LaneTypeMut> for CallActivity {}
impl Cast<dyn LaneSetType> for CallActivity {}
impl Cast<dyn LaneSetTypeMut> for CallActivity {}
impl Cast<dyn LinkEventDefinitionType> for CallActivity {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn LoopCharacteristicsType> for CallActivity {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CallActivity {}
impl Cast<dyn ManualTaskType> for CallActivity {}
impl Cast<dyn ManualTaskTypeMut> for CallActivity {}
impl Cast<dyn MessageType> for CallActivity {}
impl Cast<dyn MessageTypeMut> for CallActivity {}
impl Cast<dyn MessageEventDefinitionType> for CallActivity {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn MessageFlowType> for CallActivity {}
impl Cast<dyn MessageFlowTypeMut> for CallActivity {}
impl Cast<dyn MessageFlowAssociationType> for CallActivity {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CallActivity {}
impl Cast<dyn MonitoringType> for CallActivity {}
impl Cast<dyn MonitoringTypeMut> for CallActivity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CallActivity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CallActivity {}
impl Cast<dyn OperationType> for CallActivity {}
impl Cast<dyn OperationTypeMut> for CallActivity {}
impl Cast<dyn OutputSetType> for CallActivity {}
impl Cast<dyn OutputSetTypeMut> for CallActivity {}
impl Cast<dyn ParallelGatewayType> for CallActivity {}
impl Cast<dyn ParallelGatewayTypeMut> for CallActivity {}
impl Cast<dyn ParticipantType> for CallActivity {}
impl Cast<dyn ParticipantTypeMut> for CallActivity {}
impl Cast<dyn ParticipantAssociationType> for CallActivity {}
impl Cast<dyn ParticipantAssociationTypeMut> for CallActivity {}
impl Cast<dyn ParticipantMultiplicityType> for CallActivity {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CallActivity {}
impl Cast<dyn PartnerEntityType> for CallActivity {}
impl Cast<dyn PartnerEntityTypeMut> for CallActivity {}
impl Cast<dyn PartnerRoleType> for CallActivity {}
impl Cast<dyn PartnerRoleTypeMut> for CallActivity {}
impl Cast<dyn PerformerType> for CallActivity {}
impl Cast<dyn PerformerTypeMut> for CallActivity {}
impl Cast<dyn PotentialOwnerType> for CallActivity {}
impl Cast<dyn PotentialOwnerTypeMut> for CallActivity {}
impl Cast<dyn ProcessType> for CallActivity {}
impl Cast<dyn ProcessTypeMut> for CallActivity {}
impl Cast<dyn PropertyType> for CallActivity {}
impl Cast<dyn PropertyTypeMut> for CallActivity {}
impl Cast<dyn ReceiveTaskType> for CallActivity {}
impl Cast<dyn ReceiveTaskTypeMut> for CallActivity {}
impl Cast<dyn RelationshipType> for CallActivity {}
impl Cast<dyn RelationshipTypeMut> for CallActivity {}
impl Cast<dyn RenderingType> for CallActivity {}
impl Cast<dyn RenderingTypeMut> for CallActivity {}
impl Cast<dyn ResourceType> for CallActivity {}
impl Cast<dyn ResourceTypeMut> for CallActivity {}
impl Cast<dyn ResourceAssignmentExpressionType> for CallActivity {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CallActivity {}
impl Cast<dyn ResourceParameterType> for CallActivity {}
impl Cast<dyn ResourceParameterTypeMut> for CallActivity {}
impl Cast<dyn ResourceParameterBindingType> for CallActivity {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CallActivity {}
impl Cast<dyn ResourceRoleType> for CallActivity {}
impl Cast<dyn ResourceRoleTypeMut> for CallActivity {}
impl Cast<dyn RootElementType> for CallActivity {}
impl Cast<dyn RootElementTypeMut> for CallActivity {}
impl Cast<dyn ScriptTaskType> for CallActivity {}
impl Cast<dyn ScriptTaskTypeMut> for CallActivity {}
impl Cast<dyn ScriptType> for CallActivity {}
impl Cast<dyn ScriptTypeMut> for CallActivity {}
impl Cast<dyn SendTaskType> for CallActivity {}
impl Cast<dyn SendTaskTypeMut> for CallActivity {}
impl Cast<dyn SequenceFlowType> for CallActivity {}
impl Cast<dyn SequenceFlowTypeMut> for CallActivity {}
impl Cast<dyn ServiceTaskType> for CallActivity {}
impl Cast<dyn ServiceTaskTypeMut> for CallActivity {}
impl Cast<dyn SignalType> for CallActivity {}
impl Cast<dyn SignalTypeMut> for CallActivity {}
impl Cast<dyn SignalEventDefinitionType> for CallActivity {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn StandardLoopCharacteristicsType> for CallActivity {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CallActivity {}
impl Cast<dyn StartEventType> for CallActivity {}
impl Cast<dyn StartEventTypeMut> for CallActivity {}
impl Cast<dyn SubChoreographyType> for CallActivity {}
impl Cast<dyn SubChoreographyTypeMut> for CallActivity {}
impl Cast<dyn SubConversationType> for CallActivity {}
impl Cast<dyn SubConversationTypeMut> for CallActivity {}
impl Cast<dyn SubProcessType> for CallActivity {}
impl Cast<dyn SubProcessTypeMut> for CallActivity {}
impl Cast<dyn TaskType> for CallActivity {}
impl Cast<dyn TaskTypeMut> for CallActivity {}
impl Cast<dyn TerminateEventDefinitionType> for CallActivity {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn TextAnnotationType> for CallActivity {}
impl Cast<dyn TextAnnotationTypeMut> for CallActivity {}
impl Cast<dyn TextType> for CallActivity {}
impl Cast<dyn TextTypeMut> for CallActivity {}
impl Cast<dyn ThrowEventType> for CallActivity {}
impl Cast<dyn ThrowEventTypeMut> for CallActivity {}
impl Cast<dyn TimerEventDefinitionType> for CallActivity {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CallActivity {}
impl Cast<dyn TransactionType> for CallActivity {}
impl Cast<dyn TransactionTypeMut> for CallActivity {}
impl Cast<dyn UserTaskType> for CallActivity {}
impl Cast<dyn UserTaskTypeMut> for CallActivity {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:callChoreography")]
pub struct CallChoreography {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "initiatingParticipantRef")]
    #[tia("ChoreographyActivityType",rg*="initiating_participant_ref","ChoreographyActivityTypeMut",s)]
    pub initiating_participant_ref: String,
    #[xml(attr = "loopType")]
    #[tia("ChoreographyActivityType",rg*="loop_type","ChoreographyActivityTypeMut",s)]
    pub loop_type: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ChoreographyActivityType",rg*="participant_refs","ChoreographyActivityTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ChoreographyActivityType",rg*="correlation_keys","ChoreographyActivityTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(attr = "calledChoreographyRef")]
    #[tia("CallChoreographyType",rg*="called_choreography_ref","CallChoreographyTypeMut",s)]
    pub called_choreography_ref: Option<String>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CallChoreographyType",rg*="participant_associations","CallChoreographyTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
}
impl DocumentElement for CallChoreography {
    fn element(&self) -> Element {
        Element::CallChoreography
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CallChoreography {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_associations.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_associations.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `callChoreography`
pub trait CallChoreographyType:
    ChoreographyActivityType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `calledChoreographyRef`
    fn called_choreography_ref(&self) -> &Option<String>;
    /// Get value of `participantAssociation` child
    fn participant_associations(&self) -> &Vec<ParticipantAssociation>;
}
dyn_clone::clone_trait_object!(CallChoreographyType);
impl_downcast!(CallChoreographyType);
/// Mutable access to `callChoreography`
pub trait CallChoreographyTypeMut:
    ChoreographyActivityTypeMut + Downcast + Debug + Send + DynClone + CallChoreographyType
{
    /// Set value of attribute `calledChoreographyRef`
    fn set_called_choreography_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `participantAssociation` child
    fn participant_associations_mut(&mut self) -> &mut Vec<ParticipantAssociation>;
    /// Set value of `participantAssociation` child
    fn set_participant_associations(&mut self, value: Vec<ParticipantAssociation>);
}
dyn_clone::clone_trait_object!(CallChoreographyTypeMut);
impl_downcast!(CallChoreographyTypeMut);
impl Cast<dyn DefinitionsType> for CallChoreography {}
impl Cast<dyn DefinitionsTypeMut> for CallChoreography {}
impl Cast<dyn ImportType> for CallChoreography {}
impl Cast<dyn ImportTypeMut> for CallChoreography {}
impl Cast<dyn ActivityType> for CallChoreography {}
impl Cast<dyn ActivityTypeMut> for CallChoreography {}
impl Cast<dyn AdHocSubProcessType> for CallChoreography {}
impl Cast<dyn AdHocSubProcessTypeMut> for CallChoreography {}
impl Cast<dyn ArtifactType> for CallChoreography {}
impl Cast<dyn ArtifactTypeMut> for CallChoreography {}
impl Cast<dyn AssignmentType> for CallChoreography {}
impl Cast<dyn AssignmentTypeMut> for CallChoreography {}
impl Cast<dyn AssociationType> for CallChoreography {}
impl Cast<dyn AssociationTypeMut> for CallChoreography {}
impl Cast<dyn AuditingType> for CallChoreography {}
impl Cast<dyn AuditingTypeMut> for CallChoreography {}
impl Cast<dyn BaseElementType> for CallChoreography {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CallChoreography {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CallChoreography {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CallChoreography {}
impl Cast<dyn BoundaryEventType> for CallChoreography {}
impl Cast<dyn BoundaryEventTypeMut> for CallChoreography {}
impl Cast<dyn BusinessRuleTaskType> for CallChoreography {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CallChoreography {}
impl Cast<dyn CallableElementType> for CallChoreography {}
impl Cast<dyn CallableElementTypeMut> for CallChoreography {}
impl Cast<dyn CallActivityType> for CallChoreography {}
impl Cast<dyn CallActivityTypeMut> for CallChoreography {}
impl Cast<dyn CallChoreographyType> for CallChoreography {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallChoreographyTypeMut> for CallChoreography {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallConversationType> for CallChoreography {}
impl Cast<dyn CallConversationTypeMut> for CallChoreography {}
impl Cast<dyn CancelEventDefinitionType> for CallChoreography {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn CatchEventType> for CallChoreography {}
impl Cast<dyn CatchEventTypeMut> for CallChoreography {}
impl Cast<dyn CategoryType> for CallChoreography {}
impl Cast<dyn CategoryTypeMut> for CallChoreography {}
impl Cast<dyn CategoryValueType> for CallChoreography {}
impl Cast<dyn CategoryValueTypeMut> for CallChoreography {}
impl Cast<dyn ChoreographyType> for CallChoreography {}
impl Cast<dyn ChoreographyTypeMut> for CallChoreography {}
impl Cast<dyn ChoreographyActivityType> for CallChoreography {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for CallChoreography {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTaskType> for CallChoreography {}
impl Cast<dyn ChoreographyTaskTypeMut> for CallChoreography {}
impl Cast<dyn CollaborationType> for CallChoreography {}
impl Cast<dyn CollaborationTypeMut> for CallChoreography {}
impl Cast<dyn CompensateEventDefinitionType> for CallChoreography {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CallChoreography {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn ComplexGatewayType> for CallChoreography {}
impl Cast<dyn ComplexGatewayTypeMut> for CallChoreography {}
impl Cast<dyn ConditionalEventDefinitionType> for CallChoreography {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn ConversationType> for CallChoreography {}
impl Cast<dyn ConversationTypeMut> for CallChoreography {}
impl Cast<dyn ConversationAssociationType> for CallChoreography {}
impl Cast<dyn ConversationAssociationTypeMut> for CallChoreography {}
impl Cast<dyn ConversationLinkType> for CallChoreography {}
impl Cast<dyn ConversationLinkTypeMut> for CallChoreography {}
impl Cast<dyn ConversationNodeType> for CallChoreography {}
impl Cast<dyn ConversationNodeTypeMut> for CallChoreography {}
impl Cast<dyn CorrelationKeyType> for CallChoreography {}
impl Cast<dyn CorrelationKeyTypeMut> for CallChoreography {}
impl Cast<dyn CorrelationPropertyType> for CallChoreography {}
impl Cast<dyn CorrelationPropertyTypeMut> for CallChoreography {}
impl Cast<dyn CorrelationPropertyBindingType> for CallChoreography {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CallChoreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CallChoreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CallChoreography {}
impl Cast<dyn CorrelationSubscriptionType> for CallChoreography {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CallChoreography {}
impl Cast<dyn DataAssociationType> for CallChoreography {}
impl Cast<dyn DataAssociationTypeMut> for CallChoreography {}
impl Cast<dyn DataInputType> for CallChoreography {}
impl Cast<dyn DataInputTypeMut> for CallChoreography {}
impl Cast<dyn DataInputAssociationType> for CallChoreography {}
impl Cast<dyn DataInputAssociationTypeMut> for CallChoreography {}
impl Cast<dyn DataObjectType> for CallChoreography {}
impl Cast<dyn DataObjectTypeMut> for CallChoreography {}
impl Cast<dyn DataObjectReferenceType> for CallChoreography {}
impl Cast<dyn DataObjectReferenceTypeMut> for CallChoreography {}
impl Cast<dyn DataOutputType> for CallChoreography {}
impl Cast<dyn DataOutputTypeMut> for CallChoreography {}
impl Cast<dyn DataOutputAssociationType> for CallChoreography {}
impl Cast<dyn DataOutputAssociationTypeMut> for CallChoreography {}
impl Cast<dyn DataStateType> for CallChoreography {}
impl Cast<dyn DataStateTypeMut> for CallChoreography {}
impl Cast<dyn DataStoreType> for CallChoreography {}
impl Cast<dyn DataStoreTypeMut> for CallChoreography {}
impl Cast<dyn DataStoreReferenceType> for CallChoreography {}
impl Cast<dyn DataStoreReferenceTypeMut> for CallChoreography {}
impl Cast<dyn DocumentationType> for CallChoreography {}
impl Cast<dyn DocumentationTypeMut> for CallChoreography {}
impl Cast<dyn EndEventType> for CallChoreography {}
impl Cast<dyn EndEventTypeMut> for CallChoreography {}
impl Cast<dyn EndPointType> for CallChoreography {}
impl Cast<dyn EndPointTypeMut> for CallChoreography {}
impl Cast<dyn ErrorType> for CallChoreography {}
impl Cast<dyn ErrorTypeMut> for CallChoreography {}
impl Cast<dyn ErrorEventDefinitionType> for CallChoreography {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn EscalationType> for CallChoreography {}
impl Cast<dyn EscalationTypeMut> for CallChoreography {}
impl Cast<dyn EscalationEventDefinitionType> for CallChoreography {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn EventType> for CallChoreography {}
impl Cast<dyn EventTypeMut> for CallChoreography {}
impl Cast<dyn EventBasedGatewayType> for CallChoreography {}
impl Cast<dyn EventBasedGatewayTypeMut> for CallChoreography {}
impl Cast<dyn EventDefinitionType> for CallChoreography {}
impl Cast<dyn EventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn ExclusiveGatewayType> for CallChoreography {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CallChoreography {}
impl Cast<dyn ExpressionType> for CallChoreography {}
impl Cast<dyn ExpressionTypeMut> for CallChoreography {}
impl Cast<dyn ExtensionType> for CallChoreography {}
impl Cast<dyn ExtensionTypeMut> for CallChoreography {}
impl Cast<dyn ExtensionElementsType> for CallChoreography {}
impl Cast<dyn ExtensionElementsTypeMut> for CallChoreography {}
impl Cast<dyn FlowElementType> for CallChoreography {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for CallChoreography {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for CallChoreography {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for CallChoreography {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for CallChoreography {}
impl Cast<dyn FormalExpressionTypeMut> for CallChoreography {}
impl Cast<dyn GatewayType> for CallChoreography {}
impl Cast<dyn GatewayTypeMut> for CallChoreography {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CallChoreography {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CallChoreography {}
impl Cast<dyn GlobalChoreographyTaskType> for CallChoreography {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CallChoreography {}
impl Cast<dyn GlobalConversationType> for CallChoreography {}
impl Cast<dyn GlobalConversationTypeMut> for CallChoreography {}
impl Cast<dyn GlobalManualTaskType> for CallChoreography {}
impl Cast<dyn GlobalManualTaskTypeMut> for CallChoreography {}
impl Cast<dyn GlobalScriptTaskType> for CallChoreography {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CallChoreography {}
impl Cast<dyn GlobalTaskType> for CallChoreography {}
impl Cast<dyn GlobalTaskTypeMut> for CallChoreography {}
impl Cast<dyn GlobalUserTaskType> for CallChoreography {}
impl Cast<dyn GlobalUserTaskTypeMut> for CallChoreography {}
impl Cast<dyn GroupType> for CallChoreography {}
impl Cast<dyn GroupTypeMut> for CallChoreography {}
impl Cast<dyn HumanPerformerType> for CallChoreography {}
impl Cast<dyn HumanPerformerTypeMut> for CallChoreography {}
impl Cast<dyn ImplicitThrowEventType> for CallChoreography {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CallChoreography {}
impl Cast<dyn InclusiveGatewayType> for CallChoreography {}
impl Cast<dyn InclusiveGatewayTypeMut> for CallChoreography {}
impl Cast<dyn InputSetType> for CallChoreography {}
impl Cast<dyn InputSetTypeMut> for CallChoreography {}
impl Cast<dyn InterfaceType> for CallChoreography {}
impl Cast<dyn InterfaceTypeMut> for CallChoreography {}
impl Cast<dyn IntermediateCatchEventType> for CallChoreography {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CallChoreography {}
impl Cast<dyn IntermediateThrowEventType> for CallChoreography {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CallChoreography {}
impl Cast<dyn InputOutputBindingType> for CallChoreography {}
impl Cast<dyn InputOutputBindingTypeMut> for CallChoreography {}
impl Cast<dyn InputOutputSpecificationType> for CallChoreography {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CallChoreography {}
impl Cast<dyn ItemDefinitionType> for CallChoreography {}
impl Cast<dyn ItemDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn LaneType> for CallChoreography {}
impl Cast<dyn LaneTypeMut> for CallChoreography {}
impl Cast<dyn LaneSetType> for CallChoreography {}
impl Cast<dyn LaneSetTypeMut> for CallChoreography {}
impl Cast<dyn LinkEventDefinitionType> for CallChoreography {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn LoopCharacteristicsType> for CallChoreography {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CallChoreography {}
impl Cast<dyn ManualTaskType> for CallChoreography {}
impl Cast<dyn ManualTaskTypeMut> for CallChoreography {}
impl Cast<dyn MessageType> for CallChoreography {}
impl Cast<dyn MessageTypeMut> for CallChoreography {}
impl Cast<dyn MessageEventDefinitionType> for CallChoreography {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn MessageFlowType> for CallChoreography {}
impl Cast<dyn MessageFlowTypeMut> for CallChoreography {}
impl Cast<dyn MessageFlowAssociationType> for CallChoreography {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CallChoreography {}
impl Cast<dyn MonitoringType> for CallChoreography {}
impl Cast<dyn MonitoringTypeMut> for CallChoreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CallChoreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CallChoreography {}
impl Cast<dyn OperationType> for CallChoreography {}
impl Cast<dyn OperationTypeMut> for CallChoreography {}
impl Cast<dyn OutputSetType> for CallChoreography {}
impl Cast<dyn OutputSetTypeMut> for CallChoreography {}
impl Cast<dyn ParallelGatewayType> for CallChoreography {}
impl Cast<dyn ParallelGatewayTypeMut> for CallChoreography {}
impl Cast<dyn ParticipantType> for CallChoreography {}
impl Cast<dyn ParticipantTypeMut> for CallChoreography {}
impl Cast<dyn ParticipantAssociationType> for CallChoreography {}
impl Cast<dyn ParticipantAssociationTypeMut> for CallChoreography {}
impl Cast<dyn ParticipantMultiplicityType> for CallChoreography {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CallChoreography {}
impl Cast<dyn PartnerEntityType> for CallChoreography {}
impl Cast<dyn PartnerEntityTypeMut> for CallChoreography {}
impl Cast<dyn PartnerRoleType> for CallChoreography {}
impl Cast<dyn PartnerRoleTypeMut> for CallChoreography {}
impl Cast<dyn PerformerType> for CallChoreography {}
impl Cast<dyn PerformerTypeMut> for CallChoreography {}
impl Cast<dyn PotentialOwnerType> for CallChoreography {}
impl Cast<dyn PotentialOwnerTypeMut> for CallChoreography {}
impl Cast<dyn ProcessType> for CallChoreography {}
impl Cast<dyn ProcessTypeMut> for CallChoreography {}
impl Cast<dyn PropertyType> for CallChoreography {}
impl Cast<dyn PropertyTypeMut> for CallChoreography {}
impl Cast<dyn ReceiveTaskType> for CallChoreography {}
impl Cast<dyn ReceiveTaskTypeMut> for CallChoreography {}
impl Cast<dyn RelationshipType> for CallChoreography {}
impl Cast<dyn RelationshipTypeMut> for CallChoreography {}
impl Cast<dyn RenderingType> for CallChoreography {}
impl Cast<dyn RenderingTypeMut> for CallChoreography {}
impl Cast<dyn ResourceType> for CallChoreography {}
impl Cast<dyn ResourceTypeMut> for CallChoreography {}
impl Cast<dyn ResourceAssignmentExpressionType> for CallChoreography {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CallChoreography {}
impl Cast<dyn ResourceParameterType> for CallChoreography {}
impl Cast<dyn ResourceParameterTypeMut> for CallChoreography {}
impl Cast<dyn ResourceParameterBindingType> for CallChoreography {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CallChoreography {}
impl Cast<dyn ResourceRoleType> for CallChoreography {}
impl Cast<dyn ResourceRoleTypeMut> for CallChoreography {}
impl Cast<dyn RootElementType> for CallChoreography {}
impl Cast<dyn RootElementTypeMut> for CallChoreography {}
impl Cast<dyn ScriptTaskType> for CallChoreography {}
impl Cast<dyn ScriptTaskTypeMut> for CallChoreography {}
impl Cast<dyn ScriptType> for CallChoreography {}
impl Cast<dyn ScriptTypeMut> for CallChoreography {}
impl Cast<dyn SendTaskType> for CallChoreography {}
impl Cast<dyn SendTaskTypeMut> for CallChoreography {}
impl Cast<dyn SequenceFlowType> for CallChoreography {}
impl Cast<dyn SequenceFlowTypeMut> for CallChoreography {}
impl Cast<dyn ServiceTaskType> for CallChoreography {}
impl Cast<dyn ServiceTaskTypeMut> for CallChoreography {}
impl Cast<dyn SignalType> for CallChoreography {}
impl Cast<dyn SignalTypeMut> for CallChoreography {}
impl Cast<dyn SignalEventDefinitionType> for CallChoreography {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn StandardLoopCharacteristicsType> for CallChoreography {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CallChoreography {}
impl Cast<dyn StartEventType> for CallChoreography {}
impl Cast<dyn StartEventTypeMut> for CallChoreography {}
impl Cast<dyn SubChoreographyType> for CallChoreography {}
impl Cast<dyn SubChoreographyTypeMut> for CallChoreography {}
impl Cast<dyn SubConversationType> for CallChoreography {}
impl Cast<dyn SubConversationTypeMut> for CallChoreography {}
impl Cast<dyn SubProcessType> for CallChoreography {}
impl Cast<dyn SubProcessTypeMut> for CallChoreography {}
impl Cast<dyn TaskType> for CallChoreography {}
impl Cast<dyn TaskTypeMut> for CallChoreography {}
impl Cast<dyn TerminateEventDefinitionType> for CallChoreography {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn TextAnnotationType> for CallChoreography {}
impl Cast<dyn TextAnnotationTypeMut> for CallChoreography {}
impl Cast<dyn TextType> for CallChoreography {}
impl Cast<dyn TextTypeMut> for CallChoreography {}
impl Cast<dyn ThrowEventType> for CallChoreography {}
impl Cast<dyn ThrowEventTypeMut> for CallChoreography {}
impl Cast<dyn TimerEventDefinitionType> for CallChoreography {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CallChoreography {}
impl Cast<dyn TransactionType> for CallChoreography {}
impl Cast<dyn TransactionTypeMut> for CallChoreography {}
impl Cast<dyn UserTaskType> for CallChoreography {}
impl Cast<dyn UserTaskTypeMut> for CallChoreography {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:callConversation")]
pub struct CallConversation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ConversationNodeType",rg*="name","ConversationNodeTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ConversationNodeType",rg*="participant_refs","ConversationNodeTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:messageFlowRef")]
    #[tia("ConversationNodeType",rg*="message_flow_refs","ConversationNodeTypeMut",s,rmg*="message_flow_refs_mut")]
    pub message_flow_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ConversationNodeType",rg*="correlation_keys","ConversationNodeTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(attr = "calledCollaborationRef")]
    #[tia("CallConversationType",rg*="called_collaboration_ref","CallConversationTypeMut",s)]
    pub called_collaboration_ref: Option<String>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CallConversationType",rg*="participant_associations","CallConversationTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
}
impl DocumentElement for CallConversation {
    fn element(&self) -> Element {
        Element::CallConversation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CallConversation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_associations.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_associations.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `callConversation`
pub trait CallConversationType: ConversationNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `calledCollaborationRef`
    fn called_collaboration_ref(&self) -> &Option<String>;
    /// Get value of `participantAssociation` child
    fn participant_associations(&self) -> &Vec<ParticipantAssociation>;
}
dyn_clone::clone_trait_object!(CallConversationType);
impl_downcast!(CallConversationType);
/// Mutable access to `callConversation`
pub trait CallConversationTypeMut:
    ConversationNodeTypeMut + Downcast + Debug + Send + DynClone + CallConversationType
{
    /// Set value of attribute `calledCollaborationRef`
    fn set_called_collaboration_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `participantAssociation` child
    fn participant_associations_mut(&mut self) -> &mut Vec<ParticipantAssociation>;
    /// Set value of `participantAssociation` child
    fn set_participant_associations(&mut self, value: Vec<ParticipantAssociation>);
}
dyn_clone::clone_trait_object!(CallConversationTypeMut);
impl_downcast!(CallConversationTypeMut);
impl Cast<dyn DefinitionsType> for CallConversation {}
impl Cast<dyn DefinitionsTypeMut> for CallConversation {}
impl Cast<dyn ImportType> for CallConversation {}
impl Cast<dyn ImportTypeMut> for CallConversation {}
impl Cast<dyn ActivityType> for CallConversation {}
impl Cast<dyn ActivityTypeMut> for CallConversation {}
impl Cast<dyn AdHocSubProcessType> for CallConversation {}
impl Cast<dyn AdHocSubProcessTypeMut> for CallConversation {}
impl Cast<dyn ArtifactType> for CallConversation {}
impl Cast<dyn ArtifactTypeMut> for CallConversation {}
impl Cast<dyn AssignmentType> for CallConversation {}
impl Cast<dyn AssignmentTypeMut> for CallConversation {}
impl Cast<dyn AssociationType> for CallConversation {}
impl Cast<dyn AssociationTypeMut> for CallConversation {}
impl Cast<dyn AuditingType> for CallConversation {}
impl Cast<dyn AuditingTypeMut> for CallConversation {}
impl Cast<dyn BaseElementType> for CallConversation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CallConversation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CallConversation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CallConversation {}
impl Cast<dyn BoundaryEventType> for CallConversation {}
impl Cast<dyn BoundaryEventTypeMut> for CallConversation {}
impl Cast<dyn BusinessRuleTaskType> for CallConversation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CallConversation {}
impl Cast<dyn CallableElementType> for CallConversation {}
impl Cast<dyn CallableElementTypeMut> for CallConversation {}
impl Cast<dyn CallActivityType> for CallConversation {}
impl Cast<dyn CallActivityTypeMut> for CallConversation {}
impl Cast<dyn CallChoreographyType> for CallConversation {}
impl Cast<dyn CallChoreographyTypeMut> for CallConversation {}
impl Cast<dyn CallConversationType> for CallConversation {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallConversationTypeMut> for CallConversation {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CancelEventDefinitionType> for CallConversation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn CatchEventType> for CallConversation {}
impl Cast<dyn CatchEventTypeMut> for CallConversation {}
impl Cast<dyn CategoryType> for CallConversation {}
impl Cast<dyn CategoryTypeMut> for CallConversation {}
impl Cast<dyn CategoryValueType> for CallConversation {}
impl Cast<dyn CategoryValueTypeMut> for CallConversation {}
impl Cast<dyn ChoreographyType> for CallConversation {}
impl Cast<dyn ChoreographyTypeMut> for CallConversation {}
impl Cast<dyn ChoreographyActivityType> for CallConversation {}
impl Cast<dyn ChoreographyActivityTypeMut> for CallConversation {}
impl Cast<dyn ChoreographyTaskType> for CallConversation {}
impl Cast<dyn ChoreographyTaskTypeMut> for CallConversation {}
impl Cast<dyn CollaborationType> for CallConversation {}
impl Cast<dyn CollaborationTypeMut> for CallConversation {}
impl Cast<dyn CompensateEventDefinitionType> for CallConversation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CallConversation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CallConversation {}
impl Cast<dyn ComplexGatewayType> for CallConversation {}
impl Cast<dyn ComplexGatewayTypeMut> for CallConversation {}
impl Cast<dyn ConditionalEventDefinitionType> for CallConversation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn ConversationType> for CallConversation {}
impl Cast<dyn ConversationTypeMut> for CallConversation {}
impl Cast<dyn ConversationAssociationType> for CallConversation {}
impl Cast<dyn ConversationAssociationTypeMut> for CallConversation {}
impl Cast<dyn ConversationLinkType> for CallConversation {}
impl Cast<dyn ConversationLinkTypeMut> for CallConversation {}
impl Cast<dyn ConversationNodeType> for CallConversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationNodeTypeMut> for CallConversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationKeyType> for CallConversation {}
impl Cast<dyn CorrelationKeyTypeMut> for CallConversation {}
impl Cast<dyn CorrelationPropertyType> for CallConversation {}
impl Cast<dyn CorrelationPropertyTypeMut> for CallConversation {}
impl Cast<dyn CorrelationPropertyBindingType> for CallConversation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CallConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CallConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CallConversation {}
impl Cast<dyn CorrelationSubscriptionType> for CallConversation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CallConversation {}
impl Cast<dyn DataAssociationType> for CallConversation {}
impl Cast<dyn DataAssociationTypeMut> for CallConversation {}
impl Cast<dyn DataInputType> for CallConversation {}
impl Cast<dyn DataInputTypeMut> for CallConversation {}
impl Cast<dyn DataInputAssociationType> for CallConversation {}
impl Cast<dyn DataInputAssociationTypeMut> for CallConversation {}
impl Cast<dyn DataObjectType> for CallConversation {}
impl Cast<dyn DataObjectTypeMut> for CallConversation {}
impl Cast<dyn DataObjectReferenceType> for CallConversation {}
impl Cast<dyn DataObjectReferenceTypeMut> for CallConversation {}
impl Cast<dyn DataOutputType> for CallConversation {}
impl Cast<dyn DataOutputTypeMut> for CallConversation {}
impl Cast<dyn DataOutputAssociationType> for CallConversation {}
impl Cast<dyn DataOutputAssociationTypeMut> for CallConversation {}
impl Cast<dyn DataStateType> for CallConversation {}
impl Cast<dyn DataStateTypeMut> for CallConversation {}
impl Cast<dyn DataStoreType> for CallConversation {}
impl Cast<dyn DataStoreTypeMut> for CallConversation {}
impl Cast<dyn DataStoreReferenceType> for CallConversation {}
impl Cast<dyn DataStoreReferenceTypeMut> for CallConversation {}
impl Cast<dyn DocumentationType> for CallConversation {}
impl Cast<dyn DocumentationTypeMut> for CallConversation {}
impl Cast<dyn EndEventType> for CallConversation {}
impl Cast<dyn EndEventTypeMut> for CallConversation {}
impl Cast<dyn EndPointType> for CallConversation {}
impl Cast<dyn EndPointTypeMut> for CallConversation {}
impl Cast<dyn ErrorType> for CallConversation {}
impl Cast<dyn ErrorTypeMut> for CallConversation {}
impl Cast<dyn ErrorEventDefinitionType> for CallConversation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn EscalationType> for CallConversation {}
impl Cast<dyn EscalationTypeMut> for CallConversation {}
impl Cast<dyn EscalationEventDefinitionType> for CallConversation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn EventType> for CallConversation {}
impl Cast<dyn EventTypeMut> for CallConversation {}
impl Cast<dyn EventBasedGatewayType> for CallConversation {}
impl Cast<dyn EventBasedGatewayTypeMut> for CallConversation {}
impl Cast<dyn EventDefinitionType> for CallConversation {}
impl Cast<dyn EventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn ExclusiveGatewayType> for CallConversation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CallConversation {}
impl Cast<dyn ExpressionType> for CallConversation {}
impl Cast<dyn ExpressionTypeMut> for CallConversation {}
impl Cast<dyn ExtensionType> for CallConversation {}
impl Cast<dyn ExtensionTypeMut> for CallConversation {}
impl Cast<dyn ExtensionElementsType> for CallConversation {}
impl Cast<dyn ExtensionElementsTypeMut> for CallConversation {}
impl Cast<dyn FlowElementType> for CallConversation {}
impl Cast<dyn FlowElementTypeMut> for CallConversation {}
impl Cast<dyn FlowNodeType> for CallConversation {}
impl Cast<dyn FlowNodeTypeMut> for CallConversation {}
impl Cast<dyn FormalExpressionType> for CallConversation {}
impl Cast<dyn FormalExpressionTypeMut> for CallConversation {}
impl Cast<dyn GatewayType> for CallConversation {}
impl Cast<dyn GatewayTypeMut> for CallConversation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CallConversation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CallConversation {}
impl Cast<dyn GlobalChoreographyTaskType> for CallConversation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CallConversation {}
impl Cast<dyn GlobalConversationType> for CallConversation {}
impl Cast<dyn GlobalConversationTypeMut> for CallConversation {}
impl Cast<dyn GlobalManualTaskType> for CallConversation {}
impl Cast<dyn GlobalManualTaskTypeMut> for CallConversation {}
impl Cast<dyn GlobalScriptTaskType> for CallConversation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CallConversation {}
impl Cast<dyn GlobalTaskType> for CallConversation {}
impl Cast<dyn GlobalTaskTypeMut> for CallConversation {}
impl Cast<dyn GlobalUserTaskType> for CallConversation {}
impl Cast<dyn GlobalUserTaskTypeMut> for CallConversation {}
impl Cast<dyn GroupType> for CallConversation {}
impl Cast<dyn GroupTypeMut> for CallConversation {}
impl Cast<dyn HumanPerformerType> for CallConversation {}
impl Cast<dyn HumanPerformerTypeMut> for CallConversation {}
impl Cast<dyn ImplicitThrowEventType> for CallConversation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CallConversation {}
impl Cast<dyn InclusiveGatewayType> for CallConversation {}
impl Cast<dyn InclusiveGatewayTypeMut> for CallConversation {}
impl Cast<dyn InputSetType> for CallConversation {}
impl Cast<dyn InputSetTypeMut> for CallConversation {}
impl Cast<dyn InterfaceType> for CallConversation {}
impl Cast<dyn InterfaceTypeMut> for CallConversation {}
impl Cast<dyn IntermediateCatchEventType> for CallConversation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CallConversation {}
impl Cast<dyn IntermediateThrowEventType> for CallConversation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CallConversation {}
impl Cast<dyn InputOutputBindingType> for CallConversation {}
impl Cast<dyn InputOutputBindingTypeMut> for CallConversation {}
impl Cast<dyn InputOutputSpecificationType> for CallConversation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CallConversation {}
impl Cast<dyn ItemDefinitionType> for CallConversation {}
impl Cast<dyn ItemDefinitionTypeMut> for CallConversation {}
impl Cast<dyn LaneType> for CallConversation {}
impl Cast<dyn LaneTypeMut> for CallConversation {}
impl Cast<dyn LaneSetType> for CallConversation {}
impl Cast<dyn LaneSetTypeMut> for CallConversation {}
impl Cast<dyn LinkEventDefinitionType> for CallConversation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn LoopCharacteristicsType> for CallConversation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CallConversation {}
impl Cast<dyn ManualTaskType> for CallConversation {}
impl Cast<dyn ManualTaskTypeMut> for CallConversation {}
impl Cast<dyn MessageType> for CallConversation {}
impl Cast<dyn MessageTypeMut> for CallConversation {}
impl Cast<dyn MessageEventDefinitionType> for CallConversation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn MessageFlowType> for CallConversation {}
impl Cast<dyn MessageFlowTypeMut> for CallConversation {}
impl Cast<dyn MessageFlowAssociationType> for CallConversation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CallConversation {}
impl Cast<dyn MonitoringType> for CallConversation {}
impl Cast<dyn MonitoringTypeMut> for CallConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CallConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CallConversation {}
impl Cast<dyn OperationType> for CallConversation {}
impl Cast<dyn OperationTypeMut> for CallConversation {}
impl Cast<dyn OutputSetType> for CallConversation {}
impl Cast<dyn OutputSetTypeMut> for CallConversation {}
impl Cast<dyn ParallelGatewayType> for CallConversation {}
impl Cast<dyn ParallelGatewayTypeMut> for CallConversation {}
impl Cast<dyn ParticipantType> for CallConversation {}
impl Cast<dyn ParticipantTypeMut> for CallConversation {}
impl Cast<dyn ParticipantAssociationType> for CallConversation {}
impl Cast<dyn ParticipantAssociationTypeMut> for CallConversation {}
impl Cast<dyn ParticipantMultiplicityType> for CallConversation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CallConversation {}
impl Cast<dyn PartnerEntityType> for CallConversation {}
impl Cast<dyn PartnerEntityTypeMut> for CallConversation {}
impl Cast<dyn PartnerRoleType> for CallConversation {}
impl Cast<dyn PartnerRoleTypeMut> for CallConversation {}
impl Cast<dyn PerformerType> for CallConversation {}
impl Cast<dyn PerformerTypeMut> for CallConversation {}
impl Cast<dyn PotentialOwnerType> for CallConversation {}
impl Cast<dyn PotentialOwnerTypeMut> for CallConversation {}
impl Cast<dyn ProcessType> for CallConversation {}
impl Cast<dyn ProcessTypeMut> for CallConversation {}
impl Cast<dyn PropertyType> for CallConversation {}
impl Cast<dyn PropertyTypeMut> for CallConversation {}
impl Cast<dyn ReceiveTaskType> for CallConversation {}
impl Cast<dyn ReceiveTaskTypeMut> for CallConversation {}
impl Cast<dyn RelationshipType> for CallConversation {}
impl Cast<dyn RelationshipTypeMut> for CallConversation {}
impl Cast<dyn RenderingType> for CallConversation {}
impl Cast<dyn RenderingTypeMut> for CallConversation {}
impl Cast<dyn ResourceType> for CallConversation {}
impl Cast<dyn ResourceTypeMut> for CallConversation {}
impl Cast<dyn ResourceAssignmentExpressionType> for CallConversation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CallConversation {}
impl Cast<dyn ResourceParameterType> for CallConversation {}
impl Cast<dyn ResourceParameterTypeMut> for CallConversation {}
impl Cast<dyn ResourceParameterBindingType> for CallConversation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CallConversation {}
impl Cast<dyn ResourceRoleType> for CallConversation {}
impl Cast<dyn ResourceRoleTypeMut> for CallConversation {}
impl Cast<dyn RootElementType> for CallConversation {}
impl Cast<dyn RootElementTypeMut> for CallConversation {}
impl Cast<dyn ScriptTaskType> for CallConversation {}
impl Cast<dyn ScriptTaskTypeMut> for CallConversation {}
impl Cast<dyn ScriptType> for CallConversation {}
impl Cast<dyn ScriptTypeMut> for CallConversation {}
impl Cast<dyn SendTaskType> for CallConversation {}
impl Cast<dyn SendTaskTypeMut> for CallConversation {}
impl Cast<dyn SequenceFlowType> for CallConversation {}
impl Cast<dyn SequenceFlowTypeMut> for CallConversation {}
impl Cast<dyn ServiceTaskType> for CallConversation {}
impl Cast<dyn ServiceTaskTypeMut> for CallConversation {}
impl Cast<dyn SignalType> for CallConversation {}
impl Cast<dyn SignalTypeMut> for CallConversation {}
impl Cast<dyn SignalEventDefinitionType> for CallConversation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn StandardLoopCharacteristicsType> for CallConversation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CallConversation {}
impl Cast<dyn StartEventType> for CallConversation {}
impl Cast<dyn StartEventTypeMut> for CallConversation {}
impl Cast<dyn SubChoreographyType> for CallConversation {}
impl Cast<dyn SubChoreographyTypeMut> for CallConversation {}
impl Cast<dyn SubConversationType> for CallConversation {}
impl Cast<dyn SubConversationTypeMut> for CallConversation {}
impl Cast<dyn SubProcessType> for CallConversation {}
impl Cast<dyn SubProcessTypeMut> for CallConversation {}
impl Cast<dyn TaskType> for CallConversation {}
impl Cast<dyn TaskTypeMut> for CallConversation {}
impl Cast<dyn TerminateEventDefinitionType> for CallConversation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn TextAnnotationType> for CallConversation {}
impl Cast<dyn TextAnnotationTypeMut> for CallConversation {}
impl Cast<dyn TextType> for CallConversation {}
impl Cast<dyn TextTypeMut> for CallConversation {}
impl Cast<dyn ThrowEventType> for CallConversation {}
impl Cast<dyn ThrowEventTypeMut> for CallConversation {}
impl Cast<dyn TimerEventDefinitionType> for CallConversation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CallConversation {}
impl Cast<dyn TransactionType> for CallConversation {}
impl Cast<dyn TransactionTypeMut> for CallConversation {}
impl Cast<dyn UserTaskType> for CallConversation {}
impl Cast<dyn UserTaskTypeMut> for CallConversation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:cancelEventDefinition")]
pub struct CancelEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for CancelEventDefinition {
    fn element(&self) -> Element {
        Element::CancelEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CancelEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl CancelEventDefinitionType for CancelEventDefinition {}
impl CancelEventDefinitionTypeMut for CancelEventDefinition {}
impl EventDefinitionType for CancelEventDefinition {}
impl EventDefinitionTypeMut for CancelEventDefinition {}
impl RootElementType for CancelEventDefinition {}
impl RootElementTypeMut for CancelEventDefinition {}
//

/// Access to `cancelEventDefinition`
pub trait CancelEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
}
dyn_clone::clone_trait_object!(CancelEventDefinitionType);
impl_downcast!(CancelEventDefinitionType);
/// Mutable access to `cancelEventDefinition`
pub trait CancelEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + CancelEventDefinitionType
{
}
dyn_clone::clone_trait_object!(CancelEventDefinitionTypeMut);
impl_downcast!(CancelEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for CancelEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for CancelEventDefinition {}
impl Cast<dyn ImportType> for CancelEventDefinition {}
impl Cast<dyn ImportTypeMut> for CancelEventDefinition {}
impl Cast<dyn ActivityType> for CancelEventDefinition {}
impl Cast<dyn ActivityTypeMut> for CancelEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for CancelEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for CancelEventDefinition {}
impl Cast<dyn ArtifactType> for CancelEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for CancelEventDefinition {}
impl Cast<dyn AssignmentType> for CancelEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for CancelEventDefinition {}
impl Cast<dyn AssociationType> for CancelEventDefinition {}
impl Cast<dyn AssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn AuditingType> for CancelEventDefinition {}
impl Cast<dyn AuditingTypeMut> for CancelEventDefinition {}
impl Cast<dyn BaseElementType> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CancelEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CancelEventDefinition {}
impl Cast<dyn BoundaryEventType> for CancelEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for CancelEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn CallableElementType> for CancelEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for CancelEventDefinition {}
impl Cast<dyn CallActivityType> for CancelEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for CancelEventDefinition {}
impl Cast<dyn CallChoreographyType> for CancelEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for CancelEventDefinition {}
impl Cast<dyn CallConversationType> for CancelEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for CancelEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CatchEventType> for CancelEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn CategoryType> for CancelEventDefinition {}
impl Cast<dyn CategoryTypeMut> for CancelEventDefinition {}
impl Cast<dyn CategoryValueType> for CancelEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for CancelEventDefinition {}
impl Cast<dyn ChoreographyType> for CancelEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for CancelEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for CancelEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for CancelEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for CancelEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn CollaborationType> for CancelEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for CancelEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CancelEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ComplexGatewayType> for CancelEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ConversationType> for CancelEventDefinition {}
impl Cast<dyn ConversationTypeMut> for CancelEventDefinition {}
impl Cast<dyn ConversationAssociationType> for CancelEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn ConversationLinkType> for CancelEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for CancelEventDefinition {}
impl Cast<dyn ConversationNodeType> for CancelEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for CancelEventDefinition {}
impl Cast<dyn CorrelationKeyType> for CancelEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CancelEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CancelEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for CancelEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataAssociationType> for CancelEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataInputType> for CancelEventDefinition {}
impl Cast<dyn DataInputTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataInputAssociationType> for CancelEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataObjectType> for CancelEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for CancelEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataOutputType> for CancelEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for CancelEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataStateType> for CancelEventDefinition {}
impl Cast<dyn DataStateTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataStoreType> for CancelEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for CancelEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for CancelEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for CancelEventDefinition {}
impl Cast<dyn DocumentationType> for CancelEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for CancelEventDefinition {}
impl Cast<dyn EndEventType> for CancelEventDefinition {}
impl Cast<dyn EndEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn EndPointType> for CancelEventDefinition {}
impl Cast<dyn EndPointTypeMut> for CancelEventDefinition {}
impl Cast<dyn ErrorType> for CancelEventDefinition {}
impl Cast<dyn ErrorTypeMut> for CancelEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn EscalationType> for CancelEventDefinition {}
impl Cast<dyn EscalationTypeMut> for CancelEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn EventType> for CancelEventDefinition {}
impl Cast<dyn EventTypeMut> for CancelEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for CancelEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn EventDefinitionType> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for CancelEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn ExpressionType> for CancelEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ExtensionType> for CancelEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ExtensionElementsType> for CancelEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for CancelEventDefinition {}
impl Cast<dyn FlowElementType> for CancelEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for CancelEventDefinition {}
impl Cast<dyn FlowNodeType> for CancelEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for CancelEventDefinition {}
impl Cast<dyn FormalExpressionType> for CancelEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for CancelEventDefinition {}
impl Cast<dyn GatewayType> for CancelEventDefinition {}
impl Cast<dyn GatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalConversationType> for CancelEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for CancelEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn GroupType> for CancelEventDefinition {}
impl Cast<dyn GroupTypeMut> for CancelEventDefinition {}
impl Cast<dyn HumanPerformerType> for CancelEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for CancelEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for CancelEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for CancelEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn InputSetType> for CancelEventDefinition {}
impl Cast<dyn InputSetTypeMut> for CancelEventDefinition {}
impl Cast<dyn InterfaceType> for CancelEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for CancelEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for CancelEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for CancelEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn InputOutputBindingType> for CancelEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for CancelEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for CancelEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CancelEventDefinition {}
impl Cast<dyn ItemDefinitionType> for CancelEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn LaneType> for CancelEventDefinition {}
impl Cast<dyn LaneTypeMut> for CancelEventDefinition {}
impl Cast<dyn LaneSetType> for CancelEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for CancelEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for CancelEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CancelEventDefinition {}
impl Cast<dyn ManualTaskType> for CancelEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn MessageType> for CancelEventDefinition {}
impl Cast<dyn MessageTypeMut> for CancelEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn MessageFlowType> for CancelEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for CancelEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for CancelEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn MonitoringType> for CancelEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for CancelEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CancelEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CancelEventDefinition {}
impl Cast<dyn OperationType> for CancelEventDefinition {}
impl Cast<dyn OperationTypeMut> for CancelEventDefinition {}
impl Cast<dyn OutputSetType> for CancelEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for CancelEventDefinition {}
impl Cast<dyn ParallelGatewayType> for CancelEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for CancelEventDefinition {}
impl Cast<dyn ParticipantType> for CancelEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for CancelEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for CancelEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for CancelEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for CancelEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CancelEventDefinition {}
impl Cast<dyn PartnerEntityType> for CancelEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for CancelEventDefinition {}
impl Cast<dyn PartnerRoleType> for CancelEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for CancelEventDefinition {}
impl Cast<dyn PerformerType> for CancelEventDefinition {}
impl Cast<dyn PerformerTypeMut> for CancelEventDefinition {}
impl Cast<dyn PotentialOwnerType> for CancelEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for CancelEventDefinition {}
impl Cast<dyn ProcessType> for CancelEventDefinition {}
impl Cast<dyn ProcessTypeMut> for CancelEventDefinition {}
impl Cast<dyn PropertyType> for CancelEventDefinition {}
impl Cast<dyn PropertyTypeMut> for CancelEventDefinition {}
impl Cast<dyn ReceiveTaskType> for CancelEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn RelationshipType> for CancelEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for CancelEventDefinition {}
impl Cast<dyn RenderingType> for CancelEventDefinition {}
impl Cast<dyn RenderingTypeMut> for CancelEventDefinition {}
impl Cast<dyn ResourceType> for CancelEventDefinition {}
impl Cast<dyn ResourceTypeMut> for CancelEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for CancelEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CancelEventDefinition {}
impl Cast<dyn ResourceParameterType> for CancelEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for CancelEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for CancelEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CancelEventDefinition {}
impl Cast<dyn ResourceRoleType> for CancelEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for CancelEventDefinition {}
impl Cast<dyn RootElementType> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for CancelEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for CancelEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn ScriptType> for CancelEventDefinition {}
impl Cast<dyn ScriptTypeMut> for CancelEventDefinition {}
impl Cast<dyn SendTaskType> for CancelEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn SequenceFlowType> for CancelEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for CancelEventDefinition {}
impl Cast<dyn ServiceTaskType> for CancelEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn SignalType> for CancelEventDefinition {}
impl Cast<dyn SignalTypeMut> for CancelEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for CancelEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CancelEventDefinition {}
impl Cast<dyn StartEventType> for CancelEventDefinition {}
impl Cast<dyn StartEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn SubChoreographyType> for CancelEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for CancelEventDefinition {}
impl Cast<dyn SubConversationType> for CancelEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for CancelEventDefinition {}
impl Cast<dyn SubProcessType> for CancelEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for CancelEventDefinition {}
impl Cast<dyn TaskType> for CancelEventDefinition {}
impl Cast<dyn TaskTypeMut> for CancelEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn TextAnnotationType> for CancelEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for CancelEventDefinition {}
impl Cast<dyn TextType> for CancelEventDefinition {}
impl Cast<dyn TextTypeMut> for CancelEventDefinition {}
impl Cast<dyn ThrowEventType> for CancelEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for CancelEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for CancelEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CancelEventDefinition {}
impl Cast<dyn TransactionType> for CancelEventDefinition {}
impl Cast<dyn TransactionTypeMut> for CancelEventDefinition {}
impl Cast<dyn UserTaskType> for CancelEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for CancelEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:catchEvent")]
#[serde(tag = "type")]
pub enum CatchEvent {}
impl CatchEvent {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for CatchEvent {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for CatchEvent {
    fn element(&self) -> Element {
        Element::CatchEvent
    }
}
/// Access to `catchEvent`
pub trait CatchEventType: EventType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `parallelMultiple`
    fn parallel_multiple(&self) -> &Option<bool>;
    /// Get value of `dataOutput` child
    fn data_outputs(&self) -> &Vec<DataOutput>;
    /// Get value of `dataOutputAssociation` child
    fn data_output_associations(&self) -> &Vec<DataOutputAssociation>;
    /// Get value of `outputSet` child
    fn output_set(&self) -> &Option<OutputSet>;
    /// Get value of `eventDefinition` child
    fn event_definitions(&self) -> &Vec<EventDefinition>;
    /// Get value of `eventDefinitionRef` child
    fn event_definition_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(CatchEventType);
impl_downcast!(CatchEventType);
/// Mutable access to `catchEvent`
pub trait CatchEventTypeMut:
    EventTypeMut + Downcast + Debug + Send + DynClone + CatchEventType
{
    /// Set value of attribute `parallelMultiple`
    fn set_parallel_multiple(&mut self, value: Option<bool>);
    /// Get a mutable value of `dataOutput` child
    fn data_outputs_mut(&mut self) -> &mut Vec<DataOutput>;
    /// Set value of `dataOutput` child
    fn set_data_outputs(&mut self, value: Vec<DataOutput>);
    /// Get a mutable value of `dataOutputAssociation` child
    fn data_output_associations_mut(&mut self) -> &mut Vec<DataOutputAssociation>;
    /// Set value of `dataOutputAssociation` child
    fn set_data_output_associations(&mut self, value: Vec<DataOutputAssociation>);
    /// Get a mutable value of `outputSet` child
    fn output_set_mut(&mut self) -> &mut Option<OutputSet>;
    /// Set value of `outputSet` child
    fn set_output_set(&mut self, value: Option<OutputSet>);
    /// Get a mutable value of `eventDefinition` child
    fn event_definitions_mut(&mut self) -> &mut Vec<EventDefinition>;
    /// Set value of `eventDefinition` child
    fn set_event_definitions(&mut self, value: Vec<EventDefinition>);
    /// Get a mutable value of `eventDefinitionRef` child
    fn event_definition_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `eventDefinitionRef` child
    fn set_event_definition_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(CatchEventTypeMut);
impl_downcast!(CatchEventTypeMut);
impl Cast<dyn DefinitionsType> for CatchEvent {}
impl Cast<dyn DefinitionsTypeMut> for CatchEvent {}
impl Cast<dyn ImportType> for CatchEvent {}
impl Cast<dyn ImportTypeMut> for CatchEvent {}
impl Cast<dyn ActivityType> for CatchEvent {}
impl Cast<dyn ActivityTypeMut> for CatchEvent {}
impl Cast<dyn AdHocSubProcessType> for CatchEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for CatchEvent {}
impl Cast<dyn ArtifactType> for CatchEvent {}
impl Cast<dyn ArtifactTypeMut> for CatchEvent {}
impl Cast<dyn AssignmentType> for CatchEvent {}
impl Cast<dyn AssignmentTypeMut> for CatchEvent {}
impl Cast<dyn AssociationType> for CatchEvent {}
impl Cast<dyn AssociationTypeMut> for CatchEvent {}
impl Cast<dyn AuditingType> for CatchEvent {}
impl Cast<dyn AuditingTypeMut> for CatchEvent {}
impl Cast<dyn BaseElementType> for CatchEvent {}
impl Cast<dyn BaseElementTypeMut> for CatchEvent {}
impl Cast<dyn BaseElementWithMixedContentType> for CatchEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CatchEvent {}
impl Cast<dyn BoundaryEventType> for CatchEvent {}
impl Cast<dyn BoundaryEventTypeMut> for CatchEvent {}
impl Cast<dyn BusinessRuleTaskType> for CatchEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CatchEvent {}
impl Cast<dyn CallableElementType> for CatchEvent {}
impl Cast<dyn CallableElementTypeMut> for CatchEvent {}
impl Cast<dyn CallActivityType> for CatchEvent {}
impl Cast<dyn CallActivityTypeMut> for CatchEvent {}
impl Cast<dyn CallChoreographyType> for CatchEvent {}
impl Cast<dyn CallChoreographyTypeMut> for CatchEvent {}
impl Cast<dyn CallConversationType> for CatchEvent {}
impl Cast<dyn CallConversationTypeMut> for CatchEvent {}
impl Cast<dyn CancelEventDefinitionType> for CatchEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn CatchEventType> for CatchEvent {}
impl Cast<dyn CatchEventTypeMut> for CatchEvent {}
impl Cast<dyn CategoryType> for CatchEvent {}
impl Cast<dyn CategoryTypeMut> for CatchEvent {}
impl Cast<dyn CategoryValueType> for CatchEvent {}
impl Cast<dyn CategoryValueTypeMut> for CatchEvent {}
impl Cast<dyn ChoreographyType> for CatchEvent {}
impl Cast<dyn ChoreographyTypeMut> for CatchEvent {}
impl Cast<dyn ChoreographyActivityType> for CatchEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for CatchEvent {}
impl Cast<dyn ChoreographyTaskType> for CatchEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for CatchEvent {}
impl Cast<dyn CollaborationType> for CatchEvent {}
impl Cast<dyn CollaborationTypeMut> for CatchEvent {}
impl Cast<dyn CompensateEventDefinitionType> for CatchEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CatchEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn ComplexGatewayType> for CatchEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for CatchEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for CatchEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn ConversationType> for CatchEvent {}
impl Cast<dyn ConversationTypeMut> for CatchEvent {}
impl Cast<dyn ConversationAssociationType> for CatchEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for CatchEvent {}
impl Cast<dyn ConversationLinkType> for CatchEvent {}
impl Cast<dyn ConversationLinkTypeMut> for CatchEvent {}
impl Cast<dyn ConversationNodeType> for CatchEvent {}
impl Cast<dyn ConversationNodeTypeMut> for CatchEvent {}
impl Cast<dyn CorrelationKeyType> for CatchEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for CatchEvent {}
impl Cast<dyn CorrelationPropertyType> for CatchEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for CatchEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for CatchEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CatchEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CatchEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CatchEvent {}
impl Cast<dyn CorrelationSubscriptionType> for CatchEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CatchEvent {}
impl Cast<dyn DataAssociationType> for CatchEvent {}
impl Cast<dyn DataAssociationTypeMut> for CatchEvent {}
impl Cast<dyn DataInputType> for CatchEvent {}
impl Cast<dyn DataInputTypeMut> for CatchEvent {}
impl Cast<dyn DataInputAssociationType> for CatchEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for CatchEvent {}
impl Cast<dyn DataObjectType> for CatchEvent {}
impl Cast<dyn DataObjectTypeMut> for CatchEvent {}
impl Cast<dyn DataObjectReferenceType> for CatchEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for CatchEvent {}
impl Cast<dyn DataOutputType> for CatchEvent {}
impl Cast<dyn DataOutputTypeMut> for CatchEvent {}
impl Cast<dyn DataOutputAssociationType> for CatchEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for CatchEvent {}
impl Cast<dyn DataStateType> for CatchEvent {}
impl Cast<dyn DataStateTypeMut> for CatchEvent {}
impl Cast<dyn DataStoreType> for CatchEvent {}
impl Cast<dyn DataStoreTypeMut> for CatchEvent {}
impl Cast<dyn DataStoreReferenceType> for CatchEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for CatchEvent {}
impl Cast<dyn DocumentationType> for CatchEvent {}
impl Cast<dyn DocumentationTypeMut> for CatchEvent {}
impl Cast<dyn EndEventType> for CatchEvent {}
impl Cast<dyn EndEventTypeMut> for CatchEvent {}
impl Cast<dyn EndPointType> for CatchEvent {}
impl Cast<dyn EndPointTypeMut> for CatchEvent {}
impl Cast<dyn ErrorType> for CatchEvent {}
impl Cast<dyn ErrorTypeMut> for CatchEvent {}
impl Cast<dyn ErrorEventDefinitionType> for CatchEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn EscalationType> for CatchEvent {}
impl Cast<dyn EscalationTypeMut> for CatchEvent {}
impl Cast<dyn EscalationEventDefinitionType> for CatchEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn EventType> for CatchEvent {}
impl Cast<dyn EventTypeMut> for CatchEvent {}
impl Cast<dyn EventBasedGatewayType> for CatchEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for CatchEvent {}
impl Cast<dyn EventDefinitionType> for CatchEvent {}
impl Cast<dyn EventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn ExclusiveGatewayType> for CatchEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CatchEvent {}
impl Cast<dyn ExpressionType> for CatchEvent {}
impl Cast<dyn ExpressionTypeMut> for CatchEvent {}
impl Cast<dyn ExtensionType> for CatchEvent {}
impl Cast<dyn ExtensionTypeMut> for CatchEvent {}
impl Cast<dyn ExtensionElementsType> for CatchEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for CatchEvent {}
impl Cast<dyn FlowElementType> for CatchEvent {}
impl Cast<dyn FlowElementTypeMut> for CatchEvent {}
impl Cast<dyn FlowNodeType> for CatchEvent {}
impl Cast<dyn FlowNodeTypeMut> for CatchEvent {}
impl Cast<dyn FormalExpressionType> for CatchEvent {}
impl Cast<dyn FormalExpressionTypeMut> for CatchEvent {}
impl Cast<dyn GatewayType> for CatchEvent {}
impl Cast<dyn GatewayTypeMut> for CatchEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CatchEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CatchEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for CatchEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CatchEvent {}
impl Cast<dyn GlobalConversationType> for CatchEvent {}
impl Cast<dyn GlobalConversationTypeMut> for CatchEvent {}
impl Cast<dyn GlobalManualTaskType> for CatchEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for CatchEvent {}
impl Cast<dyn GlobalScriptTaskType> for CatchEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CatchEvent {}
impl Cast<dyn GlobalTaskType> for CatchEvent {}
impl Cast<dyn GlobalTaskTypeMut> for CatchEvent {}
impl Cast<dyn GlobalUserTaskType> for CatchEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for CatchEvent {}
impl Cast<dyn GroupType> for CatchEvent {}
impl Cast<dyn GroupTypeMut> for CatchEvent {}
impl Cast<dyn HumanPerformerType> for CatchEvent {}
impl Cast<dyn HumanPerformerTypeMut> for CatchEvent {}
impl Cast<dyn ImplicitThrowEventType> for CatchEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CatchEvent {}
impl Cast<dyn InclusiveGatewayType> for CatchEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for CatchEvent {}
impl Cast<dyn InputSetType> for CatchEvent {}
impl Cast<dyn InputSetTypeMut> for CatchEvent {}
impl Cast<dyn InterfaceType> for CatchEvent {}
impl Cast<dyn InterfaceTypeMut> for CatchEvent {}
impl Cast<dyn IntermediateCatchEventType> for CatchEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CatchEvent {}
impl Cast<dyn IntermediateThrowEventType> for CatchEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CatchEvent {}
impl Cast<dyn InputOutputBindingType> for CatchEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for CatchEvent {}
impl Cast<dyn InputOutputSpecificationType> for CatchEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CatchEvent {}
impl Cast<dyn ItemDefinitionType> for CatchEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn LaneType> for CatchEvent {}
impl Cast<dyn LaneTypeMut> for CatchEvent {}
impl Cast<dyn LaneSetType> for CatchEvent {}
impl Cast<dyn LaneSetTypeMut> for CatchEvent {}
impl Cast<dyn LinkEventDefinitionType> for CatchEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn LoopCharacteristicsType> for CatchEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CatchEvent {}
impl Cast<dyn ManualTaskType> for CatchEvent {}
impl Cast<dyn ManualTaskTypeMut> for CatchEvent {}
impl Cast<dyn MessageType> for CatchEvent {}
impl Cast<dyn MessageTypeMut> for CatchEvent {}
impl Cast<dyn MessageEventDefinitionType> for CatchEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn MessageFlowType> for CatchEvent {}
impl Cast<dyn MessageFlowTypeMut> for CatchEvent {}
impl Cast<dyn MessageFlowAssociationType> for CatchEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CatchEvent {}
impl Cast<dyn MonitoringType> for CatchEvent {}
impl Cast<dyn MonitoringTypeMut> for CatchEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CatchEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CatchEvent {}
impl Cast<dyn OperationType> for CatchEvent {}
impl Cast<dyn OperationTypeMut> for CatchEvent {}
impl Cast<dyn OutputSetType> for CatchEvent {}
impl Cast<dyn OutputSetTypeMut> for CatchEvent {}
impl Cast<dyn ParallelGatewayType> for CatchEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for CatchEvent {}
impl Cast<dyn ParticipantType> for CatchEvent {}
impl Cast<dyn ParticipantTypeMut> for CatchEvent {}
impl Cast<dyn ParticipantAssociationType> for CatchEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for CatchEvent {}
impl Cast<dyn ParticipantMultiplicityType> for CatchEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CatchEvent {}
impl Cast<dyn PartnerEntityType> for CatchEvent {}
impl Cast<dyn PartnerEntityTypeMut> for CatchEvent {}
impl Cast<dyn PartnerRoleType> for CatchEvent {}
impl Cast<dyn PartnerRoleTypeMut> for CatchEvent {}
impl Cast<dyn PerformerType> for CatchEvent {}
impl Cast<dyn PerformerTypeMut> for CatchEvent {}
impl Cast<dyn PotentialOwnerType> for CatchEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for CatchEvent {}
impl Cast<dyn ProcessType> for CatchEvent {}
impl Cast<dyn ProcessTypeMut> for CatchEvent {}
impl Cast<dyn PropertyType> for CatchEvent {}
impl Cast<dyn PropertyTypeMut> for CatchEvent {}
impl Cast<dyn ReceiveTaskType> for CatchEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for CatchEvent {}
impl Cast<dyn RelationshipType> for CatchEvent {}
impl Cast<dyn RelationshipTypeMut> for CatchEvent {}
impl Cast<dyn RenderingType> for CatchEvent {}
impl Cast<dyn RenderingTypeMut> for CatchEvent {}
impl Cast<dyn ResourceType> for CatchEvent {}
impl Cast<dyn ResourceTypeMut> for CatchEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for CatchEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CatchEvent {}
impl Cast<dyn ResourceParameterType> for CatchEvent {}
impl Cast<dyn ResourceParameterTypeMut> for CatchEvent {}
impl Cast<dyn ResourceParameterBindingType> for CatchEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CatchEvent {}
impl Cast<dyn ResourceRoleType> for CatchEvent {}
impl Cast<dyn ResourceRoleTypeMut> for CatchEvent {}
impl Cast<dyn RootElementType> for CatchEvent {}
impl Cast<dyn RootElementTypeMut> for CatchEvent {}
impl Cast<dyn ScriptTaskType> for CatchEvent {}
impl Cast<dyn ScriptTaskTypeMut> for CatchEvent {}
impl Cast<dyn ScriptType> for CatchEvent {}
impl Cast<dyn ScriptTypeMut> for CatchEvent {}
impl Cast<dyn SendTaskType> for CatchEvent {}
impl Cast<dyn SendTaskTypeMut> for CatchEvent {}
impl Cast<dyn SequenceFlowType> for CatchEvent {}
impl Cast<dyn SequenceFlowTypeMut> for CatchEvent {}
impl Cast<dyn ServiceTaskType> for CatchEvent {}
impl Cast<dyn ServiceTaskTypeMut> for CatchEvent {}
impl Cast<dyn SignalType> for CatchEvent {}
impl Cast<dyn SignalTypeMut> for CatchEvent {}
impl Cast<dyn SignalEventDefinitionType> for CatchEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for CatchEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CatchEvent {}
impl Cast<dyn StartEventType> for CatchEvent {}
impl Cast<dyn StartEventTypeMut> for CatchEvent {}
impl Cast<dyn SubChoreographyType> for CatchEvent {}
impl Cast<dyn SubChoreographyTypeMut> for CatchEvent {}
impl Cast<dyn SubConversationType> for CatchEvent {}
impl Cast<dyn SubConversationTypeMut> for CatchEvent {}
impl Cast<dyn SubProcessType> for CatchEvent {}
impl Cast<dyn SubProcessTypeMut> for CatchEvent {}
impl Cast<dyn TaskType> for CatchEvent {}
impl Cast<dyn TaskTypeMut> for CatchEvent {}
impl Cast<dyn TerminateEventDefinitionType> for CatchEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn TextAnnotationType> for CatchEvent {}
impl Cast<dyn TextAnnotationTypeMut> for CatchEvent {}
impl Cast<dyn TextType> for CatchEvent {}
impl Cast<dyn TextTypeMut> for CatchEvent {}
impl Cast<dyn ThrowEventType> for CatchEvent {}
impl Cast<dyn ThrowEventTypeMut> for CatchEvent {}
impl Cast<dyn TimerEventDefinitionType> for CatchEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CatchEvent {}
impl Cast<dyn TransactionType> for CatchEvent {}
impl Cast<dyn TransactionTypeMut> for CatchEvent {}
impl Cast<dyn UserTaskType> for CatchEvent {}
impl Cast<dyn UserTaskTypeMut> for CatchEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:category")]
pub struct Category {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CategoryType",rg*="name","CategoryTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:categoryValue")]
    #[tia("CategoryType",rg*="category_values","CategoryTypeMut",s,rmg*="category_values_mut")]
    pub category_values: Vec<CategoryValue>,
}
impl DocumentElement for Category {
    fn element(&self) -> Element {
        Element::Category
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Category {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.category_values.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.category_values.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Category {}
impl RootElementTypeMut for Category {}
//

/// Access to `category`
pub trait CategoryType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `categoryValue` child
    fn category_values(&self) -> &Vec<CategoryValue>;
}
dyn_clone::clone_trait_object!(CategoryType);
impl_downcast!(CategoryType);
/// Mutable access to `category`
pub trait CategoryTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + CategoryType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `categoryValue` child
    fn category_values_mut(&mut self) -> &mut Vec<CategoryValue>;
    /// Set value of `categoryValue` child
    fn set_category_values(&mut self, value: Vec<CategoryValue>);
}
dyn_clone::clone_trait_object!(CategoryTypeMut);
impl_downcast!(CategoryTypeMut);
impl Cast<dyn DefinitionsType> for Category {}
impl Cast<dyn DefinitionsTypeMut> for Category {}
impl Cast<dyn ImportType> for Category {}
impl Cast<dyn ImportTypeMut> for Category {}
impl Cast<dyn ActivityType> for Category {}
impl Cast<dyn ActivityTypeMut> for Category {}
impl Cast<dyn AdHocSubProcessType> for Category {}
impl Cast<dyn AdHocSubProcessTypeMut> for Category {}
impl Cast<dyn ArtifactType> for Category {}
impl Cast<dyn ArtifactTypeMut> for Category {}
impl Cast<dyn AssignmentType> for Category {}
impl Cast<dyn AssignmentTypeMut> for Category {}
impl Cast<dyn AssociationType> for Category {}
impl Cast<dyn AssociationTypeMut> for Category {}
impl Cast<dyn AuditingType> for Category {}
impl Cast<dyn AuditingTypeMut> for Category {}
impl Cast<dyn BaseElementType> for Category {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Category {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Category {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Category {}
impl Cast<dyn BoundaryEventType> for Category {}
impl Cast<dyn BoundaryEventTypeMut> for Category {}
impl Cast<dyn BusinessRuleTaskType> for Category {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Category {}
impl Cast<dyn CallableElementType> for Category {}
impl Cast<dyn CallableElementTypeMut> for Category {}
impl Cast<dyn CallActivityType> for Category {}
impl Cast<dyn CallActivityTypeMut> for Category {}
impl Cast<dyn CallChoreographyType> for Category {}
impl Cast<dyn CallChoreographyTypeMut> for Category {}
impl Cast<dyn CallConversationType> for Category {}
impl Cast<dyn CallConversationTypeMut> for Category {}
impl Cast<dyn CancelEventDefinitionType> for Category {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Category {}
impl Cast<dyn CatchEventType> for Category {}
impl Cast<dyn CatchEventTypeMut> for Category {}
impl Cast<dyn CategoryType> for Category {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryTypeMut> for Category {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryValueType> for Category {}
impl Cast<dyn CategoryValueTypeMut> for Category {}
impl Cast<dyn ChoreographyType> for Category {}
impl Cast<dyn ChoreographyTypeMut> for Category {}
impl Cast<dyn ChoreographyActivityType> for Category {}
impl Cast<dyn ChoreographyActivityTypeMut> for Category {}
impl Cast<dyn ChoreographyTaskType> for Category {}
impl Cast<dyn ChoreographyTaskTypeMut> for Category {}
impl Cast<dyn CollaborationType> for Category {}
impl Cast<dyn CollaborationTypeMut> for Category {}
impl Cast<dyn CompensateEventDefinitionType> for Category {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Category {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Category {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Category {}
impl Cast<dyn ComplexGatewayType> for Category {}
impl Cast<dyn ComplexGatewayTypeMut> for Category {}
impl Cast<dyn ConditionalEventDefinitionType> for Category {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Category {}
impl Cast<dyn ConversationType> for Category {}
impl Cast<dyn ConversationTypeMut> for Category {}
impl Cast<dyn ConversationAssociationType> for Category {}
impl Cast<dyn ConversationAssociationTypeMut> for Category {}
impl Cast<dyn ConversationLinkType> for Category {}
impl Cast<dyn ConversationLinkTypeMut> for Category {}
impl Cast<dyn ConversationNodeType> for Category {}
impl Cast<dyn ConversationNodeTypeMut> for Category {}
impl Cast<dyn CorrelationKeyType> for Category {}
impl Cast<dyn CorrelationKeyTypeMut> for Category {}
impl Cast<dyn CorrelationPropertyType> for Category {}
impl Cast<dyn CorrelationPropertyTypeMut> for Category {}
impl Cast<dyn CorrelationPropertyBindingType> for Category {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Category {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Category {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Category {}
impl Cast<dyn CorrelationSubscriptionType> for Category {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Category {}
impl Cast<dyn DataAssociationType> for Category {}
impl Cast<dyn DataAssociationTypeMut> for Category {}
impl Cast<dyn DataInputType> for Category {}
impl Cast<dyn DataInputTypeMut> for Category {}
impl Cast<dyn DataInputAssociationType> for Category {}
impl Cast<dyn DataInputAssociationTypeMut> for Category {}
impl Cast<dyn DataObjectType> for Category {}
impl Cast<dyn DataObjectTypeMut> for Category {}
impl Cast<dyn DataObjectReferenceType> for Category {}
impl Cast<dyn DataObjectReferenceTypeMut> for Category {}
impl Cast<dyn DataOutputType> for Category {}
impl Cast<dyn DataOutputTypeMut> for Category {}
impl Cast<dyn DataOutputAssociationType> for Category {}
impl Cast<dyn DataOutputAssociationTypeMut> for Category {}
impl Cast<dyn DataStateType> for Category {}
impl Cast<dyn DataStateTypeMut> for Category {}
impl Cast<dyn DataStoreType> for Category {}
impl Cast<dyn DataStoreTypeMut> for Category {}
impl Cast<dyn DataStoreReferenceType> for Category {}
impl Cast<dyn DataStoreReferenceTypeMut> for Category {}
impl Cast<dyn DocumentationType> for Category {}
impl Cast<dyn DocumentationTypeMut> for Category {}
impl Cast<dyn EndEventType> for Category {}
impl Cast<dyn EndEventTypeMut> for Category {}
impl Cast<dyn EndPointType> for Category {}
impl Cast<dyn EndPointTypeMut> for Category {}
impl Cast<dyn ErrorType> for Category {}
impl Cast<dyn ErrorTypeMut> for Category {}
impl Cast<dyn ErrorEventDefinitionType> for Category {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Category {}
impl Cast<dyn EscalationType> for Category {}
impl Cast<dyn EscalationTypeMut> for Category {}
impl Cast<dyn EscalationEventDefinitionType> for Category {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Category {}
impl Cast<dyn EventType> for Category {}
impl Cast<dyn EventTypeMut> for Category {}
impl Cast<dyn EventBasedGatewayType> for Category {}
impl Cast<dyn EventBasedGatewayTypeMut> for Category {}
impl Cast<dyn EventDefinitionType> for Category {}
impl Cast<dyn EventDefinitionTypeMut> for Category {}
impl Cast<dyn ExclusiveGatewayType> for Category {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Category {}
impl Cast<dyn ExpressionType> for Category {}
impl Cast<dyn ExpressionTypeMut> for Category {}
impl Cast<dyn ExtensionType> for Category {}
impl Cast<dyn ExtensionTypeMut> for Category {}
impl Cast<dyn ExtensionElementsType> for Category {}
impl Cast<dyn ExtensionElementsTypeMut> for Category {}
impl Cast<dyn FlowElementType> for Category {}
impl Cast<dyn FlowElementTypeMut> for Category {}
impl Cast<dyn FlowNodeType> for Category {}
impl Cast<dyn FlowNodeTypeMut> for Category {}
impl Cast<dyn FormalExpressionType> for Category {}
impl Cast<dyn FormalExpressionTypeMut> for Category {}
impl Cast<dyn GatewayType> for Category {}
impl Cast<dyn GatewayTypeMut> for Category {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Category {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Category {}
impl Cast<dyn GlobalChoreographyTaskType> for Category {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Category {}
impl Cast<dyn GlobalConversationType> for Category {}
impl Cast<dyn GlobalConversationTypeMut> for Category {}
impl Cast<dyn GlobalManualTaskType> for Category {}
impl Cast<dyn GlobalManualTaskTypeMut> for Category {}
impl Cast<dyn GlobalScriptTaskType> for Category {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Category {}
impl Cast<dyn GlobalTaskType> for Category {}
impl Cast<dyn GlobalTaskTypeMut> for Category {}
impl Cast<dyn GlobalUserTaskType> for Category {}
impl Cast<dyn GlobalUserTaskTypeMut> for Category {}
impl Cast<dyn GroupType> for Category {}
impl Cast<dyn GroupTypeMut> for Category {}
impl Cast<dyn HumanPerformerType> for Category {}
impl Cast<dyn HumanPerformerTypeMut> for Category {}
impl Cast<dyn ImplicitThrowEventType> for Category {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Category {}
impl Cast<dyn InclusiveGatewayType> for Category {}
impl Cast<dyn InclusiveGatewayTypeMut> for Category {}
impl Cast<dyn InputSetType> for Category {}
impl Cast<dyn InputSetTypeMut> for Category {}
impl Cast<dyn InterfaceType> for Category {}
impl Cast<dyn InterfaceTypeMut> for Category {}
impl Cast<dyn IntermediateCatchEventType> for Category {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Category {}
impl Cast<dyn IntermediateThrowEventType> for Category {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Category {}
impl Cast<dyn InputOutputBindingType> for Category {}
impl Cast<dyn InputOutputBindingTypeMut> for Category {}
impl Cast<dyn InputOutputSpecificationType> for Category {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Category {}
impl Cast<dyn ItemDefinitionType> for Category {}
impl Cast<dyn ItemDefinitionTypeMut> for Category {}
impl Cast<dyn LaneType> for Category {}
impl Cast<dyn LaneTypeMut> for Category {}
impl Cast<dyn LaneSetType> for Category {}
impl Cast<dyn LaneSetTypeMut> for Category {}
impl Cast<dyn LinkEventDefinitionType> for Category {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Category {}
impl Cast<dyn LoopCharacteristicsType> for Category {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Category {}
impl Cast<dyn ManualTaskType> for Category {}
impl Cast<dyn ManualTaskTypeMut> for Category {}
impl Cast<dyn MessageType> for Category {}
impl Cast<dyn MessageTypeMut> for Category {}
impl Cast<dyn MessageEventDefinitionType> for Category {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Category {}
impl Cast<dyn MessageFlowType> for Category {}
impl Cast<dyn MessageFlowTypeMut> for Category {}
impl Cast<dyn MessageFlowAssociationType> for Category {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Category {}
impl Cast<dyn MonitoringType> for Category {}
impl Cast<dyn MonitoringTypeMut> for Category {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Category {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Category {}
impl Cast<dyn OperationType> for Category {}
impl Cast<dyn OperationTypeMut> for Category {}
impl Cast<dyn OutputSetType> for Category {}
impl Cast<dyn OutputSetTypeMut> for Category {}
impl Cast<dyn ParallelGatewayType> for Category {}
impl Cast<dyn ParallelGatewayTypeMut> for Category {}
impl Cast<dyn ParticipantType> for Category {}
impl Cast<dyn ParticipantTypeMut> for Category {}
impl Cast<dyn ParticipantAssociationType> for Category {}
impl Cast<dyn ParticipantAssociationTypeMut> for Category {}
impl Cast<dyn ParticipantMultiplicityType> for Category {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Category {}
impl Cast<dyn PartnerEntityType> for Category {}
impl Cast<dyn PartnerEntityTypeMut> for Category {}
impl Cast<dyn PartnerRoleType> for Category {}
impl Cast<dyn PartnerRoleTypeMut> for Category {}
impl Cast<dyn PerformerType> for Category {}
impl Cast<dyn PerformerTypeMut> for Category {}
impl Cast<dyn PotentialOwnerType> for Category {}
impl Cast<dyn PotentialOwnerTypeMut> for Category {}
impl Cast<dyn ProcessType> for Category {}
impl Cast<dyn ProcessTypeMut> for Category {}
impl Cast<dyn PropertyType> for Category {}
impl Cast<dyn PropertyTypeMut> for Category {}
impl Cast<dyn ReceiveTaskType> for Category {}
impl Cast<dyn ReceiveTaskTypeMut> for Category {}
impl Cast<dyn RelationshipType> for Category {}
impl Cast<dyn RelationshipTypeMut> for Category {}
impl Cast<dyn RenderingType> for Category {}
impl Cast<dyn RenderingTypeMut> for Category {}
impl Cast<dyn ResourceType> for Category {}
impl Cast<dyn ResourceTypeMut> for Category {}
impl Cast<dyn ResourceAssignmentExpressionType> for Category {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Category {}
impl Cast<dyn ResourceParameterType> for Category {}
impl Cast<dyn ResourceParameterTypeMut> for Category {}
impl Cast<dyn ResourceParameterBindingType> for Category {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Category {}
impl Cast<dyn ResourceRoleType> for Category {}
impl Cast<dyn ResourceRoleTypeMut> for Category {}
impl Cast<dyn RootElementType> for Category {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Category {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Category {}
impl Cast<dyn ScriptTaskTypeMut> for Category {}
impl Cast<dyn ScriptType> for Category {}
impl Cast<dyn ScriptTypeMut> for Category {}
impl Cast<dyn SendTaskType> for Category {}
impl Cast<dyn SendTaskTypeMut> for Category {}
impl Cast<dyn SequenceFlowType> for Category {}
impl Cast<dyn SequenceFlowTypeMut> for Category {}
impl Cast<dyn ServiceTaskType> for Category {}
impl Cast<dyn ServiceTaskTypeMut> for Category {}
impl Cast<dyn SignalType> for Category {}
impl Cast<dyn SignalTypeMut> for Category {}
impl Cast<dyn SignalEventDefinitionType> for Category {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Category {}
impl Cast<dyn StandardLoopCharacteristicsType> for Category {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Category {}
impl Cast<dyn StartEventType> for Category {}
impl Cast<dyn StartEventTypeMut> for Category {}
impl Cast<dyn SubChoreographyType> for Category {}
impl Cast<dyn SubChoreographyTypeMut> for Category {}
impl Cast<dyn SubConversationType> for Category {}
impl Cast<dyn SubConversationTypeMut> for Category {}
impl Cast<dyn SubProcessType> for Category {}
impl Cast<dyn SubProcessTypeMut> for Category {}
impl Cast<dyn TaskType> for Category {}
impl Cast<dyn TaskTypeMut> for Category {}
impl Cast<dyn TerminateEventDefinitionType> for Category {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Category {}
impl Cast<dyn TextAnnotationType> for Category {}
impl Cast<dyn TextAnnotationTypeMut> for Category {}
impl Cast<dyn TextType> for Category {}
impl Cast<dyn TextTypeMut> for Category {}
impl Cast<dyn ThrowEventType> for Category {}
impl Cast<dyn ThrowEventTypeMut> for Category {}
impl Cast<dyn TimerEventDefinitionType> for Category {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Category {}
impl Cast<dyn TransactionType> for Category {}
impl Cast<dyn TransactionTypeMut> for Category {}
impl Cast<dyn UserTaskType> for Category {}
impl Cast<dyn UserTaskTypeMut> for Category {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:categoryValue")]
pub struct CategoryValue {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "value")]
    #[tia("CategoryValueType",rg*="value","CategoryValueTypeMut",s)]
    pub value: Option<String>,
}
impl DocumentElement for CategoryValue {
    fn element(&self) -> Element {
        Element::CategoryValue
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CategoryValue {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `categoryValue`
pub trait CategoryValueType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `value`
    fn value(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(CategoryValueType);
impl_downcast!(CategoryValueType);
/// Mutable access to `categoryValue`
pub trait CategoryValueTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + CategoryValueType
{
    /// Set value of attribute `value`
    fn set_value(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(CategoryValueTypeMut);
impl_downcast!(CategoryValueTypeMut);
impl Cast<dyn DefinitionsType> for CategoryValue {}
impl Cast<dyn DefinitionsTypeMut> for CategoryValue {}
impl Cast<dyn ImportType> for CategoryValue {}
impl Cast<dyn ImportTypeMut> for CategoryValue {}
impl Cast<dyn ActivityType> for CategoryValue {}
impl Cast<dyn ActivityTypeMut> for CategoryValue {}
impl Cast<dyn AdHocSubProcessType> for CategoryValue {}
impl Cast<dyn AdHocSubProcessTypeMut> for CategoryValue {}
impl Cast<dyn ArtifactType> for CategoryValue {}
impl Cast<dyn ArtifactTypeMut> for CategoryValue {}
impl Cast<dyn AssignmentType> for CategoryValue {}
impl Cast<dyn AssignmentTypeMut> for CategoryValue {}
impl Cast<dyn AssociationType> for CategoryValue {}
impl Cast<dyn AssociationTypeMut> for CategoryValue {}
impl Cast<dyn AuditingType> for CategoryValue {}
impl Cast<dyn AuditingTypeMut> for CategoryValue {}
impl Cast<dyn BaseElementType> for CategoryValue {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CategoryValue {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CategoryValue {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CategoryValue {}
impl Cast<dyn BoundaryEventType> for CategoryValue {}
impl Cast<dyn BoundaryEventTypeMut> for CategoryValue {}
impl Cast<dyn BusinessRuleTaskType> for CategoryValue {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CategoryValue {}
impl Cast<dyn CallableElementType> for CategoryValue {}
impl Cast<dyn CallableElementTypeMut> for CategoryValue {}
impl Cast<dyn CallActivityType> for CategoryValue {}
impl Cast<dyn CallActivityTypeMut> for CategoryValue {}
impl Cast<dyn CallChoreographyType> for CategoryValue {}
impl Cast<dyn CallChoreographyTypeMut> for CategoryValue {}
impl Cast<dyn CallConversationType> for CategoryValue {}
impl Cast<dyn CallConversationTypeMut> for CategoryValue {}
impl Cast<dyn CancelEventDefinitionType> for CategoryValue {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn CatchEventType> for CategoryValue {}
impl Cast<dyn CatchEventTypeMut> for CategoryValue {}
impl Cast<dyn CategoryType> for CategoryValue {}
impl Cast<dyn CategoryTypeMut> for CategoryValue {}
impl Cast<dyn CategoryValueType> for CategoryValue {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryValueTypeMut> for CategoryValue {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyType> for CategoryValue {}
impl Cast<dyn ChoreographyTypeMut> for CategoryValue {}
impl Cast<dyn ChoreographyActivityType> for CategoryValue {}
impl Cast<dyn ChoreographyActivityTypeMut> for CategoryValue {}
impl Cast<dyn ChoreographyTaskType> for CategoryValue {}
impl Cast<dyn ChoreographyTaskTypeMut> for CategoryValue {}
impl Cast<dyn CollaborationType> for CategoryValue {}
impl Cast<dyn CollaborationTypeMut> for CategoryValue {}
impl Cast<dyn CompensateEventDefinitionType> for CategoryValue {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CategoryValue {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn ComplexGatewayType> for CategoryValue {}
impl Cast<dyn ComplexGatewayTypeMut> for CategoryValue {}
impl Cast<dyn ConditionalEventDefinitionType> for CategoryValue {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn ConversationType> for CategoryValue {}
impl Cast<dyn ConversationTypeMut> for CategoryValue {}
impl Cast<dyn ConversationAssociationType> for CategoryValue {}
impl Cast<dyn ConversationAssociationTypeMut> for CategoryValue {}
impl Cast<dyn ConversationLinkType> for CategoryValue {}
impl Cast<dyn ConversationLinkTypeMut> for CategoryValue {}
impl Cast<dyn ConversationNodeType> for CategoryValue {}
impl Cast<dyn ConversationNodeTypeMut> for CategoryValue {}
impl Cast<dyn CorrelationKeyType> for CategoryValue {}
impl Cast<dyn CorrelationKeyTypeMut> for CategoryValue {}
impl Cast<dyn CorrelationPropertyType> for CategoryValue {}
impl Cast<dyn CorrelationPropertyTypeMut> for CategoryValue {}
impl Cast<dyn CorrelationPropertyBindingType> for CategoryValue {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CategoryValue {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CategoryValue {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CategoryValue {}
impl Cast<dyn CorrelationSubscriptionType> for CategoryValue {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CategoryValue {}
impl Cast<dyn DataAssociationType> for CategoryValue {}
impl Cast<dyn DataAssociationTypeMut> for CategoryValue {}
impl Cast<dyn DataInputType> for CategoryValue {}
impl Cast<dyn DataInputTypeMut> for CategoryValue {}
impl Cast<dyn DataInputAssociationType> for CategoryValue {}
impl Cast<dyn DataInputAssociationTypeMut> for CategoryValue {}
impl Cast<dyn DataObjectType> for CategoryValue {}
impl Cast<dyn DataObjectTypeMut> for CategoryValue {}
impl Cast<dyn DataObjectReferenceType> for CategoryValue {}
impl Cast<dyn DataObjectReferenceTypeMut> for CategoryValue {}
impl Cast<dyn DataOutputType> for CategoryValue {}
impl Cast<dyn DataOutputTypeMut> for CategoryValue {}
impl Cast<dyn DataOutputAssociationType> for CategoryValue {}
impl Cast<dyn DataOutputAssociationTypeMut> for CategoryValue {}
impl Cast<dyn DataStateType> for CategoryValue {}
impl Cast<dyn DataStateTypeMut> for CategoryValue {}
impl Cast<dyn DataStoreType> for CategoryValue {}
impl Cast<dyn DataStoreTypeMut> for CategoryValue {}
impl Cast<dyn DataStoreReferenceType> for CategoryValue {}
impl Cast<dyn DataStoreReferenceTypeMut> for CategoryValue {}
impl Cast<dyn DocumentationType> for CategoryValue {}
impl Cast<dyn DocumentationTypeMut> for CategoryValue {}
impl Cast<dyn EndEventType> for CategoryValue {}
impl Cast<dyn EndEventTypeMut> for CategoryValue {}
impl Cast<dyn EndPointType> for CategoryValue {}
impl Cast<dyn EndPointTypeMut> for CategoryValue {}
impl Cast<dyn ErrorType> for CategoryValue {}
impl Cast<dyn ErrorTypeMut> for CategoryValue {}
impl Cast<dyn ErrorEventDefinitionType> for CategoryValue {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn EscalationType> for CategoryValue {}
impl Cast<dyn EscalationTypeMut> for CategoryValue {}
impl Cast<dyn EscalationEventDefinitionType> for CategoryValue {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn EventType> for CategoryValue {}
impl Cast<dyn EventTypeMut> for CategoryValue {}
impl Cast<dyn EventBasedGatewayType> for CategoryValue {}
impl Cast<dyn EventBasedGatewayTypeMut> for CategoryValue {}
impl Cast<dyn EventDefinitionType> for CategoryValue {}
impl Cast<dyn EventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn ExclusiveGatewayType> for CategoryValue {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CategoryValue {}
impl Cast<dyn ExpressionType> for CategoryValue {}
impl Cast<dyn ExpressionTypeMut> for CategoryValue {}
impl Cast<dyn ExtensionType> for CategoryValue {}
impl Cast<dyn ExtensionTypeMut> for CategoryValue {}
impl Cast<dyn ExtensionElementsType> for CategoryValue {}
impl Cast<dyn ExtensionElementsTypeMut> for CategoryValue {}
impl Cast<dyn FlowElementType> for CategoryValue {}
impl Cast<dyn FlowElementTypeMut> for CategoryValue {}
impl Cast<dyn FlowNodeType> for CategoryValue {}
impl Cast<dyn FlowNodeTypeMut> for CategoryValue {}
impl Cast<dyn FormalExpressionType> for CategoryValue {}
impl Cast<dyn FormalExpressionTypeMut> for CategoryValue {}
impl Cast<dyn GatewayType> for CategoryValue {}
impl Cast<dyn GatewayTypeMut> for CategoryValue {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CategoryValue {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CategoryValue {}
impl Cast<dyn GlobalChoreographyTaskType> for CategoryValue {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CategoryValue {}
impl Cast<dyn GlobalConversationType> for CategoryValue {}
impl Cast<dyn GlobalConversationTypeMut> for CategoryValue {}
impl Cast<dyn GlobalManualTaskType> for CategoryValue {}
impl Cast<dyn GlobalManualTaskTypeMut> for CategoryValue {}
impl Cast<dyn GlobalScriptTaskType> for CategoryValue {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CategoryValue {}
impl Cast<dyn GlobalTaskType> for CategoryValue {}
impl Cast<dyn GlobalTaskTypeMut> for CategoryValue {}
impl Cast<dyn GlobalUserTaskType> for CategoryValue {}
impl Cast<dyn GlobalUserTaskTypeMut> for CategoryValue {}
impl Cast<dyn GroupType> for CategoryValue {}
impl Cast<dyn GroupTypeMut> for CategoryValue {}
impl Cast<dyn HumanPerformerType> for CategoryValue {}
impl Cast<dyn HumanPerformerTypeMut> for CategoryValue {}
impl Cast<dyn ImplicitThrowEventType> for CategoryValue {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CategoryValue {}
impl Cast<dyn InclusiveGatewayType> for CategoryValue {}
impl Cast<dyn InclusiveGatewayTypeMut> for CategoryValue {}
impl Cast<dyn InputSetType> for CategoryValue {}
impl Cast<dyn InputSetTypeMut> for CategoryValue {}
impl Cast<dyn InterfaceType> for CategoryValue {}
impl Cast<dyn InterfaceTypeMut> for CategoryValue {}
impl Cast<dyn IntermediateCatchEventType> for CategoryValue {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CategoryValue {}
impl Cast<dyn IntermediateThrowEventType> for CategoryValue {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CategoryValue {}
impl Cast<dyn InputOutputBindingType> for CategoryValue {}
impl Cast<dyn InputOutputBindingTypeMut> for CategoryValue {}
impl Cast<dyn InputOutputSpecificationType> for CategoryValue {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CategoryValue {}
impl Cast<dyn ItemDefinitionType> for CategoryValue {}
impl Cast<dyn ItemDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn LaneType> for CategoryValue {}
impl Cast<dyn LaneTypeMut> for CategoryValue {}
impl Cast<dyn LaneSetType> for CategoryValue {}
impl Cast<dyn LaneSetTypeMut> for CategoryValue {}
impl Cast<dyn LinkEventDefinitionType> for CategoryValue {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn LoopCharacteristicsType> for CategoryValue {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CategoryValue {}
impl Cast<dyn ManualTaskType> for CategoryValue {}
impl Cast<dyn ManualTaskTypeMut> for CategoryValue {}
impl Cast<dyn MessageType> for CategoryValue {}
impl Cast<dyn MessageTypeMut> for CategoryValue {}
impl Cast<dyn MessageEventDefinitionType> for CategoryValue {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn MessageFlowType> for CategoryValue {}
impl Cast<dyn MessageFlowTypeMut> for CategoryValue {}
impl Cast<dyn MessageFlowAssociationType> for CategoryValue {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CategoryValue {}
impl Cast<dyn MonitoringType> for CategoryValue {}
impl Cast<dyn MonitoringTypeMut> for CategoryValue {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CategoryValue {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CategoryValue {}
impl Cast<dyn OperationType> for CategoryValue {}
impl Cast<dyn OperationTypeMut> for CategoryValue {}
impl Cast<dyn OutputSetType> for CategoryValue {}
impl Cast<dyn OutputSetTypeMut> for CategoryValue {}
impl Cast<dyn ParallelGatewayType> for CategoryValue {}
impl Cast<dyn ParallelGatewayTypeMut> for CategoryValue {}
impl Cast<dyn ParticipantType> for CategoryValue {}
impl Cast<dyn ParticipantTypeMut> for CategoryValue {}
impl Cast<dyn ParticipantAssociationType> for CategoryValue {}
impl Cast<dyn ParticipantAssociationTypeMut> for CategoryValue {}
impl Cast<dyn ParticipantMultiplicityType> for CategoryValue {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CategoryValue {}
impl Cast<dyn PartnerEntityType> for CategoryValue {}
impl Cast<dyn PartnerEntityTypeMut> for CategoryValue {}
impl Cast<dyn PartnerRoleType> for CategoryValue {}
impl Cast<dyn PartnerRoleTypeMut> for CategoryValue {}
impl Cast<dyn PerformerType> for CategoryValue {}
impl Cast<dyn PerformerTypeMut> for CategoryValue {}
impl Cast<dyn PotentialOwnerType> for CategoryValue {}
impl Cast<dyn PotentialOwnerTypeMut> for CategoryValue {}
impl Cast<dyn ProcessType> for CategoryValue {}
impl Cast<dyn ProcessTypeMut> for CategoryValue {}
impl Cast<dyn PropertyType> for CategoryValue {}
impl Cast<dyn PropertyTypeMut> for CategoryValue {}
impl Cast<dyn ReceiveTaskType> for CategoryValue {}
impl Cast<dyn ReceiveTaskTypeMut> for CategoryValue {}
impl Cast<dyn RelationshipType> for CategoryValue {}
impl Cast<dyn RelationshipTypeMut> for CategoryValue {}
impl Cast<dyn RenderingType> for CategoryValue {}
impl Cast<dyn RenderingTypeMut> for CategoryValue {}
impl Cast<dyn ResourceType> for CategoryValue {}
impl Cast<dyn ResourceTypeMut> for CategoryValue {}
impl Cast<dyn ResourceAssignmentExpressionType> for CategoryValue {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CategoryValue {}
impl Cast<dyn ResourceParameterType> for CategoryValue {}
impl Cast<dyn ResourceParameterTypeMut> for CategoryValue {}
impl Cast<dyn ResourceParameterBindingType> for CategoryValue {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CategoryValue {}
impl Cast<dyn ResourceRoleType> for CategoryValue {}
impl Cast<dyn ResourceRoleTypeMut> for CategoryValue {}
impl Cast<dyn RootElementType> for CategoryValue {}
impl Cast<dyn RootElementTypeMut> for CategoryValue {}
impl Cast<dyn ScriptTaskType> for CategoryValue {}
impl Cast<dyn ScriptTaskTypeMut> for CategoryValue {}
impl Cast<dyn ScriptType> for CategoryValue {}
impl Cast<dyn ScriptTypeMut> for CategoryValue {}
impl Cast<dyn SendTaskType> for CategoryValue {}
impl Cast<dyn SendTaskTypeMut> for CategoryValue {}
impl Cast<dyn SequenceFlowType> for CategoryValue {}
impl Cast<dyn SequenceFlowTypeMut> for CategoryValue {}
impl Cast<dyn ServiceTaskType> for CategoryValue {}
impl Cast<dyn ServiceTaskTypeMut> for CategoryValue {}
impl Cast<dyn SignalType> for CategoryValue {}
impl Cast<dyn SignalTypeMut> for CategoryValue {}
impl Cast<dyn SignalEventDefinitionType> for CategoryValue {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn StandardLoopCharacteristicsType> for CategoryValue {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CategoryValue {}
impl Cast<dyn StartEventType> for CategoryValue {}
impl Cast<dyn StartEventTypeMut> for CategoryValue {}
impl Cast<dyn SubChoreographyType> for CategoryValue {}
impl Cast<dyn SubChoreographyTypeMut> for CategoryValue {}
impl Cast<dyn SubConversationType> for CategoryValue {}
impl Cast<dyn SubConversationTypeMut> for CategoryValue {}
impl Cast<dyn SubProcessType> for CategoryValue {}
impl Cast<dyn SubProcessTypeMut> for CategoryValue {}
impl Cast<dyn TaskType> for CategoryValue {}
impl Cast<dyn TaskTypeMut> for CategoryValue {}
impl Cast<dyn TerminateEventDefinitionType> for CategoryValue {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn TextAnnotationType> for CategoryValue {}
impl Cast<dyn TextAnnotationTypeMut> for CategoryValue {}
impl Cast<dyn TextType> for CategoryValue {}
impl Cast<dyn TextTypeMut> for CategoryValue {}
impl Cast<dyn ThrowEventType> for CategoryValue {}
impl Cast<dyn ThrowEventTypeMut> for CategoryValue {}
impl Cast<dyn TimerEventDefinitionType> for CategoryValue {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CategoryValue {}
impl Cast<dyn TransactionType> for CategoryValue {}
impl Cast<dyn TransactionTypeMut> for CategoryValue {}
impl Cast<dyn UserTaskType> for CategoryValue {}
impl Cast<dyn UserTaskTypeMut> for CategoryValue {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:choreography")]
pub struct Choreography {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CollaborationType",rg*="name","CollaborationTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "isClosed")]
    #[tia("CollaborationType",rg*="is_closed","CollaborationTypeMut",s)]
    pub is_closed: Option<bool>,
    #[xml(child = "bpmn:participant")]
    #[tia("CollaborationType",rg*="participants","CollaborationTypeMut",s,rmg*="participants_mut")]
    pub participants: Vec<Participant>,
    #[xml(child = "bpmn:messageFlow")]
    #[tia("CollaborationType",rg*="message_flows","CollaborationTypeMut",s,rmg*="message_flows_mut")]
    pub message_flows: Vec<MessageFlow>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("CollaborationType",rg*="artifacts","CollaborationTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(
        child = "bpmn:callConversation",
        child = "bpmn:conversation",
        child = "bpmn:subConversation"
    )]
    #[tia("CollaborationType",rg*="conversation_nodes","CollaborationTypeMut",s,rmg*="conversation_nodes_mut")]
    pub conversation_nodes: Vec<ConversationNode>,
    #[xml(child = "bpmn:conversationAssociation")]
    #[tia("CollaborationType",rg*="conversation_associations","CollaborationTypeMut",s,rmg*="conversation_associations_mut")]
    pub conversation_associations: Vec<ConversationAssociation>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CollaborationType",rg*="participant_associations","CollaborationTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
    #[xml(child = "bpmn:messageFlowAssociation")]
    #[tia("CollaborationType",rg*="message_flow_associations","CollaborationTypeMut",s,rmg*="message_flow_associations_mut")]
    pub message_flow_associations: Vec<MessageFlowAssociation>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("CollaborationType",rg*="correlation_keys","CollaborationTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(flatten_text = "bpmn:choreographyRef")]
    #[tia("CollaborationType",rg*="choreography_refs","CollaborationTypeMut",s,rmg*="choreography_refs_mut")]
    pub choreography_refs: Vec<String>,
    #[xml(child = "bpmn:conversationLink")]
    #[tia("CollaborationType",rg*="conversation_links","CollaborationTypeMut",s,rmg*="conversation_links_mut")]
    pub conversation_links: Vec<ConversationLink>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("ChoreographyType",rg*="flow_elements","ChoreographyTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
}
impl DocumentElement for Choreography {
    fn element(&self) -> Element {
        Element::Choreography
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Choreography {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.flow_elements.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.flow_elements.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Choreography {}
impl RootElementTypeMut for Choreography {}
//

/// Access to `choreography`
pub trait ChoreographyType: CollaborationType + Downcast + Debug + Send + DynClone {
    /// Get value of `flowElement` child
    fn flow_elements(&self) -> &Vec<FlowElement>;
}
dyn_clone::clone_trait_object!(ChoreographyType);
impl_downcast!(ChoreographyType);
/// Mutable access to `choreography`
pub trait ChoreographyTypeMut:
    CollaborationTypeMut + Downcast + Debug + Send + DynClone + ChoreographyType
{
    /// Get a mutable value of `flowElement` child
    fn flow_elements_mut(&mut self) -> &mut Vec<FlowElement>;
    /// Set value of `flowElement` child
    fn set_flow_elements(&mut self, value: Vec<FlowElement>);
}
dyn_clone::clone_trait_object!(ChoreographyTypeMut);
impl_downcast!(ChoreographyTypeMut);
impl Cast<dyn DefinitionsType> for Choreography {}
impl Cast<dyn DefinitionsTypeMut> for Choreography {}
impl Cast<dyn ImportType> for Choreography {}
impl Cast<dyn ImportTypeMut> for Choreography {}
impl Cast<dyn ActivityType> for Choreography {}
impl Cast<dyn ActivityTypeMut> for Choreography {}
impl Cast<dyn AdHocSubProcessType> for Choreography {}
impl Cast<dyn AdHocSubProcessTypeMut> for Choreography {}
impl Cast<dyn ArtifactType> for Choreography {}
impl Cast<dyn ArtifactTypeMut> for Choreography {}
impl Cast<dyn AssignmentType> for Choreography {}
impl Cast<dyn AssignmentTypeMut> for Choreography {}
impl Cast<dyn AssociationType> for Choreography {}
impl Cast<dyn AssociationTypeMut> for Choreography {}
impl Cast<dyn AuditingType> for Choreography {}
impl Cast<dyn AuditingTypeMut> for Choreography {}
impl Cast<dyn BaseElementType> for Choreography {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Choreography {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Choreography {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Choreography {}
impl Cast<dyn BoundaryEventType> for Choreography {}
impl Cast<dyn BoundaryEventTypeMut> for Choreography {}
impl Cast<dyn BusinessRuleTaskType> for Choreography {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Choreography {}
impl Cast<dyn CallableElementType> for Choreography {}
impl Cast<dyn CallableElementTypeMut> for Choreography {}
impl Cast<dyn CallActivityType> for Choreography {}
impl Cast<dyn CallActivityTypeMut> for Choreography {}
impl Cast<dyn CallChoreographyType> for Choreography {}
impl Cast<dyn CallChoreographyTypeMut> for Choreography {}
impl Cast<dyn CallConversationType> for Choreography {}
impl Cast<dyn CallConversationTypeMut> for Choreography {}
impl Cast<dyn CancelEventDefinitionType> for Choreography {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn CatchEventType> for Choreography {}
impl Cast<dyn CatchEventTypeMut> for Choreography {}
impl Cast<dyn CategoryType> for Choreography {}
impl Cast<dyn CategoryTypeMut> for Choreography {}
impl Cast<dyn CategoryValueType> for Choreography {}
impl Cast<dyn CategoryValueTypeMut> for Choreography {}
impl Cast<dyn ChoreographyType> for Choreography {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTypeMut> for Choreography {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyActivityType> for Choreography {}
impl Cast<dyn ChoreographyActivityTypeMut> for Choreography {}
impl Cast<dyn ChoreographyTaskType> for Choreography {}
impl Cast<dyn ChoreographyTaskTypeMut> for Choreography {}
impl Cast<dyn CollaborationType> for Choreography {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CollaborationTypeMut> for Choreography {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CompensateEventDefinitionType> for Choreography {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Choreography {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Choreography {}
impl Cast<dyn ComplexGatewayType> for Choreography {}
impl Cast<dyn ComplexGatewayTypeMut> for Choreography {}
impl Cast<dyn ConditionalEventDefinitionType> for Choreography {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn ConversationType> for Choreography {}
impl Cast<dyn ConversationTypeMut> for Choreography {}
impl Cast<dyn ConversationAssociationType> for Choreography {}
impl Cast<dyn ConversationAssociationTypeMut> for Choreography {}
impl Cast<dyn ConversationLinkType> for Choreography {}
impl Cast<dyn ConversationLinkTypeMut> for Choreography {}
impl Cast<dyn ConversationNodeType> for Choreography {}
impl Cast<dyn ConversationNodeTypeMut> for Choreography {}
impl Cast<dyn CorrelationKeyType> for Choreography {}
impl Cast<dyn CorrelationKeyTypeMut> for Choreography {}
impl Cast<dyn CorrelationPropertyType> for Choreography {}
impl Cast<dyn CorrelationPropertyTypeMut> for Choreography {}
impl Cast<dyn CorrelationPropertyBindingType> for Choreography {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Choreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Choreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Choreography {}
impl Cast<dyn CorrelationSubscriptionType> for Choreography {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Choreography {}
impl Cast<dyn DataAssociationType> for Choreography {}
impl Cast<dyn DataAssociationTypeMut> for Choreography {}
impl Cast<dyn DataInputType> for Choreography {}
impl Cast<dyn DataInputTypeMut> for Choreography {}
impl Cast<dyn DataInputAssociationType> for Choreography {}
impl Cast<dyn DataInputAssociationTypeMut> for Choreography {}
impl Cast<dyn DataObjectType> for Choreography {}
impl Cast<dyn DataObjectTypeMut> for Choreography {}
impl Cast<dyn DataObjectReferenceType> for Choreography {}
impl Cast<dyn DataObjectReferenceTypeMut> for Choreography {}
impl Cast<dyn DataOutputType> for Choreography {}
impl Cast<dyn DataOutputTypeMut> for Choreography {}
impl Cast<dyn DataOutputAssociationType> for Choreography {}
impl Cast<dyn DataOutputAssociationTypeMut> for Choreography {}
impl Cast<dyn DataStateType> for Choreography {}
impl Cast<dyn DataStateTypeMut> for Choreography {}
impl Cast<dyn DataStoreType> for Choreography {}
impl Cast<dyn DataStoreTypeMut> for Choreography {}
impl Cast<dyn DataStoreReferenceType> for Choreography {}
impl Cast<dyn DataStoreReferenceTypeMut> for Choreography {}
impl Cast<dyn DocumentationType> for Choreography {}
impl Cast<dyn DocumentationTypeMut> for Choreography {}
impl Cast<dyn EndEventType> for Choreography {}
impl Cast<dyn EndEventTypeMut> for Choreography {}
impl Cast<dyn EndPointType> for Choreography {}
impl Cast<dyn EndPointTypeMut> for Choreography {}
impl Cast<dyn ErrorType> for Choreography {}
impl Cast<dyn ErrorTypeMut> for Choreography {}
impl Cast<dyn ErrorEventDefinitionType> for Choreography {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn EscalationType> for Choreography {}
impl Cast<dyn EscalationTypeMut> for Choreography {}
impl Cast<dyn EscalationEventDefinitionType> for Choreography {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn EventType> for Choreography {}
impl Cast<dyn EventTypeMut> for Choreography {}
impl Cast<dyn EventBasedGatewayType> for Choreography {}
impl Cast<dyn EventBasedGatewayTypeMut> for Choreography {}
impl Cast<dyn EventDefinitionType> for Choreography {}
impl Cast<dyn EventDefinitionTypeMut> for Choreography {}
impl Cast<dyn ExclusiveGatewayType> for Choreography {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Choreography {}
impl Cast<dyn ExpressionType> for Choreography {}
impl Cast<dyn ExpressionTypeMut> for Choreography {}
impl Cast<dyn ExtensionType> for Choreography {}
impl Cast<dyn ExtensionTypeMut> for Choreography {}
impl Cast<dyn ExtensionElementsType> for Choreography {}
impl Cast<dyn ExtensionElementsTypeMut> for Choreography {}
impl Cast<dyn FlowElementType> for Choreography {}
impl Cast<dyn FlowElementTypeMut> for Choreography {}
impl Cast<dyn FlowNodeType> for Choreography {}
impl Cast<dyn FlowNodeTypeMut> for Choreography {}
impl Cast<dyn FormalExpressionType> for Choreography {}
impl Cast<dyn FormalExpressionTypeMut> for Choreography {}
impl Cast<dyn GatewayType> for Choreography {}
impl Cast<dyn GatewayTypeMut> for Choreography {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Choreography {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Choreography {}
impl Cast<dyn GlobalChoreographyTaskType> for Choreography {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Choreography {}
impl Cast<dyn GlobalConversationType> for Choreography {}
impl Cast<dyn GlobalConversationTypeMut> for Choreography {}
impl Cast<dyn GlobalManualTaskType> for Choreography {}
impl Cast<dyn GlobalManualTaskTypeMut> for Choreography {}
impl Cast<dyn GlobalScriptTaskType> for Choreography {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Choreography {}
impl Cast<dyn GlobalTaskType> for Choreography {}
impl Cast<dyn GlobalTaskTypeMut> for Choreography {}
impl Cast<dyn GlobalUserTaskType> for Choreography {}
impl Cast<dyn GlobalUserTaskTypeMut> for Choreography {}
impl Cast<dyn GroupType> for Choreography {}
impl Cast<dyn GroupTypeMut> for Choreography {}
impl Cast<dyn HumanPerformerType> for Choreography {}
impl Cast<dyn HumanPerformerTypeMut> for Choreography {}
impl Cast<dyn ImplicitThrowEventType> for Choreography {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Choreography {}
impl Cast<dyn InclusiveGatewayType> for Choreography {}
impl Cast<dyn InclusiveGatewayTypeMut> for Choreography {}
impl Cast<dyn InputSetType> for Choreography {}
impl Cast<dyn InputSetTypeMut> for Choreography {}
impl Cast<dyn InterfaceType> for Choreography {}
impl Cast<dyn InterfaceTypeMut> for Choreography {}
impl Cast<dyn IntermediateCatchEventType> for Choreography {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Choreography {}
impl Cast<dyn IntermediateThrowEventType> for Choreography {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Choreography {}
impl Cast<dyn InputOutputBindingType> for Choreography {}
impl Cast<dyn InputOutputBindingTypeMut> for Choreography {}
impl Cast<dyn InputOutputSpecificationType> for Choreography {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Choreography {}
impl Cast<dyn ItemDefinitionType> for Choreography {}
impl Cast<dyn ItemDefinitionTypeMut> for Choreography {}
impl Cast<dyn LaneType> for Choreography {}
impl Cast<dyn LaneTypeMut> for Choreography {}
impl Cast<dyn LaneSetType> for Choreography {}
impl Cast<dyn LaneSetTypeMut> for Choreography {}
impl Cast<dyn LinkEventDefinitionType> for Choreography {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn LoopCharacteristicsType> for Choreography {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Choreography {}
impl Cast<dyn ManualTaskType> for Choreography {}
impl Cast<dyn ManualTaskTypeMut> for Choreography {}
impl Cast<dyn MessageType> for Choreography {}
impl Cast<dyn MessageTypeMut> for Choreography {}
impl Cast<dyn MessageEventDefinitionType> for Choreography {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn MessageFlowType> for Choreography {}
impl Cast<dyn MessageFlowTypeMut> for Choreography {}
impl Cast<dyn MessageFlowAssociationType> for Choreography {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Choreography {}
impl Cast<dyn MonitoringType> for Choreography {}
impl Cast<dyn MonitoringTypeMut> for Choreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Choreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Choreography {}
impl Cast<dyn OperationType> for Choreography {}
impl Cast<dyn OperationTypeMut> for Choreography {}
impl Cast<dyn OutputSetType> for Choreography {}
impl Cast<dyn OutputSetTypeMut> for Choreography {}
impl Cast<dyn ParallelGatewayType> for Choreography {}
impl Cast<dyn ParallelGatewayTypeMut> for Choreography {}
impl Cast<dyn ParticipantType> for Choreography {}
impl Cast<dyn ParticipantTypeMut> for Choreography {}
impl Cast<dyn ParticipantAssociationType> for Choreography {}
impl Cast<dyn ParticipantAssociationTypeMut> for Choreography {}
impl Cast<dyn ParticipantMultiplicityType> for Choreography {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Choreography {}
impl Cast<dyn PartnerEntityType> for Choreography {}
impl Cast<dyn PartnerEntityTypeMut> for Choreography {}
impl Cast<dyn PartnerRoleType> for Choreography {}
impl Cast<dyn PartnerRoleTypeMut> for Choreography {}
impl Cast<dyn PerformerType> for Choreography {}
impl Cast<dyn PerformerTypeMut> for Choreography {}
impl Cast<dyn PotentialOwnerType> for Choreography {}
impl Cast<dyn PotentialOwnerTypeMut> for Choreography {}
impl Cast<dyn ProcessType> for Choreography {}
impl Cast<dyn ProcessTypeMut> for Choreography {}
impl Cast<dyn PropertyType> for Choreography {}
impl Cast<dyn PropertyTypeMut> for Choreography {}
impl Cast<dyn ReceiveTaskType> for Choreography {}
impl Cast<dyn ReceiveTaskTypeMut> for Choreography {}
impl Cast<dyn RelationshipType> for Choreography {}
impl Cast<dyn RelationshipTypeMut> for Choreography {}
impl Cast<dyn RenderingType> for Choreography {}
impl Cast<dyn RenderingTypeMut> for Choreography {}
impl Cast<dyn ResourceType> for Choreography {}
impl Cast<dyn ResourceTypeMut> for Choreography {}
impl Cast<dyn ResourceAssignmentExpressionType> for Choreography {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Choreography {}
impl Cast<dyn ResourceParameterType> for Choreography {}
impl Cast<dyn ResourceParameterTypeMut> for Choreography {}
impl Cast<dyn ResourceParameterBindingType> for Choreography {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Choreography {}
impl Cast<dyn ResourceRoleType> for Choreography {}
impl Cast<dyn ResourceRoleTypeMut> for Choreography {}
impl Cast<dyn RootElementType> for Choreography {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Choreography {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Choreography {}
impl Cast<dyn ScriptTaskTypeMut> for Choreography {}
impl Cast<dyn ScriptType> for Choreography {}
impl Cast<dyn ScriptTypeMut> for Choreography {}
impl Cast<dyn SendTaskType> for Choreography {}
impl Cast<dyn SendTaskTypeMut> for Choreography {}
impl Cast<dyn SequenceFlowType> for Choreography {}
impl Cast<dyn SequenceFlowTypeMut> for Choreography {}
impl Cast<dyn ServiceTaskType> for Choreography {}
impl Cast<dyn ServiceTaskTypeMut> for Choreography {}
impl Cast<dyn SignalType> for Choreography {}
impl Cast<dyn SignalTypeMut> for Choreography {}
impl Cast<dyn SignalEventDefinitionType> for Choreography {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn StandardLoopCharacteristicsType> for Choreography {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Choreography {}
impl Cast<dyn StartEventType> for Choreography {}
impl Cast<dyn StartEventTypeMut> for Choreography {}
impl Cast<dyn SubChoreographyType> for Choreography {}
impl Cast<dyn SubChoreographyTypeMut> for Choreography {}
impl Cast<dyn SubConversationType> for Choreography {}
impl Cast<dyn SubConversationTypeMut> for Choreography {}
impl Cast<dyn SubProcessType> for Choreography {}
impl Cast<dyn SubProcessTypeMut> for Choreography {}
impl Cast<dyn TaskType> for Choreography {}
impl Cast<dyn TaskTypeMut> for Choreography {}
impl Cast<dyn TerminateEventDefinitionType> for Choreography {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn TextAnnotationType> for Choreography {}
impl Cast<dyn TextAnnotationTypeMut> for Choreography {}
impl Cast<dyn TextType> for Choreography {}
impl Cast<dyn TextTypeMut> for Choreography {}
impl Cast<dyn ThrowEventType> for Choreography {}
impl Cast<dyn ThrowEventTypeMut> for Choreography {}
impl Cast<dyn TimerEventDefinitionType> for Choreography {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Choreography {}
impl Cast<dyn TransactionType> for Choreography {}
impl Cast<dyn TransactionTypeMut> for Choreography {}
impl Cast<dyn UserTaskType> for Choreography {}
impl Cast<dyn UserTaskTypeMut> for Choreography {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:choreographyActivity")]
#[serde(tag = "type")]
pub enum ChoreographyActivity {}
impl ChoreographyActivity {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for ChoreographyActivity {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for ChoreographyActivity {
    fn element(&self) -> Element {
        Element::ChoreographyActivity
    }
}
/// Access to `choreographyActivity`
pub trait ChoreographyActivityType: FlowNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `initiatingParticipantRef`
    fn initiating_participant_ref(&self) -> &String;
    /// Get value of attribute `loopType`
    fn loop_type(&self) -> &Option<String>;
    /// Get value of `participantRef` child
    fn participant_refs(&self) -> &Vec<String>;
    /// Get value of `correlationKey` child
    fn correlation_keys(&self) -> &Vec<CorrelationKey>;
}
dyn_clone::clone_trait_object!(ChoreographyActivityType);
impl_downcast!(ChoreographyActivityType);
/// Mutable access to `choreographyActivity`
pub trait ChoreographyActivityTypeMut:
    FlowNodeTypeMut + Downcast + Debug + Send + DynClone + ChoreographyActivityType
{
    /// Set value of attribute `initiatingParticipantRef`
    fn set_initiating_participant_ref(&mut self, value: String);
    /// Set value of attribute `loopType`
    fn set_loop_type(&mut self, value: Option<String>);
    /// Get a mutable value of `participantRef` child
    fn participant_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `participantRef` child
    fn set_participant_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `correlationKey` child
    fn correlation_keys_mut(&mut self) -> &mut Vec<CorrelationKey>;
    /// Set value of `correlationKey` child
    fn set_correlation_keys(&mut self, value: Vec<CorrelationKey>);
}
dyn_clone::clone_trait_object!(ChoreographyActivityTypeMut);
impl_downcast!(ChoreographyActivityTypeMut);
impl Cast<dyn DefinitionsType> for ChoreographyActivity {}
impl Cast<dyn DefinitionsTypeMut> for ChoreographyActivity {}
impl Cast<dyn ImportType> for ChoreographyActivity {}
impl Cast<dyn ImportTypeMut> for ChoreographyActivity {}
impl Cast<dyn ActivityType> for ChoreographyActivity {}
impl Cast<dyn ActivityTypeMut> for ChoreographyActivity {}
impl Cast<dyn AdHocSubProcessType> for ChoreographyActivity {}
impl Cast<dyn AdHocSubProcessTypeMut> for ChoreographyActivity {}
impl Cast<dyn ArtifactType> for ChoreographyActivity {}
impl Cast<dyn ArtifactTypeMut> for ChoreographyActivity {}
impl Cast<dyn AssignmentType> for ChoreographyActivity {}
impl Cast<dyn AssignmentTypeMut> for ChoreographyActivity {}
impl Cast<dyn AssociationType> for ChoreographyActivity {}
impl Cast<dyn AssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn AuditingType> for ChoreographyActivity {}
impl Cast<dyn AuditingTypeMut> for ChoreographyActivity {}
impl Cast<dyn BaseElementType> for ChoreographyActivity {}
impl Cast<dyn BaseElementTypeMut> for ChoreographyActivity {}
impl Cast<dyn BaseElementWithMixedContentType> for ChoreographyActivity {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ChoreographyActivity {}
impl Cast<dyn BoundaryEventType> for ChoreographyActivity {}
impl Cast<dyn BoundaryEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn BusinessRuleTaskType> for ChoreographyActivity {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn CallableElementType> for ChoreographyActivity {}
impl Cast<dyn CallableElementTypeMut> for ChoreographyActivity {}
impl Cast<dyn CallActivityType> for ChoreographyActivity {}
impl Cast<dyn CallActivityTypeMut> for ChoreographyActivity {}
impl Cast<dyn CallChoreographyType> for ChoreographyActivity {}
impl Cast<dyn CallChoreographyTypeMut> for ChoreographyActivity {}
impl Cast<dyn CallConversationType> for ChoreographyActivity {}
impl Cast<dyn CallConversationTypeMut> for ChoreographyActivity {}
impl Cast<dyn CancelEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn CatchEventType> for ChoreographyActivity {}
impl Cast<dyn CatchEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn CategoryType> for ChoreographyActivity {}
impl Cast<dyn CategoryTypeMut> for ChoreographyActivity {}
impl Cast<dyn CategoryValueType> for ChoreographyActivity {}
impl Cast<dyn CategoryValueTypeMut> for ChoreographyActivity {}
impl Cast<dyn ChoreographyType> for ChoreographyActivity {}
impl Cast<dyn ChoreographyTypeMut> for ChoreographyActivity {}
impl Cast<dyn ChoreographyActivityType> for ChoreographyActivity {}
impl Cast<dyn ChoreographyActivityTypeMut> for ChoreographyActivity {}
impl Cast<dyn ChoreographyTaskType> for ChoreographyActivity {}
impl Cast<dyn ChoreographyTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn CollaborationType> for ChoreographyActivity {}
impl Cast<dyn CollaborationTypeMut> for ChoreographyActivity {}
impl Cast<dyn CompensateEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ChoreographyActivity {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ComplexGatewayType> for ChoreographyActivity {}
impl Cast<dyn ComplexGatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn ConditionalEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ConversationType> for ChoreographyActivity {}
impl Cast<dyn ConversationTypeMut> for ChoreographyActivity {}
impl Cast<dyn ConversationAssociationType> for ChoreographyActivity {}
impl Cast<dyn ConversationAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn ConversationLinkType> for ChoreographyActivity {}
impl Cast<dyn ConversationLinkTypeMut> for ChoreographyActivity {}
impl Cast<dyn ConversationNodeType> for ChoreographyActivity {}
impl Cast<dyn ConversationNodeTypeMut> for ChoreographyActivity {}
impl Cast<dyn CorrelationKeyType> for ChoreographyActivity {}
impl Cast<dyn CorrelationKeyTypeMut> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyType> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyTypeMut> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyBindingType> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ChoreographyActivity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ChoreographyActivity {}
impl Cast<dyn CorrelationSubscriptionType> for ChoreographyActivity {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataAssociationType> for ChoreographyActivity {}
impl Cast<dyn DataAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataInputType> for ChoreographyActivity {}
impl Cast<dyn DataInputTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataInputAssociationType> for ChoreographyActivity {}
impl Cast<dyn DataInputAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataObjectType> for ChoreographyActivity {}
impl Cast<dyn DataObjectTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataObjectReferenceType> for ChoreographyActivity {}
impl Cast<dyn DataObjectReferenceTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataOutputType> for ChoreographyActivity {}
impl Cast<dyn DataOutputTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataOutputAssociationType> for ChoreographyActivity {}
impl Cast<dyn DataOutputAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataStateType> for ChoreographyActivity {}
impl Cast<dyn DataStateTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataStoreType> for ChoreographyActivity {}
impl Cast<dyn DataStoreTypeMut> for ChoreographyActivity {}
impl Cast<dyn DataStoreReferenceType> for ChoreographyActivity {}
impl Cast<dyn DataStoreReferenceTypeMut> for ChoreographyActivity {}
impl Cast<dyn DocumentationType> for ChoreographyActivity {}
impl Cast<dyn DocumentationTypeMut> for ChoreographyActivity {}
impl Cast<dyn EndEventType> for ChoreographyActivity {}
impl Cast<dyn EndEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn EndPointType> for ChoreographyActivity {}
impl Cast<dyn EndPointTypeMut> for ChoreographyActivity {}
impl Cast<dyn ErrorType> for ChoreographyActivity {}
impl Cast<dyn ErrorTypeMut> for ChoreographyActivity {}
impl Cast<dyn ErrorEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn EscalationType> for ChoreographyActivity {}
impl Cast<dyn EscalationTypeMut> for ChoreographyActivity {}
impl Cast<dyn EscalationEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn EventType> for ChoreographyActivity {}
impl Cast<dyn EventTypeMut> for ChoreographyActivity {}
impl Cast<dyn EventBasedGatewayType> for ChoreographyActivity {}
impl Cast<dyn EventBasedGatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn EventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn EventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ExclusiveGatewayType> for ChoreographyActivity {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn ExpressionType> for ChoreographyActivity {}
impl Cast<dyn ExpressionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ExtensionType> for ChoreographyActivity {}
impl Cast<dyn ExtensionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ExtensionElementsType> for ChoreographyActivity {}
impl Cast<dyn ExtensionElementsTypeMut> for ChoreographyActivity {}
impl Cast<dyn FlowElementType> for ChoreographyActivity {}
impl Cast<dyn FlowElementTypeMut> for ChoreographyActivity {}
impl Cast<dyn FlowNodeType> for ChoreographyActivity {}
impl Cast<dyn FlowNodeTypeMut> for ChoreographyActivity {}
impl Cast<dyn FormalExpressionType> for ChoreographyActivity {}
impl Cast<dyn FormalExpressionTypeMut> for ChoreographyActivity {}
impl Cast<dyn GatewayType> for ChoreographyActivity {}
impl Cast<dyn GatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalChoreographyTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalConversationType> for ChoreographyActivity {}
impl Cast<dyn GlobalConversationTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalManualTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalManualTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalScriptTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GlobalUserTaskType> for ChoreographyActivity {}
impl Cast<dyn GlobalUserTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn GroupType> for ChoreographyActivity {}
impl Cast<dyn GroupTypeMut> for ChoreographyActivity {}
impl Cast<dyn HumanPerformerType> for ChoreographyActivity {}
impl Cast<dyn HumanPerformerTypeMut> for ChoreographyActivity {}
impl Cast<dyn ImplicitThrowEventType> for ChoreographyActivity {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn InclusiveGatewayType> for ChoreographyActivity {}
impl Cast<dyn InclusiveGatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn InputSetType> for ChoreographyActivity {}
impl Cast<dyn InputSetTypeMut> for ChoreographyActivity {}
impl Cast<dyn InterfaceType> for ChoreographyActivity {}
impl Cast<dyn InterfaceTypeMut> for ChoreographyActivity {}
impl Cast<dyn IntermediateCatchEventType> for ChoreographyActivity {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn IntermediateThrowEventType> for ChoreographyActivity {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn InputOutputBindingType> for ChoreographyActivity {}
impl Cast<dyn InputOutputBindingTypeMut> for ChoreographyActivity {}
impl Cast<dyn InputOutputSpecificationType> for ChoreographyActivity {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ChoreographyActivity {}
impl Cast<dyn ItemDefinitionType> for ChoreographyActivity {}
impl Cast<dyn ItemDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn LaneType> for ChoreographyActivity {}
impl Cast<dyn LaneTypeMut> for ChoreographyActivity {}
impl Cast<dyn LaneSetType> for ChoreographyActivity {}
impl Cast<dyn LaneSetTypeMut> for ChoreographyActivity {}
impl Cast<dyn LinkEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn LoopCharacteristicsType> for ChoreographyActivity {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ChoreographyActivity {}
impl Cast<dyn ManualTaskType> for ChoreographyActivity {}
impl Cast<dyn ManualTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn MessageType> for ChoreographyActivity {}
impl Cast<dyn MessageTypeMut> for ChoreographyActivity {}
impl Cast<dyn MessageEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn MessageFlowType> for ChoreographyActivity {}
impl Cast<dyn MessageFlowTypeMut> for ChoreographyActivity {}
impl Cast<dyn MessageFlowAssociationType> for ChoreographyActivity {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn MonitoringType> for ChoreographyActivity {}
impl Cast<dyn MonitoringTypeMut> for ChoreographyActivity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ChoreographyActivity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ChoreographyActivity {}
impl Cast<dyn OperationType> for ChoreographyActivity {}
impl Cast<dyn OperationTypeMut> for ChoreographyActivity {}
impl Cast<dyn OutputSetType> for ChoreographyActivity {}
impl Cast<dyn OutputSetTypeMut> for ChoreographyActivity {}
impl Cast<dyn ParallelGatewayType> for ChoreographyActivity {}
impl Cast<dyn ParallelGatewayTypeMut> for ChoreographyActivity {}
impl Cast<dyn ParticipantType> for ChoreographyActivity {}
impl Cast<dyn ParticipantTypeMut> for ChoreographyActivity {}
impl Cast<dyn ParticipantAssociationType> for ChoreographyActivity {}
impl Cast<dyn ParticipantAssociationTypeMut> for ChoreographyActivity {}
impl Cast<dyn ParticipantMultiplicityType> for ChoreographyActivity {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ChoreographyActivity {}
impl Cast<dyn PartnerEntityType> for ChoreographyActivity {}
impl Cast<dyn PartnerEntityTypeMut> for ChoreographyActivity {}
impl Cast<dyn PartnerRoleType> for ChoreographyActivity {}
impl Cast<dyn PartnerRoleTypeMut> for ChoreographyActivity {}
impl Cast<dyn PerformerType> for ChoreographyActivity {}
impl Cast<dyn PerformerTypeMut> for ChoreographyActivity {}
impl Cast<dyn PotentialOwnerType> for ChoreographyActivity {}
impl Cast<dyn PotentialOwnerTypeMut> for ChoreographyActivity {}
impl Cast<dyn ProcessType> for ChoreographyActivity {}
impl Cast<dyn ProcessTypeMut> for ChoreographyActivity {}
impl Cast<dyn PropertyType> for ChoreographyActivity {}
impl Cast<dyn PropertyTypeMut> for ChoreographyActivity {}
impl Cast<dyn ReceiveTaskType> for ChoreographyActivity {}
impl Cast<dyn ReceiveTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn RelationshipType> for ChoreographyActivity {}
impl Cast<dyn RelationshipTypeMut> for ChoreographyActivity {}
impl Cast<dyn RenderingType> for ChoreographyActivity {}
impl Cast<dyn RenderingTypeMut> for ChoreographyActivity {}
impl Cast<dyn ResourceType> for ChoreographyActivity {}
impl Cast<dyn ResourceTypeMut> for ChoreographyActivity {}
impl Cast<dyn ResourceAssignmentExpressionType> for ChoreographyActivity {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ChoreographyActivity {}
impl Cast<dyn ResourceParameterType> for ChoreographyActivity {}
impl Cast<dyn ResourceParameterTypeMut> for ChoreographyActivity {}
impl Cast<dyn ResourceParameterBindingType> for ChoreographyActivity {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ChoreographyActivity {}
impl Cast<dyn ResourceRoleType> for ChoreographyActivity {}
impl Cast<dyn ResourceRoleTypeMut> for ChoreographyActivity {}
impl Cast<dyn RootElementType> for ChoreographyActivity {}
impl Cast<dyn RootElementTypeMut> for ChoreographyActivity {}
impl Cast<dyn ScriptTaskType> for ChoreographyActivity {}
impl Cast<dyn ScriptTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn ScriptType> for ChoreographyActivity {}
impl Cast<dyn ScriptTypeMut> for ChoreographyActivity {}
impl Cast<dyn SendTaskType> for ChoreographyActivity {}
impl Cast<dyn SendTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn SequenceFlowType> for ChoreographyActivity {}
impl Cast<dyn SequenceFlowTypeMut> for ChoreographyActivity {}
impl Cast<dyn ServiceTaskType> for ChoreographyActivity {}
impl Cast<dyn ServiceTaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn SignalType> for ChoreographyActivity {}
impl Cast<dyn SignalTypeMut> for ChoreographyActivity {}
impl Cast<dyn SignalEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn StandardLoopCharacteristicsType> for ChoreographyActivity {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ChoreographyActivity {}
impl Cast<dyn StartEventType> for ChoreographyActivity {}
impl Cast<dyn StartEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn SubChoreographyType> for ChoreographyActivity {}
impl Cast<dyn SubChoreographyTypeMut> for ChoreographyActivity {}
impl Cast<dyn SubConversationType> for ChoreographyActivity {}
impl Cast<dyn SubConversationTypeMut> for ChoreographyActivity {}
impl Cast<dyn SubProcessType> for ChoreographyActivity {}
impl Cast<dyn SubProcessTypeMut> for ChoreographyActivity {}
impl Cast<dyn TaskType> for ChoreographyActivity {}
impl Cast<dyn TaskTypeMut> for ChoreographyActivity {}
impl Cast<dyn TerminateEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn TextAnnotationType> for ChoreographyActivity {}
impl Cast<dyn TextAnnotationTypeMut> for ChoreographyActivity {}
impl Cast<dyn TextType> for ChoreographyActivity {}
impl Cast<dyn TextTypeMut> for ChoreographyActivity {}
impl Cast<dyn ThrowEventType> for ChoreographyActivity {}
impl Cast<dyn ThrowEventTypeMut> for ChoreographyActivity {}
impl Cast<dyn TimerEventDefinitionType> for ChoreographyActivity {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ChoreographyActivity {}
impl Cast<dyn TransactionType> for ChoreographyActivity {}
impl Cast<dyn TransactionTypeMut> for ChoreographyActivity {}
impl Cast<dyn UserTaskType> for ChoreographyActivity {}
impl Cast<dyn UserTaskTypeMut> for ChoreographyActivity {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:choreographyTask")]
pub struct ChoreographyTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "initiatingParticipantRef")]
    #[tia("ChoreographyActivityType",rg*="initiating_participant_ref","ChoreographyActivityTypeMut",s)]
    pub initiating_participant_ref: String,
    #[xml(attr = "loopType")]
    #[tia("ChoreographyActivityType",rg*="loop_type","ChoreographyActivityTypeMut",s)]
    pub loop_type: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ChoreographyActivityType",rg*="participant_refs","ChoreographyActivityTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ChoreographyActivityType",rg*="correlation_keys","ChoreographyActivityTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(flatten_text = "bpmn:messageFlowRef")]
    #[tia("ChoreographyTaskType",rg*="message_flow_ref","ChoreographyTaskTypeMut",s,rmg*="message_flow_ref_mut")]
    pub message_flow_ref: String,
}
impl DocumentElement for ChoreographyTask {
    fn element(&self) -> Element {
        Element::ChoreographyTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ChoreographyTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `choreographyTask`
pub trait ChoreographyTaskType:
    ChoreographyActivityType + Downcast + Debug + Send + DynClone
{
    /// Get value of `messageFlowRef` child
    fn message_flow_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(ChoreographyTaskType);
impl_downcast!(ChoreographyTaskType);
/// Mutable access to `choreographyTask`
pub trait ChoreographyTaskTypeMut:
    ChoreographyActivityTypeMut + Downcast + Debug + Send + DynClone + ChoreographyTaskType
{
    /// Get a mutable value of `messageFlowRef` child
    fn message_flow_ref_mut(&mut self) -> &mut String;
    /// Set value of `messageFlowRef` child
    fn set_message_flow_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(ChoreographyTaskTypeMut);
impl_downcast!(ChoreographyTaskTypeMut);
impl Cast<dyn DefinitionsType> for ChoreographyTask {}
impl Cast<dyn DefinitionsTypeMut> for ChoreographyTask {}
impl Cast<dyn ImportType> for ChoreographyTask {}
impl Cast<dyn ImportTypeMut> for ChoreographyTask {}
impl Cast<dyn ActivityType> for ChoreographyTask {}
impl Cast<dyn ActivityTypeMut> for ChoreographyTask {}
impl Cast<dyn AdHocSubProcessType> for ChoreographyTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for ChoreographyTask {}
impl Cast<dyn ArtifactType> for ChoreographyTask {}
impl Cast<dyn ArtifactTypeMut> for ChoreographyTask {}
impl Cast<dyn AssignmentType> for ChoreographyTask {}
impl Cast<dyn AssignmentTypeMut> for ChoreographyTask {}
impl Cast<dyn AssociationType> for ChoreographyTask {}
impl Cast<dyn AssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn AuditingType> for ChoreographyTask {}
impl Cast<dyn AuditingTypeMut> for ChoreographyTask {}
impl Cast<dyn BaseElementType> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ChoreographyTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ChoreographyTask {}
impl Cast<dyn BoundaryEventType> for ChoreographyTask {}
impl Cast<dyn BoundaryEventTypeMut> for ChoreographyTask {}
impl Cast<dyn BusinessRuleTaskType> for ChoreographyTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn CallableElementType> for ChoreographyTask {}
impl Cast<dyn CallableElementTypeMut> for ChoreographyTask {}
impl Cast<dyn CallActivityType> for ChoreographyTask {}
impl Cast<dyn CallActivityTypeMut> for ChoreographyTask {}
impl Cast<dyn CallChoreographyType> for ChoreographyTask {}
impl Cast<dyn CallChoreographyTypeMut> for ChoreographyTask {}
impl Cast<dyn CallConversationType> for ChoreographyTask {}
impl Cast<dyn CallConversationTypeMut> for ChoreographyTask {}
impl Cast<dyn CancelEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn CatchEventType> for ChoreographyTask {}
impl Cast<dyn CatchEventTypeMut> for ChoreographyTask {}
impl Cast<dyn CategoryType> for ChoreographyTask {}
impl Cast<dyn CategoryTypeMut> for ChoreographyTask {}
impl Cast<dyn CategoryValueType> for ChoreographyTask {}
impl Cast<dyn CategoryValueTypeMut> for ChoreographyTask {}
impl Cast<dyn ChoreographyType> for ChoreographyTask {}
impl Cast<dyn ChoreographyTypeMut> for ChoreographyTask {}
impl Cast<dyn ChoreographyActivityType> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTaskType> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CollaborationType> for ChoreographyTask {}
impl Cast<dyn CollaborationTypeMut> for ChoreographyTask {}
impl Cast<dyn CompensateEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ChoreographyTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn ComplexGatewayType> for ChoreographyTask {}
impl Cast<dyn ComplexGatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn ConditionalEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn ConversationType> for ChoreographyTask {}
impl Cast<dyn ConversationTypeMut> for ChoreographyTask {}
impl Cast<dyn ConversationAssociationType> for ChoreographyTask {}
impl Cast<dyn ConversationAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn ConversationLinkType> for ChoreographyTask {}
impl Cast<dyn ConversationLinkTypeMut> for ChoreographyTask {}
impl Cast<dyn ConversationNodeType> for ChoreographyTask {}
impl Cast<dyn ConversationNodeTypeMut> for ChoreographyTask {}
impl Cast<dyn CorrelationKeyType> for ChoreographyTask {}
impl Cast<dyn CorrelationKeyTypeMut> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyType> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyBindingType> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ChoreographyTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ChoreographyTask {}
impl Cast<dyn CorrelationSubscriptionType> for ChoreographyTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ChoreographyTask {}
impl Cast<dyn DataAssociationType> for ChoreographyTask {}
impl Cast<dyn DataAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn DataInputType> for ChoreographyTask {}
impl Cast<dyn DataInputTypeMut> for ChoreographyTask {}
impl Cast<dyn DataInputAssociationType> for ChoreographyTask {}
impl Cast<dyn DataInputAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn DataObjectType> for ChoreographyTask {}
impl Cast<dyn DataObjectTypeMut> for ChoreographyTask {}
impl Cast<dyn DataObjectReferenceType> for ChoreographyTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for ChoreographyTask {}
impl Cast<dyn DataOutputType> for ChoreographyTask {}
impl Cast<dyn DataOutputTypeMut> for ChoreographyTask {}
impl Cast<dyn DataOutputAssociationType> for ChoreographyTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn DataStateType> for ChoreographyTask {}
impl Cast<dyn DataStateTypeMut> for ChoreographyTask {}
impl Cast<dyn DataStoreType> for ChoreographyTask {}
impl Cast<dyn DataStoreTypeMut> for ChoreographyTask {}
impl Cast<dyn DataStoreReferenceType> for ChoreographyTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for ChoreographyTask {}
impl Cast<dyn DocumentationType> for ChoreographyTask {}
impl Cast<dyn DocumentationTypeMut> for ChoreographyTask {}
impl Cast<dyn EndEventType> for ChoreographyTask {}
impl Cast<dyn EndEventTypeMut> for ChoreographyTask {}
impl Cast<dyn EndPointType> for ChoreographyTask {}
impl Cast<dyn EndPointTypeMut> for ChoreographyTask {}
impl Cast<dyn ErrorType> for ChoreographyTask {}
impl Cast<dyn ErrorTypeMut> for ChoreographyTask {}
impl Cast<dyn ErrorEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn EscalationType> for ChoreographyTask {}
impl Cast<dyn EscalationTypeMut> for ChoreographyTask {}
impl Cast<dyn EscalationEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn EventType> for ChoreographyTask {}
impl Cast<dyn EventTypeMut> for ChoreographyTask {}
impl Cast<dyn EventBasedGatewayType> for ChoreographyTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn EventDefinitionType> for ChoreographyTask {}
impl Cast<dyn EventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn ExclusiveGatewayType> for ChoreographyTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn ExpressionType> for ChoreographyTask {}
impl Cast<dyn ExpressionTypeMut> for ChoreographyTask {}
impl Cast<dyn ExtensionType> for ChoreographyTask {}
impl Cast<dyn ExtensionTypeMut> for ChoreographyTask {}
impl Cast<dyn ExtensionElementsType> for ChoreographyTask {}
impl Cast<dyn ExtensionElementsTypeMut> for ChoreographyTask {}
impl Cast<dyn FlowElementType> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ChoreographyTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ChoreographyTask {}
impl Cast<dyn FormalExpressionTypeMut> for ChoreographyTask {}
impl Cast<dyn GatewayType> for ChoreographyTask {}
impl Cast<dyn GatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalChoreographyTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalConversationType> for ChoreographyTask {}
impl Cast<dyn GlobalConversationTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalManualTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalScriptTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GlobalUserTaskType> for ChoreographyTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn GroupType> for ChoreographyTask {}
impl Cast<dyn GroupTypeMut> for ChoreographyTask {}
impl Cast<dyn HumanPerformerType> for ChoreographyTask {}
impl Cast<dyn HumanPerformerTypeMut> for ChoreographyTask {}
impl Cast<dyn ImplicitThrowEventType> for ChoreographyTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ChoreographyTask {}
impl Cast<dyn InclusiveGatewayType> for ChoreographyTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn InputSetType> for ChoreographyTask {}
impl Cast<dyn InputSetTypeMut> for ChoreographyTask {}
impl Cast<dyn InterfaceType> for ChoreographyTask {}
impl Cast<dyn InterfaceTypeMut> for ChoreographyTask {}
impl Cast<dyn IntermediateCatchEventType> for ChoreographyTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ChoreographyTask {}
impl Cast<dyn IntermediateThrowEventType> for ChoreographyTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ChoreographyTask {}
impl Cast<dyn InputOutputBindingType> for ChoreographyTask {}
impl Cast<dyn InputOutputBindingTypeMut> for ChoreographyTask {}
impl Cast<dyn InputOutputSpecificationType> for ChoreographyTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ChoreographyTask {}
impl Cast<dyn ItemDefinitionType> for ChoreographyTask {}
impl Cast<dyn ItemDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn LaneType> for ChoreographyTask {}
impl Cast<dyn LaneTypeMut> for ChoreographyTask {}
impl Cast<dyn LaneSetType> for ChoreographyTask {}
impl Cast<dyn LaneSetTypeMut> for ChoreographyTask {}
impl Cast<dyn LinkEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn LoopCharacteristicsType> for ChoreographyTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ChoreographyTask {}
impl Cast<dyn ManualTaskType> for ChoreographyTask {}
impl Cast<dyn ManualTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn MessageType> for ChoreographyTask {}
impl Cast<dyn MessageTypeMut> for ChoreographyTask {}
impl Cast<dyn MessageEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn MessageFlowType> for ChoreographyTask {}
impl Cast<dyn MessageFlowTypeMut> for ChoreographyTask {}
impl Cast<dyn MessageFlowAssociationType> for ChoreographyTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn MonitoringType> for ChoreographyTask {}
impl Cast<dyn MonitoringTypeMut> for ChoreographyTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ChoreographyTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ChoreographyTask {}
impl Cast<dyn OperationType> for ChoreographyTask {}
impl Cast<dyn OperationTypeMut> for ChoreographyTask {}
impl Cast<dyn OutputSetType> for ChoreographyTask {}
impl Cast<dyn OutputSetTypeMut> for ChoreographyTask {}
impl Cast<dyn ParallelGatewayType> for ChoreographyTask {}
impl Cast<dyn ParallelGatewayTypeMut> for ChoreographyTask {}
impl Cast<dyn ParticipantType> for ChoreographyTask {}
impl Cast<dyn ParticipantTypeMut> for ChoreographyTask {}
impl Cast<dyn ParticipantAssociationType> for ChoreographyTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for ChoreographyTask {}
impl Cast<dyn ParticipantMultiplicityType> for ChoreographyTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ChoreographyTask {}
impl Cast<dyn PartnerEntityType> for ChoreographyTask {}
impl Cast<dyn PartnerEntityTypeMut> for ChoreographyTask {}
impl Cast<dyn PartnerRoleType> for ChoreographyTask {}
impl Cast<dyn PartnerRoleTypeMut> for ChoreographyTask {}
impl Cast<dyn PerformerType> for ChoreographyTask {}
impl Cast<dyn PerformerTypeMut> for ChoreographyTask {}
impl Cast<dyn PotentialOwnerType> for ChoreographyTask {}
impl Cast<dyn PotentialOwnerTypeMut> for ChoreographyTask {}
impl Cast<dyn ProcessType> for ChoreographyTask {}
impl Cast<dyn ProcessTypeMut> for ChoreographyTask {}
impl Cast<dyn PropertyType> for ChoreographyTask {}
impl Cast<dyn PropertyTypeMut> for ChoreographyTask {}
impl Cast<dyn ReceiveTaskType> for ChoreographyTask {}
impl Cast<dyn ReceiveTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn RelationshipType> for ChoreographyTask {}
impl Cast<dyn RelationshipTypeMut> for ChoreographyTask {}
impl Cast<dyn RenderingType> for ChoreographyTask {}
impl Cast<dyn RenderingTypeMut> for ChoreographyTask {}
impl Cast<dyn ResourceType> for ChoreographyTask {}
impl Cast<dyn ResourceTypeMut> for ChoreographyTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for ChoreographyTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ChoreographyTask {}
impl Cast<dyn ResourceParameterType> for ChoreographyTask {}
impl Cast<dyn ResourceParameterTypeMut> for ChoreographyTask {}
impl Cast<dyn ResourceParameterBindingType> for ChoreographyTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ChoreographyTask {}
impl Cast<dyn ResourceRoleType> for ChoreographyTask {}
impl Cast<dyn ResourceRoleTypeMut> for ChoreographyTask {}
impl Cast<dyn RootElementType> for ChoreographyTask {}
impl Cast<dyn RootElementTypeMut> for ChoreographyTask {}
impl Cast<dyn ScriptTaskType> for ChoreographyTask {}
impl Cast<dyn ScriptTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn ScriptType> for ChoreographyTask {}
impl Cast<dyn ScriptTypeMut> for ChoreographyTask {}
impl Cast<dyn SendTaskType> for ChoreographyTask {}
impl Cast<dyn SendTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn SequenceFlowType> for ChoreographyTask {}
impl Cast<dyn SequenceFlowTypeMut> for ChoreographyTask {}
impl Cast<dyn ServiceTaskType> for ChoreographyTask {}
impl Cast<dyn ServiceTaskTypeMut> for ChoreographyTask {}
impl Cast<dyn SignalType> for ChoreographyTask {}
impl Cast<dyn SignalTypeMut> for ChoreographyTask {}
impl Cast<dyn SignalEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for ChoreographyTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ChoreographyTask {}
impl Cast<dyn StartEventType> for ChoreographyTask {}
impl Cast<dyn StartEventTypeMut> for ChoreographyTask {}
impl Cast<dyn SubChoreographyType> for ChoreographyTask {}
impl Cast<dyn SubChoreographyTypeMut> for ChoreographyTask {}
impl Cast<dyn SubConversationType> for ChoreographyTask {}
impl Cast<dyn SubConversationTypeMut> for ChoreographyTask {}
impl Cast<dyn SubProcessType> for ChoreographyTask {}
impl Cast<dyn SubProcessTypeMut> for ChoreographyTask {}
impl Cast<dyn TaskType> for ChoreographyTask {}
impl Cast<dyn TaskTypeMut> for ChoreographyTask {}
impl Cast<dyn TerminateEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn TextAnnotationType> for ChoreographyTask {}
impl Cast<dyn TextAnnotationTypeMut> for ChoreographyTask {}
impl Cast<dyn TextType> for ChoreographyTask {}
impl Cast<dyn TextTypeMut> for ChoreographyTask {}
impl Cast<dyn ThrowEventType> for ChoreographyTask {}
impl Cast<dyn ThrowEventTypeMut> for ChoreographyTask {}
impl Cast<dyn TimerEventDefinitionType> for ChoreographyTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ChoreographyTask {}
impl Cast<dyn TransactionType> for ChoreographyTask {}
impl Cast<dyn TransactionTypeMut> for ChoreographyTask {}
impl Cast<dyn UserTaskType> for ChoreographyTask {}
impl Cast<dyn UserTaskTypeMut> for ChoreographyTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:collaboration")]
pub struct Collaboration {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CollaborationType",rg*="name","CollaborationTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "isClosed")]
    #[tia("CollaborationType",rg*="is_closed","CollaborationTypeMut",s)]
    pub is_closed: Option<bool>,
    #[xml(child = "bpmn:participant")]
    #[tia("CollaborationType",rg*="participants","CollaborationTypeMut",s,rmg*="participants_mut")]
    pub participants: Vec<Participant>,
    #[xml(child = "bpmn:messageFlow")]
    #[tia("CollaborationType",rg*="message_flows","CollaborationTypeMut",s,rmg*="message_flows_mut")]
    pub message_flows: Vec<MessageFlow>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("CollaborationType",rg*="artifacts","CollaborationTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(
        child = "bpmn:callConversation",
        child = "bpmn:conversation",
        child = "bpmn:subConversation"
    )]
    #[tia("CollaborationType",rg*="conversation_nodes","CollaborationTypeMut",s,rmg*="conversation_nodes_mut")]
    pub conversation_nodes: Vec<ConversationNode>,
    #[xml(child = "bpmn:conversationAssociation")]
    #[tia("CollaborationType",rg*="conversation_associations","CollaborationTypeMut",s,rmg*="conversation_associations_mut")]
    pub conversation_associations: Vec<ConversationAssociation>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CollaborationType",rg*="participant_associations","CollaborationTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
    #[xml(child = "bpmn:messageFlowAssociation")]
    #[tia("CollaborationType",rg*="message_flow_associations","CollaborationTypeMut",s,rmg*="message_flow_associations_mut")]
    pub message_flow_associations: Vec<MessageFlowAssociation>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("CollaborationType",rg*="correlation_keys","CollaborationTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(flatten_text = "bpmn:choreographyRef")]
    #[tia("CollaborationType",rg*="choreography_refs","CollaborationTypeMut",s,rmg*="choreography_refs_mut")]
    pub choreography_refs: Vec<String>,
    #[xml(child = "bpmn:conversationLink")]
    #[tia("CollaborationType",rg*="conversation_links","CollaborationTypeMut",s,rmg*="conversation_links_mut")]
    pub conversation_links: Vec<ConversationLink>,
}
impl DocumentElement for Collaboration {
    fn element(&self) -> Element {
        Element::Collaboration
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Collaboration {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participants.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.message_flows.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_nodes.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_associations.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.participant_associations.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.message_flow_associations.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.correlation_keys.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_links.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participants.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.message_flows.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_nodes.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_associations.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.participant_associations.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.message_flow_associations.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.correlation_keys.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.conversation_links.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Collaboration {}
impl RootElementTypeMut for Collaboration {}
//

/// Access to `collaboration`
pub trait CollaborationType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `isClosed`
    fn is_closed(&self) -> &Option<bool>;
    /// Get value of `participant` child
    fn participants(&self) -> &Vec<Participant>;
    /// Get value of `messageFlow` child
    fn message_flows(&self) -> &Vec<MessageFlow>;
    /// Get value of `artifact` child
    fn artifacts(&self) -> &Vec<Artifact>;
    /// Get value of `conversationNode` child
    fn conversation_nodes(&self) -> &Vec<ConversationNode>;
    /// Get value of `conversationAssociation` child
    fn conversation_associations(&self) -> &Vec<ConversationAssociation>;
    /// Get value of `participantAssociation` child
    fn participant_associations(&self) -> &Vec<ParticipantAssociation>;
    /// Get value of `messageFlowAssociation` child
    fn message_flow_associations(&self) -> &Vec<MessageFlowAssociation>;
    /// Get value of `correlationKey` child
    fn correlation_keys(&self) -> &Vec<CorrelationKey>;
    /// Get value of `choreographyRef` child
    fn choreography_refs(&self) -> &Vec<String>;
    /// Get value of `conversationLink` child
    fn conversation_links(&self) -> &Vec<ConversationLink>;
}
dyn_clone::clone_trait_object!(CollaborationType);
impl_downcast!(CollaborationType);
/// Mutable access to `collaboration`
pub trait CollaborationTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + CollaborationType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `isClosed`
    fn set_is_closed(&mut self, value: Option<bool>);
    /// Get a mutable value of `participant` child
    fn participants_mut(&mut self) -> &mut Vec<Participant>;
    /// Set value of `participant` child
    fn set_participants(&mut self, value: Vec<Participant>);
    /// Get a mutable value of `messageFlow` child
    fn message_flows_mut(&mut self) -> &mut Vec<MessageFlow>;
    /// Set value of `messageFlow` child
    fn set_message_flows(&mut self, value: Vec<MessageFlow>);
    /// Get a mutable value of `artifact` child
    fn artifacts_mut(&mut self) -> &mut Vec<Artifact>;
    /// Set value of `artifact` child
    fn set_artifacts(&mut self, value: Vec<Artifact>);
    /// Get a mutable value of `conversationNode` child
    fn conversation_nodes_mut(&mut self) -> &mut Vec<ConversationNode>;
    /// Set value of `conversationNode` child
    fn set_conversation_nodes(&mut self, value: Vec<ConversationNode>);
    /// Get a mutable value of `conversationAssociation` child
    fn conversation_associations_mut(&mut self) -> &mut Vec<ConversationAssociation>;
    /// Set value of `conversationAssociation` child
    fn set_conversation_associations(&mut self, value: Vec<ConversationAssociation>);
    /// Get a mutable value of `participantAssociation` child
    fn participant_associations_mut(&mut self) -> &mut Vec<ParticipantAssociation>;
    /// Set value of `participantAssociation` child
    fn set_participant_associations(&mut self, value: Vec<ParticipantAssociation>);
    /// Get a mutable value of `messageFlowAssociation` child
    fn message_flow_associations_mut(&mut self) -> &mut Vec<MessageFlowAssociation>;
    /// Set value of `messageFlowAssociation` child
    fn set_message_flow_associations(&mut self, value: Vec<MessageFlowAssociation>);
    /// Get a mutable value of `correlationKey` child
    fn correlation_keys_mut(&mut self) -> &mut Vec<CorrelationKey>;
    /// Set value of `correlationKey` child
    fn set_correlation_keys(&mut self, value: Vec<CorrelationKey>);
    /// Get a mutable value of `choreographyRef` child
    fn choreography_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `choreographyRef` child
    fn set_choreography_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `conversationLink` child
    fn conversation_links_mut(&mut self) -> &mut Vec<ConversationLink>;
    /// Set value of `conversationLink` child
    fn set_conversation_links(&mut self, value: Vec<ConversationLink>);
}
dyn_clone::clone_trait_object!(CollaborationTypeMut);
impl_downcast!(CollaborationTypeMut);
impl Cast<dyn DefinitionsType> for Collaboration {}
impl Cast<dyn DefinitionsTypeMut> for Collaboration {}
impl Cast<dyn ImportType> for Collaboration {}
impl Cast<dyn ImportTypeMut> for Collaboration {}
impl Cast<dyn ActivityType> for Collaboration {}
impl Cast<dyn ActivityTypeMut> for Collaboration {}
impl Cast<dyn AdHocSubProcessType> for Collaboration {}
impl Cast<dyn AdHocSubProcessTypeMut> for Collaboration {}
impl Cast<dyn ArtifactType> for Collaboration {}
impl Cast<dyn ArtifactTypeMut> for Collaboration {}
impl Cast<dyn AssignmentType> for Collaboration {}
impl Cast<dyn AssignmentTypeMut> for Collaboration {}
impl Cast<dyn AssociationType> for Collaboration {}
impl Cast<dyn AssociationTypeMut> for Collaboration {}
impl Cast<dyn AuditingType> for Collaboration {}
impl Cast<dyn AuditingTypeMut> for Collaboration {}
impl Cast<dyn BaseElementType> for Collaboration {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Collaboration {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Collaboration {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Collaboration {}
impl Cast<dyn BoundaryEventType> for Collaboration {}
impl Cast<dyn BoundaryEventTypeMut> for Collaboration {}
impl Cast<dyn BusinessRuleTaskType> for Collaboration {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Collaboration {}
impl Cast<dyn CallableElementType> for Collaboration {}
impl Cast<dyn CallableElementTypeMut> for Collaboration {}
impl Cast<dyn CallActivityType> for Collaboration {}
impl Cast<dyn CallActivityTypeMut> for Collaboration {}
impl Cast<dyn CallChoreographyType> for Collaboration {}
impl Cast<dyn CallChoreographyTypeMut> for Collaboration {}
impl Cast<dyn CallConversationType> for Collaboration {}
impl Cast<dyn CallConversationTypeMut> for Collaboration {}
impl Cast<dyn CancelEventDefinitionType> for Collaboration {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn CatchEventType> for Collaboration {}
impl Cast<dyn CatchEventTypeMut> for Collaboration {}
impl Cast<dyn CategoryType> for Collaboration {}
impl Cast<dyn CategoryTypeMut> for Collaboration {}
impl Cast<dyn CategoryValueType> for Collaboration {}
impl Cast<dyn CategoryValueTypeMut> for Collaboration {}
impl Cast<dyn ChoreographyType> for Collaboration {}
impl Cast<dyn ChoreographyTypeMut> for Collaboration {}
impl Cast<dyn ChoreographyActivityType> for Collaboration {}
impl Cast<dyn ChoreographyActivityTypeMut> for Collaboration {}
impl Cast<dyn ChoreographyTaskType> for Collaboration {}
impl Cast<dyn ChoreographyTaskTypeMut> for Collaboration {}
impl Cast<dyn CollaborationType> for Collaboration {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CollaborationTypeMut> for Collaboration {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CompensateEventDefinitionType> for Collaboration {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Collaboration {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Collaboration {}
impl Cast<dyn ComplexGatewayType> for Collaboration {}
impl Cast<dyn ComplexGatewayTypeMut> for Collaboration {}
impl Cast<dyn ConditionalEventDefinitionType> for Collaboration {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn ConversationType> for Collaboration {}
impl Cast<dyn ConversationTypeMut> for Collaboration {}
impl Cast<dyn ConversationAssociationType> for Collaboration {}
impl Cast<dyn ConversationAssociationTypeMut> for Collaboration {}
impl Cast<dyn ConversationLinkType> for Collaboration {}
impl Cast<dyn ConversationLinkTypeMut> for Collaboration {}
impl Cast<dyn ConversationNodeType> for Collaboration {}
impl Cast<dyn ConversationNodeTypeMut> for Collaboration {}
impl Cast<dyn CorrelationKeyType> for Collaboration {}
impl Cast<dyn CorrelationKeyTypeMut> for Collaboration {}
impl Cast<dyn CorrelationPropertyType> for Collaboration {}
impl Cast<dyn CorrelationPropertyTypeMut> for Collaboration {}
impl Cast<dyn CorrelationPropertyBindingType> for Collaboration {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Collaboration {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Collaboration {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Collaboration {}
impl Cast<dyn CorrelationSubscriptionType> for Collaboration {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Collaboration {}
impl Cast<dyn DataAssociationType> for Collaboration {}
impl Cast<dyn DataAssociationTypeMut> for Collaboration {}
impl Cast<dyn DataInputType> for Collaboration {}
impl Cast<dyn DataInputTypeMut> for Collaboration {}
impl Cast<dyn DataInputAssociationType> for Collaboration {}
impl Cast<dyn DataInputAssociationTypeMut> for Collaboration {}
impl Cast<dyn DataObjectType> for Collaboration {}
impl Cast<dyn DataObjectTypeMut> for Collaboration {}
impl Cast<dyn DataObjectReferenceType> for Collaboration {}
impl Cast<dyn DataObjectReferenceTypeMut> for Collaboration {}
impl Cast<dyn DataOutputType> for Collaboration {}
impl Cast<dyn DataOutputTypeMut> for Collaboration {}
impl Cast<dyn DataOutputAssociationType> for Collaboration {}
impl Cast<dyn DataOutputAssociationTypeMut> for Collaboration {}
impl Cast<dyn DataStateType> for Collaboration {}
impl Cast<dyn DataStateTypeMut> for Collaboration {}
impl Cast<dyn DataStoreType> for Collaboration {}
impl Cast<dyn DataStoreTypeMut> for Collaboration {}
impl Cast<dyn DataStoreReferenceType> for Collaboration {}
impl Cast<dyn DataStoreReferenceTypeMut> for Collaboration {}
impl Cast<dyn DocumentationType> for Collaboration {}
impl Cast<dyn DocumentationTypeMut> for Collaboration {}
impl Cast<dyn EndEventType> for Collaboration {}
impl Cast<dyn EndEventTypeMut> for Collaboration {}
impl Cast<dyn EndPointType> for Collaboration {}
impl Cast<dyn EndPointTypeMut> for Collaboration {}
impl Cast<dyn ErrorType> for Collaboration {}
impl Cast<dyn ErrorTypeMut> for Collaboration {}
impl Cast<dyn ErrorEventDefinitionType> for Collaboration {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn EscalationType> for Collaboration {}
impl Cast<dyn EscalationTypeMut> for Collaboration {}
impl Cast<dyn EscalationEventDefinitionType> for Collaboration {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn EventType> for Collaboration {}
impl Cast<dyn EventTypeMut> for Collaboration {}
impl Cast<dyn EventBasedGatewayType> for Collaboration {}
impl Cast<dyn EventBasedGatewayTypeMut> for Collaboration {}
impl Cast<dyn EventDefinitionType> for Collaboration {}
impl Cast<dyn EventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn ExclusiveGatewayType> for Collaboration {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Collaboration {}
impl Cast<dyn ExpressionType> for Collaboration {}
impl Cast<dyn ExpressionTypeMut> for Collaboration {}
impl Cast<dyn ExtensionType> for Collaboration {}
impl Cast<dyn ExtensionTypeMut> for Collaboration {}
impl Cast<dyn ExtensionElementsType> for Collaboration {}
impl Cast<dyn ExtensionElementsTypeMut> for Collaboration {}
impl Cast<dyn FlowElementType> for Collaboration {}
impl Cast<dyn FlowElementTypeMut> for Collaboration {}
impl Cast<dyn FlowNodeType> for Collaboration {}
impl Cast<dyn FlowNodeTypeMut> for Collaboration {}
impl Cast<dyn FormalExpressionType> for Collaboration {}
impl Cast<dyn FormalExpressionTypeMut> for Collaboration {}
impl Cast<dyn GatewayType> for Collaboration {}
impl Cast<dyn GatewayTypeMut> for Collaboration {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Collaboration {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Collaboration {}
impl Cast<dyn GlobalChoreographyTaskType> for Collaboration {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Collaboration {}
impl Cast<dyn GlobalConversationType> for Collaboration {}
impl Cast<dyn GlobalConversationTypeMut> for Collaboration {}
impl Cast<dyn GlobalManualTaskType> for Collaboration {}
impl Cast<dyn GlobalManualTaskTypeMut> for Collaboration {}
impl Cast<dyn GlobalScriptTaskType> for Collaboration {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Collaboration {}
impl Cast<dyn GlobalTaskType> for Collaboration {}
impl Cast<dyn GlobalTaskTypeMut> for Collaboration {}
impl Cast<dyn GlobalUserTaskType> for Collaboration {}
impl Cast<dyn GlobalUserTaskTypeMut> for Collaboration {}
impl Cast<dyn GroupType> for Collaboration {}
impl Cast<dyn GroupTypeMut> for Collaboration {}
impl Cast<dyn HumanPerformerType> for Collaboration {}
impl Cast<dyn HumanPerformerTypeMut> for Collaboration {}
impl Cast<dyn ImplicitThrowEventType> for Collaboration {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Collaboration {}
impl Cast<dyn InclusiveGatewayType> for Collaboration {}
impl Cast<dyn InclusiveGatewayTypeMut> for Collaboration {}
impl Cast<dyn InputSetType> for Collaboration {}
impl Cast<dyn InputSetTypeMut> for Collaboration {}
impl Cast<dyn InterfaceType> for Collaboration {}
impl Cast<dyn InterfaceTypeMut> for Collaboration {}
impl Cast<dyn IntermediateCatchEventType> for Collaboration {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Collaboration {}
impl Cast<dyn IntermediateThrowEventType> for Collaboration {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Collaboration {}
impl Cast<dyn InputOutputBindingType> for Collaboration {}
impl Cast<dyn InputOutputBindingTypeMut> for Collaboration {}
impl Cast<dyn InputOutputSpecificationType> for Collaboration {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Collaboration {}
impl Cast<dyn ItemDefinitionType> for Collaboration {}
impl Cast<dyn ItemDefinitionTypeMut> for Collaboration {}
impl Cast<dyn LaneType> for Collaboration {}
impl Cast<dyn LaneTypeMut> for Collaboration {}
impl Cast<dyn LaneSetType> for Collaboration {}
impl Cast<dyn LaneSetTypeMut> for Collaboration {}
impl Cast<dyn LinkEventDefinitionType> for Collaboration {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn LoopCharacteristicsType> for Collaboration {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Collaboration {}
impl Cast<dyn ManualTaskType> for Collaboration {}
impl Cast<dyn ManualTaskTypeMut> for Collaboration {}
impl Cast<dyn MessageType> for Collaboration {}
impl Cast<dyn MessageTypeMut> for Collaboration {}
impl Cast<dyn MessageEventDefinitionType> for Collaboration {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn MessageFlowType> for Collaboration {}
impl Cast<dyn MessageFlowTypeMut> for Collaboration {}
impl Cast<dyn MessageFlowAssociationType> for Collaboration {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Collaboration {}
impl Cast<dyn MonitoringType> for Collaboration {}
impl Cast<dyn MonitoringTypeMut> for Collaboration {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Collaboration {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Collaboration {}
impl Cast<dyn OperationType> for Collaboration {}
impl Cast<dyn OperationTypeMut> for Collaboration {}
impl Cast<dyn OutputSetType> for Collaboration {}
impl Cast<dyn OutputSetTypeMut> for Collaboration {}
impl Cast<dyn ParallelGatewayType> for Collaboration {}
impl Cast<dyn ParallelGatewayTypeMut> for Collaboration {}
impl Cast<dyn ParticipantType> for Collaboration {}
impl Cast<dyn ParticipantTypeMut> for Collaboration {}
impl Cast<dyn ParticipantAssociationType> for Collaboration {}
impl Cast<dyn ParticipantAssociationTypeMut> for Collaboration {}
impl Cast<dyn ParticipantMultiplicityType> for Collaboration {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Collaboration {}
impl Cast<dyn PartnerEntityType> for Collaboration {}
impl Cast<dyn PartnerEntityTypeMut> for Collaboration {}
impl Cast<dyn PartnerRoleType> for Collaboration {}
impl Cast<dyn PartnerRoleTypeMut> for Collaboration {}
impl Cast<dyn PerformerType> for Collaboration {}
impl Cast<dyn PerformerTypeMut> for Collaboration {}
impl Cast<dyn PotentialOwnerType> for Collaboration {}
impl Cast<dyn PotentialOwnerTypeMut> for Collaboration {}
impl Cast<dyn ProcessType> for Collaboration {}
impl Cast<dyn ProcessTypeMut> for Collaboration {}
impl Cast<dyn PropertyType> for Collaboration {}
impl Cast<dyn PropertyTypeMut> for Collaboration {}
impl Cast<dyn ReceiveTaskType> for Collaboration {}
impl Cast<dyn ReceiveTaskTypeMut> for Collaboration {}
impl Cast<dyn RelationshipType> for Collaboration {}
impl Cast<dyn RelationshipTypeMut> for Collaboration {}
impl Cast<dyn RenderingType> for Collaboration {}
impl Cast<dyn RenderingTypeMut> for Collaboration {}
impl Cast<dyn ResourceType> for Collaboration {}
impl Cast<dyn ResourceTypeMut> for Collaboration {}
impl Cast<dyn ResourceAssignmentExpressionType> for Collaboration {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Collaboration {}
impl Cast<dyn ResourceParameterType> for Collaboration {}
impl Cast<dyn ResourceParameterTypeMut> for Collaboration {}
impl Cast<dyn ResourceParameterBindingType> for Collaboration {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Collaboration {}
impl Cast<dyn ResourceRoleType> for Collaboration {}
impl Cast<dyn ResourceRoleTypeMut> for Collaboration {}
impl Cast<dyn RootElementType> for Collaboration {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Collaboration {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Collaboration {}
impl Cast<dyn ScriptTaskTypeMut> for Collaboration {}
impl Cast<dyn ScriptType> for Collaboration {}
impl Cast<dyn ScriptTypeMut> for Collaboration {}
impl Cast<dyn SendTaskType> for Collaboration {}
impl Cast<dyn SendTaskTypeMut> for Collaboration {}
impl Cast<dyn SequenceFlowType> for Collaboration {}
impl Cast<dyn SequenceFlowTypeMut> for Collaboration {}
impl Cast<dyn ServiceTaskType> for Collaboration {}
impl Cast<dyn ServiceTaskTypeMut> for Collaboration {}
impl Cast<dyn SignalType> for Collaboration {}
impl Cast<dyn SignalTypeMut> for Collaboration {}
impl Cast<dyn SignalEventDefinitionType> for Collaboration {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn StandardLoopCharacteristicsType> for Collaboration {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Collaboration {}
impl Cast<dyn StartEventType> for Collaboration {}
impl Cast<dyn StartEventTypeMut> for Collaboration {}
impl Cast<dyn SubChoreographyType> for Collaboration {}
impl Cast<dyn SubChoreographyTypeMut> for Collaboration {}
impl Cast<dyn SubConversationType> for Collaboration {}
impl Cast<dyn SubConversationTypeMut> for Collaboration {}
impl Cast<dyn SubProcessType> for Collaboration {}
impl Cast<dyn SubProcessTypeMut> for Collaboration {}
impl Cast<dyn TaskType> for Collaboration {}
impl Cast<dyn TaskTypeMut> for Collaboration {}
impl Cast<dyn TerminateEventDefinitionType> for Collaboration {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn TextAnnotationType> for Collaboration {}
impl Cast<dyn TextAnnotationTypeMut> for Collaboration {}
impl Cast<dyn TextType> for Collaboration {}
impl Cast<dyn TextTypeMut> for Collaboration {}
impl Cast<dyn ThrowEventType> for Collaboration {}
impl Cast<dyn ThrowEventTypeMut> for Collaboration {}
impl Cast<dyn TimerEventDefinitionType> for Collaboration {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Collaboration {}
impl Cast<dyn TransactionType> for Collaboration {}
impl Cast<dyn TransactionTypeMut> for Collaboration {}
impl Cast<dyn UserTaskType> for Collaboration {}
impl Cast<dyn UserTaskTypeMut> for Collaboration {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:compensateEventDefinition")]
pub struct CompensateEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "waitForCompletion")]
    #[tia("CompensateEventDefinitionType",rg*="wait_for_completion","CompensateEventDefinitionTypeMut",s)]
    pub wait_for_completion: Option<bool>,
    #[xml(attr = "activityRef")]
    #[tia("CompensateEventDefinitionType",rg*="activity_ref","CompensateEventDefinitionTypeMut",s)]
    pub activity_ref: Option<String>,
}
impl DocumentElement for CompensateEventDefinition {
    fn element(&self) -> Element {
        Element::CompensateEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CompensateEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for CompensateEventDefinition {}
impl EventDefinitionTypeMut for CompensateEventDefinition {}
impl RootElementType for CompensateEventDefinition {}
impl RootElementTypeMut for CompensateEventDefinition {}
//

/// Access to `compensateEventDefinition`
pub trait CompensateEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `waitForCompletion`
    fn wait_for_completion(&self) -> &Option<bool>;
    /// Get value of attribute `activityRef`
    fn activity_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(CompensateEventDefinitionType);
impl_downcast!(CompensateEventDefinitionType);
/// Mutable access to `compensateEventDefinition`
pub trait CompensateEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + CompensateEventDefinitionType
{
    /// Set value of attribute `waitForCompletion`
    fn set_wait_for_completion(&mut self, value: Option<bool>);
    /// Set value of attribute `activityRef`
    fn set_activity_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(CompensateEventDefinitionTypeMut);
impl_downcast!(CompensateEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for CompensateEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ImportType> for CompensateEventDefinition {}
impl Cast<dyn ImportTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ActivityType> for CompensateEventDefinition {}
impl Cast<dyn ActivityTypeMut> for CompensateEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for CompensateEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ArtifactType> for CompensateEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for CompensateEventDefinition {}
impl Cast<dyn AssignmentType> for CompensateEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for CompensateEventDefinition {}
impl Cast<dyn AssociationType> for CompensateEventDefinition {}
impl Cast<dyn AssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn AuditingType> for CompensateEventDefinition {}
impl Cast<dyn AuditingTypeMut> for CompensateEventDefinition {}
impl Cast<dyn BaseElementType> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CompensateEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CompensateEventDefinition {}
impl Cast<dyn BoundaryEventType> for CompensateEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for CompensateEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CallableElementType> for CompensateEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CallActivityType> for CompensateEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CallChoreographyType> for CompensateEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CallConversationType> for CompensateEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CatchEventType> for CompensateEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CategoryType> for CompensateEventDefinition {}
impl Cast<dyn CategoryTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CategoryValueType> for CompensateEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyType> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for CompensateEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CollaborationType> for CompensateEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ComplexGatewayType> for CompensateEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ConversationType> for CompensateEventDefinition {}
impl Cast<dyn ConversationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ConversationAssociationType> for CompensateEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ConversationLinkType> for CompensateEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ConversationNodeType> for CompensateEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CorrelationKeyType> for CompensateEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CompensateEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for CompensateEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataAssociationType> for CompensateEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataInputType> for CompensateEventDefinition {}
impl Cast<dyn DataInputTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataInputAssociationType> for CompensateEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataObjectType> for CompensateEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for CompensateEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataOutputType> for CompensateEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for CompensateEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataStateType> for CompensateEventDefinition {}
impl Cast<dyn DataStateTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataStoreType> for CompensateEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for CompensateEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for CompensateEventDefinition {}
impl Cast<dyn DocumentationType> for CompensateEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EndEventType> for CompensateEventDefinition {}
impl Cast<dyn EndEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EndPointType> for CompensateEventDefinition {}
impl Cast<dyn EndPointTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ErrorType> for CompensateEventDefinition {}
impl Cast<dyn ErrorTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EscalationType> for CompensateEventDefinition {}
impl Cast<dyn EscalationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EventType> for CompensateEventDefinition {}
impl Cast<dyn EventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for CompensateEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn EventDefinitionType> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for CompensateEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ExpressionType> for CompensateEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ExtensionType> for CompensateEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ExtensionElementsType> for CompensateEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for CompensateEventDefinition {}
impl Cast<dyn FlowElementType> for CompensateEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for CompensateEventDefinition {}
impl Cast<dyn FlowNodeType> for CompensateEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for CompensateEventDefinition {}
impl Cast<dyn FormalExpressionType> for CompensateEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GatewayType> for CompensateEventDefinition {}
impl Cast<dyn GatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalConversationType> for CompensateEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for CompensateEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn GroupType> for CompensateEventDefinition {}
impl Cast<dyn GroupTypeMut> for CompensateEventDefinition {}
impl Cast<dyn HumanPerformerType> for CompensateEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for CompensateEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for CompensateEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn InputSetType> for CompensateEventDefinition {}
impl Cast<dyn InputSetTypeMut> for CompensateEventDefinition {}
impl Cast<dyn InterfaceType> for CompensateEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for CompensateEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for CompensateEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for CompensateEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn InputOutputBindingType> for CompensateEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for CompensateEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for CompensateEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ItemDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn LaneType> for CompensateEventDefinition {}
impl Cast<dyn LaneTypeMut> for CompensateEventDefinition {}
impl Cast<dyn LaneSetType> for CompensateEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for CompensateEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for CompensateEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ManualTaskType> for CompensateEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MessageType> for CompensateEventDefinition {}
impl Cast<dyn MessageTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MessageFlowType> for CompensateEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for CompensateEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MonitoringType> for CompensateEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for CompensateEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CompensateEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CompensateEventDefinition {}
impl Cast<dyn OperationType> for CompensateEventDefinition {}
impl Cast<dyn OperationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn OutputSetType> for CompensateEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ParallelGatewayType> for CompensateEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ParticipantType> for CompensateEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for CompensateEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for CompensateEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CompensateEventDefinition {}
impl Cast<dyn PartnerEntityType> for CompensateEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for CompensateEventDefinition {}
impl Cast<dyn PartnerRoleType> for CompensateEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for CompensateEventDefinition {}
impl Cast<dyn PerformerType> for CompensateEventDefinition {}
impl Cast<dyn PerformerTypeMut> for CompensateEventDefinition {}
impl Cast<dyn PotentialOwnerType> for CompensateEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ProcessType> for CompensateEventDefinition {}
impl Cast<dyn ProcessTypeMut> for CompensateEventDefinition {}
impl Cast<dyn PropertyType> for CompensateEventDefinition {}
impl Cast<dyn PropertyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ReceiveTaskType> for CompensateEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn RelationshipType> for CompensateEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for CompensateEventDefinition {}
impl Cast<dyn RenderingType> for CompensateEventDefinition {}
impl Cast<dyn RenderingTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ResourceType> for CompensateEventDefinition {}
impl Cast<dyn ResourceTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for CompensateEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ResourceParameterType> for CompensateEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for CompensateEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ResourceRoleType> for CompensateEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for CompensateEventDefinition {}
impl Cast<dyn RootElementType> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for CompensateEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for CompensateEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ScriptType> for CompensateEventDefinition {}
impl Cast<dyn ScriptTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SendTaskType> for CompensateEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SequenceFlowType> for CompensateEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ServiceTaskType> for CompensateEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SignalType> for CompensateEventDefinition {}
impl Cast<dyn SignalTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for CompensateEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CompensateEventDefinition {}
impl Cast<dyn StartEventType> for CompensateEventDefinition {}
impl Cast<dyn StartEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SubChoreographyType> for CompensateEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SubConversationType> for CompensateEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn SubProcessType> for CompensateEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TaskType> for CompensateEventDefinition {}
impl Cast<dyn TaskTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TextAnnotationType> for CompensateEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TextType> for CompensateEventDefinition {}
impl Cast<dyn TextTypeMut> for CompensateEventDefinition {}
impl Cast<dyn ThrowEventType> for CompensateEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for CompensateEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn TransactionType> for CompensateEventDefinition {}
impl Cast<dyn TransactionTypeMut> for CompensateEventDefinition {}
impl Cast<dyn UserTaskType> for CompensateEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for CompensateEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:complexBehaviorDefinition")]
pub struct ComplexBehaviorDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:condition")]
    #[tia("ComplexBehaviorDefinitionType",rg*="condition","ComplexBehaviorDefinitionTypeMut",s,rmg*="condition_mut")]
    pub condition: ComplexBehaviorDefinitionCondition,
    #[xml(child = "bpmn:event")]
    #[tia("ComplexBehaviorDefinitionType",rg*="event","ComplexBehaviorDefinitionTypeMut",s,rmg*="event_mut")]
    pub event: Option<ComplexBehaviorDefinitionEvent>,
}
impl DocumentElement for ComplexBehaviorDefinition {
    fn element(&self) -> Element {
        Element::ComplexBehaviorDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ComplexBehaviorDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.event.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.event.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `complexBehaviorDefinition`
pub trait ComplexBehaviorDefinitionType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of `condition` child
    fn condition(&self) -> &ComplexBehaviorDefinitionCondition;
    /// Get value of `event` child
    fn event(&self) -> &Option<ComplexBehaviorDefinitionEvent>;
}
dyn_clone::clone_trait_object!(ComplexBehaviorDefinitionType);
impl_downcast!(ComplexBehaviorDefinitionType);
/// Mutable access to `complexBehaviorDefinition`
pub trait ComplexBehaviorDefinitionTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ComplexBehaviorDefinitionType
{
    /// Get a mutable value of `condition` child
    fn condition_mut(&mut self) -> &mut ComplexBehaviorDefinitionCondition;
    /// Set value of `condition` child
    fn set_condition(&mut self, value: ComplexBehaviorDefinitionCondition);
    /// Get a mutable value of `event` child
    fn event_mut(&mut self) -> &mut Option<ComplexBehaviorDefinitionEvent>;
    /// Set value of `event` child
    fn set_event(&mut self, value: Option<ComplexBehaviorDefinitionEvent>);
}
dyn_clone::clone_trait_object!(ComplexBehaviorDefinitionTypeMut);
impl_downcast!(ComplexBehaviorDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for ComplexBehaviorDefinition {}
impl Cast<dyn DefinitionsTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ImportType> for ComplexBehaviorDefinition {}
impl Cast<dyn ImportTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ActivityType> for ComplexBehaviorDefinition {}
impl Cast<dyn ActivityTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn AdHocSubProcessType> for ComplexBehaviorDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ArtifactType> for ComplexBehaviorDefinition {}
impl Cast<dyn ArtifactTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn AssignmentType> for ComplexBehaviorDefinition {}
impl Cast<dyn AssignmentTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn AssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn AssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn AuditingType> for ComplexBehaviorDefinition {}
impl Cast<dyn AuditingTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn BaseElementType> for ComplexBehaviorDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ComplexBehaviorDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ComplexBehaviorDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn BoundaryEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn BusinessRuleTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CallableElementType> for ComplexBehaviorDefinition {}
impl Cast<dyn CallableElementTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CallActivityType> for ComplexBehaviorDefinition {}
impl Cast<dyn CallActivityTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CallChoreographyType> for ComplexBehaviorDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CallConversationType> for ComplexBehaviorDefinition {}
impl Cast<dyn CallConversationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CancelEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CatchEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn CatchEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CategoryType> for ComplexBehaviorDefinition {}
impl Cast<dyn CategoryTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CategoryValueType> for ComplexBehaviorDefinition {}
impl Cast<dyn CategoryValueTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyType> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyActivityType> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CollaborationType> for ComplexBehaviorDefinition {}
impl Cast<dyn CollaborationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ComplexBehaviorDefinition {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ComplexBehaviorDefinition {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ComplexGatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationType> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationLinkType> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationNodeType> for ComplexBehaviorDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationKeyType> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyType> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for ComplexBehaviorDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataInputType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataInputTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataInputAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataObjectType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataObjectTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataObjectReferenceType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataOutputType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataOutputTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataOutputAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStateType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStateTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStoreType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStoreTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStoreReferenceType> for ComplexBehaviorDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn DocumentationType> for ComplexBehaviorDefinition {}
impl Cast<dyn DocumentationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EndEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn EndEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EndPointType> for ComplexBehaviorDefinition {}
impl Cast<dyn EndPointTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ErrorType> for ComplexBehaviorDefinition {}
impl Cast<dyn ErrorTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EscalationType> for ComplexBehaviorDefinition {}
impl Cast<dyn EscalationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EventType> for ComplexBehaviorDefinition {}
impl Cast<dyn EventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EventBasedGatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn EventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn EventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ExclusiveGatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ExpressionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ExpressionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ExtensionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ExtensionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ExtensionElementsType> for ComplexBehaviorDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn FlowElementType> for ComplexBehaviorDefinition {}
impl Cast<dyn FlowElementTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn FlowNodeType> for ComplexBehaviorDefinition {}
impl Cast<dyn FlowNodeTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn FormalExpressionType> for ComplexBehaviorDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn GatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalConversationType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalManualTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalScriptTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalUserTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn GroupType> for ComplexBehaviorDefinition {}
impl Cast<dyn GroupTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn HumanPerformerType> for ComplexBehaviorDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ImplicitThrowEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn InclusiveGatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn InputSetType> for ComplexBehaviorDefinition {}
impl Cast<dyn InputSetTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn InterfaceType> for ComplexBehaviorDefinition {}
impl Cast<dyn InterfaceTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn IntermediateCatchEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn IntermediateThrowEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn InputOutputBindingType> for ComplexBehaviorDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn InputOutputSpecificationType> for ComplexBehaviorDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ItemDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn LaneType> for ComplexBehaviorDefinition {}
impl Cast<dyn LaneTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn LaneSetType> for ComplexBehaviorDefinition {}
impl Cast<dyn LaneSetTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn LinkEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn LoopCharacteristicsType> for ComplexBehaviorDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ManualTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn ManualTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageType> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageFlowType> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageFlowTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageFlowAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MonitoringType> for ComplexBehaviorDefinition {}
impl Cast<dyn MonitoringTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ComplexBehaviorDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn OperationType> for ComplexBehaviorDefinition {}
impl Cast<dyn OperationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn OutputSetType> for ComplexBehaviorDefinition {}
impl Cast<dyn OutputSetTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ParallelGatewayType> for ComplexBehaviorDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantType> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantAssociationType> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for ComplexBehaviorDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn PartnerEntityType> for ComplexBehaviorDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn PartnerRoleType> for ComplexBehaviorDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn PerformerType> for ComplexBehaviorDefinition {}
impl Cast<dyn PerformerTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn PotentialOwnerType> for ComplexBehaviorDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ProcessType> for ComplexBehaviorDefinition {}
impl Cast<dyn ProcessTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn PropertyType> for ComplexBehaviorDefinition {}
impl Cast<dyn PropertyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ReceiveTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn RelationshipType> for ComplexBehaviorDefinition {}
impl Cast<dyn RelationshipTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn RenderingType> for ComplexBehaviorDefinition {}
impl Cast<dyn RenderingTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceType> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceParameterType> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceParameterBindingType> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceRoleType> for ComplexBehaviorDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn RootElementType> for ComplexBehaviorDefinition {}
impl Cast<dyn RootElementTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ScriptTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ScriptType> for ComplexBehaviorDefinition {}
impl Cast<dyn ScriptTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SendTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn SendTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SequenceFlowType> for ComplexBehaviorDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ServiceTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SignalType> for ComplexBehaviorDefinition {}
impl Cast<dyn SignalTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SignalEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for ComplexBehaviorDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn StartEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn StartEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SubChoreographyType> for ComplexBehaviorDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SubConversationType> for ComplexBehaviorDefinition {}
impl Cast<dyn SubConversationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn SubProcessType> for ComplexBehaviorDefinition {}
impl Cast<dyn SubProcessTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn TaskTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TextAnnotationType> for ComplexBehaviorDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TextType> for ComplexBehaviorDefinition {}
impl Cast<dyn TextTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn ThrowEventType> for ComplexBehaviorDefinition {}
impl Cast<dyn ThrowEventTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TimerEventDefinitionType> for ComplexBehaviorDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn TransactionType> for ComplexBehaviorDefinition {}
impl Cast<dyn TransactionTypeMut> for ComplexBehaviorDefinition {}
impl Cast<dyn UserTaskType> for ComplexBehaviorDefinition {}
impl Cast<dyn UserTaskTypeMut> for ComplexBehaviorDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:complexGateway")]
pub struct ComplexGateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
    #[xml(attr = "default")]
    #[tia("ComplexGatewayType",rg*="default","ComplexGatewayTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:activationCondition")]
    #[tia("ComplexGatewayType",rg*="activation_condition","ComplexGatewayTypeMut",s,rmg*="activation_condition_mut")]
    pub activation_condition: Option<ComplexGatewayActivationCondition>,
}
impl DocumentElement for ComplexGateway {
    fn element(&self) -> Element {
        Element::ComplexGateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ComplexGateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.activation_condition.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.activation_condition.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `complexGateway`
pub trait ComplexGatewayType: GatewayType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `default`
    fn default(&self) -> &Option<String>;
    /// Get value of `activationCondition` child
    fn activation_condition(&self) -> &Option<ComplexGatewayActivationCondition>;
}
dyn_clone::clone_trait_object!(ComplexGatewayType);
impl_downcast!(ComplexGatewayType);
/// Mutable access to `complexGateway`
pub trait ComplexGatewayTypeMut:
    GatewayTypeMut + Downcast + Debug + Send + DynClone + ComplexGatewayType
{
    /// Set value of attribute `default`
    fn set_default(&mut self, value: Option<String>);
    /// Get a mutable value of `activationCondition` child
    fn activation_condition_mut(&mut self) -> &mut Option<ComplexGatewayActivationCondition>;
    /// Set value of `activationCondition` child
    fn set_activation_condition(&mut self, value: Option<ComplexGatewayActivationCondition>);
}
dyn_clone::clone_trait_object!(ComplexGatewayTypeMut);
impl_downcast!(ComplexGatewayTypeMut);
impl Cast<dyn DefinitionsType> for ComplexGateway {}
impl Cast<dyn DefinitionsTypeMut> for ComplexGateway {}
impl Cast<dyn ImportType> for ComplexGateway {}
impl Cast<dyn ImportTypeMut> for ComplexGateway {}
impl Cast<dyn ActivityType> for ComplexGateway {}
impl Cast<dyn ActivityTypeMut> for ComplexGateway {}
impl Cast<dyn AdHocSubProcessType> for ComplexGateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for ComplexGateway {}
impl Cast<dyn ArtifactType> for ComplexGateway {}
impl Cast<dyn ArtifactTypeMut> for ComplexGateway {}
impl Cast<dyn AssignmentType> for ComplexGateway {}
impl Cast<dyn AssignmentTypeMut> for ComplexGateway {}
impl Cast<dyn AssociationType> for ComplexGateway {}
impl Cast<dyn AssociationTypeMut> for ComplexGateway {}
impl Cast<dyn AuditingType> for ComplexGateway {}
impl Cast<dyn AuditingTypeMut> for ComplexGateway {}
impl Cast<dyn BaseElementType> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ComplexGateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ComplexGateway {}
impl Cast<dyn BoundaryEventType> for ComplexGateway {}
impl Cast<dyn BoundaryEventTypeMut> for ComplexGateway {}
impl Cast<dyn BusinessRuleTaskType> for ComplexGateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ComplexGateway {}
impl Cast<dyn CallableElementType> for ComplexGateway {}
impl Cast<dyn CallableElementTypeMut> for ComplexGateway {}
impl Cast<dyn CallActivityType> for ComplexGateway {}
impl Cast<dyn CallActivityTypeMut> for ComplexGateway {}
impl Cast<dyn CallChoreographyType> for ComplexGateway {}
impl Cast<dyn CallChoreographyTypeMut> for ComplexGateway {}
impl Cast<dyn CallConversationType> for ComplexGateway {}
impl Cast<dyn CallConversationTypeMut> for ComplexGateway {}
impl Cast<dyn CancelEventDefinitionType> for ComplexGateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn CatchEventType> for ComplexGateway {}
impl Cast<dyn CatchEventTypeMut> for ComplexGateway {}
impl Cast<dyn CategoryType> for ComplexGateway {}
impl Cast<dyn CategoryTypeMut> for ComplexGateway {}
impl Cast<dyn CategoryValueType> for ComplexGateway {}
impl Cast<dyn CategoryValueTypeMut> for ComplexGateway {}
impl Cast<dyn ChoreographyType> for ComplexGateway {}
impl Cast<dyn ChoreographyTypeMut> for ComplexGateway {}
impl Cast<dyn ChoreographyActivityType> for ComplexGateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for ComplexGateway {}
impl Cast<dyn ChoreographyTaskType> for ComplexGateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for ComplexGateway {}
impl Cast<dyn CollaborationType> for ComplexGateway {}
impl Cast<dyn CollaborationTypeMut> for ComplexGateway {}
impl Cast<dyn CompensateEventDefinitionType> for ComplexGateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ComplexGateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn ComplexGatewayType> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for ComplexGateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn ConversationType> for ComplexGateway {}
impl Cast<dyn ConversationTypeMut> for ComplexGateway {}
impl Cast<dyn ConversationAssociationType> for ComplexGateway {}
impl Cast<dyn ConversationAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn ConversationLinkType> for ComplexGateway {}
impl Cast<dyn ConversationLinkTypeMut> for ComplexGateway {}
impl Cast<dyn ConversationNodeType> for ComplexGateway {}
impl Cast<dyn ConversationNodeTypeMut> for ComplexGateway {}
impl Cast<dyn CorrelationKeyType> for ComplexGateway {}
impl Cast<dyn CorrelationKeyTypeMut> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyType> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyBindingType> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ComplexGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ComplexGateway {}
impl Cast<dyn CorrelationSubscriptionType> for ComplexGateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ComplexGateway {}
impl Cast<dyn DataAssociationType> for ComplexGateway {}
impl Cast<dyn DataAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn DataInputType> for ComplexGateway {}
impl Cast<dyn DataInputTypeMut> for ComplexGateway {}
impl Cast<dyn DataInputAssociationType> for ComplexGateway {}
impl Cast<dyn DataInputAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn DataObjectType> for ComplexGateway {}
impl Cast<dyn DataObjectTypeMut> for ComplexGateway {}
impl Cast<dyn DataObjectReferenceType> for ComplexGateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for ComplexGateway {}
impl Cast<dyn DataOutputType> for ComplexGateway {}
impl Cast<dyn DataOutputTypeMut> for ComplexGateway {}
impl Cast<dyn DataOutputAssociationType> for ComplexGateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn DataStateType> for ComplexGateway {}
impl Cast<dyn DataStateTypeMut> for ComplexGateway {}
impl Cast<dyn DataStoreType> for ComplexGateway {}
impl Cast<dyn DataStoreTypeMut> for ComplexGateway {}
impl Cast<dyn DataStoreReferenceType> for ComplexGateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for ComplexGateway {}
impl Cast<dyn DocumentationType> for ComplexGateway {}
impl Cast<dyn DocumentationTypeMut> for ComplexGateway {}
impl Cast<dyn EndEventType> for ComplexGateway {}
impl Cast<dyn EndEventTypeMut> for ComplexGateway {}
impl Cast<dyn EndPointType> for ComplexGateway {}
impl Cast<dyn EndPointTypeMut> for ComplexGateway {}
impl Cast<dyn ErrorType> for ComplexGateway {}
impl Cast<dyn ErrorTypeMut> for ComplexGateway {}
impl Cast<dyn ErrorEventDefinitionType> for ComplexGateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn EscalationType> for ComplexGateway {}
impl Cast<dyn EscalationTypeMut> for ComplexGateway {}
impl Cast<dyn EscalationEventDefinitionType> for ComplexGateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn EventType> for ComplexGateway {}
impl Cast<dyn EventTypeMut> for ComplexGateway {}
impl Cast<dyn EventBasedGatewayType> for ComplexGateway {}
impl Cast<dyn EventBasedGatewayTypeMut> for ComplexGateway {}
impl Cast<dyn EventDefinitionType> for ComplexGateway {}
impl Cast<dyn EventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn ExclusiveGatewayType> for ComplexGateway {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ComplexGateway {}
impl Cast<dyn ExpressionType> for ComplexGateway {}
impl Cast<dyn ExpressionTypeMut> for ComplexGateway {}
impl Cast<dyn ExtensionType> for ComplexGateway {}
impl Cast<dyn ExtensionTypeMut> for ComplexGateway {}
impl Cast<dyn ExtensionElementsType> for ComplexGateway {}
impl Cast<dyn ExtensionElementsTypeMut> for ComplexGateway {}
impl Cast<dyn FlowElementType> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ComplexGateway {}
impl Cast<dyn FormalExpressionTypeMut> for ComplexGateway {}
impl Cast<dyn GatewayType> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for ComplexGateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for ComplexGateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalChoreographyTaskType> for ComplexGateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalConversationType> for ComplexGateway {}
impl Cast<dyn GlobalConversationTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalManualTaskType> for ComplexGateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalScriptTaskType> for ComplexGateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalTaskType> for ComplexGateway {}
impl Cast<dyn GlobalTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GlobalUserTaskType> for ComplexGateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for ComplexGateway {}
impl Cast<dyn GroupType> for ComplexGateway {}
impl Cast<dyn GroupTypeMut> for ComplexGateway {}
impl Cast<dyn HumanPerformerType> for ComplexGateway {}
impl Cast<dyn HumanPerformerTypeMut> for ComplexGateway {}
impl Cast<dyn ImplicitThrowEventType> for ComplexGateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ComplexGateway {}
impl Cast<dyn InclusiveGatewayType> for ComplexGateway {}
impl Cast<dyn InclusiveGatewayTypeMut> for ComplexGateway {}
impl Cast<dyn InputSetType> for ComplexGateway {}
impl Cast<dyn InputSetTypeMut> for ComplexGateway {}
impl Cast<dyn InterfaceType> for ComplexGateway {}
impl Cast<dyn InterfaceTypeMut> for ComplexGateway {}
impl Cast<dyn IntermediateCatchEventType> for ComplexGateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ComplexGateway {}
impl Cast<dyn IntermediateThrowEventType> for ComplexGateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ComplexGateway {}
impl Cast<dyn InputOutputBindingType> for ComplexGateway {}
impl Cast<dyn InputOutputBindingTypeMut> for ComplexGateway {}
impl Cast<dyn InputOutputSpecificationType> for ComplexGateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ComplexGateway {}
impl Cast<dyn ItemDefinitionType> for ComplexGateway {}
impl Cast<dyn ItemDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn LaneType> for ComplexGateway {}
impl Cast<dyn LaneTypeMut> for ComplexGateway {}
impl Cast<dyn LaneSetType> for ComplexGateway {}
impl Cast<dyn LaneSetTypeMut> for ComplexGateway {}
impl Cast<dyn LinkEventDefinitionType> for ComplexGateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn LoopCharacteristicsType> for ComplexGateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ComplexGateway {}
impl Cast<dyn ManualTaskType> for ComplexGateway {}
impl Cast<dyn ManualTaskTypeMut> for ComplexGateway {}
impl Cast<dyn MessageType> for ComplexGateway {}
impl Cast<dyn MessageTypeMut> for ComplexGateway {}
impl Cast<dyn MessageEventDefinitionType> for ComplexGateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn MessageFlowType> for ComplexGateway {}
impl Cast<dyn MessageFlowTypeMut> for ComplexGateway {}
impl Cast<dyn MessageFlowAssociationType> for ComplexGateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn MonitoringType> for ComplexGateway {}
impl Cast<dyn MonitoringTypeMut> for ComplexGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ComplexGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ComplexGateway {}
impl Cast<dyn OperationType> for ComplexGateway {}
impl Cast<dyn OperationTypeMut> for ComplexGateway {}
impl Cast<dyn OutputSetType> for ComplexGateway {}
impl Cast<dyn OutputSetTypeMut> for ComplexGateway {}
impl Cast<dyn ParallelGatewayType> for ComplexGateway {}
impl Cast<dyn ParallelGatewayTypeMut> for ComplexGateway {}
impl Cast<dyn ParticipantType> for ComplexGateway {}
impl Cast<dyn ParticipantTypeMut> for ComplexGateway {}
impl Cast<dyn ParticipantAssociationType> for ComplexGateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for ComplexGateway {}
impl Cast<dyn ParticipantMultiplicityType> for ComplexGateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ComplexGateway {}
impl Cast<dyn PartnerEntityType> for ComplexGateway {}
impl Cast<dyn PartnerEntityTypeMut> for ComplexGateway {}
impl Cast<dyn PartnerRoleType> for ComplexGateway {}
impl Cast<dyn PartnerRoleTypeMut> for ComplexGateway {}
impl Cast<dyn PerformerType> for ComplexGateway {}
impl Cast<dyn PerformerTypeMut> for ComplexGateway {}
impl Cast<dyn PotentialOwnerType> for ComplexGateway {}
impl Cast<dyn PotentialOwnerTypeMut> for ComplexGateway {}
impl Cast<dyn ProcessType> for ComplexGateway {}
impl Cast<dyn ProcessTypeMut> for ComplexGateway {}
impl Cast<dyn PropertyType> for ComplexGateway {}
impl Cast<dyn PropertyTypeMut> for ComplexGateway {}
impl Cast<dyn ReceiveTaskType> for ComplexGateway {}
impl Cast<dyn ReceiveTaskTypeMut> for ComplexGateway {}
impl Cast<dyn RelationshipType> for ComplexGateway {}
impl Cast<dyn RelationshipTypeMut> for ComplexGateway {}
impl Cast<dyn RenderingType> for ComplexGateway {}
impl Cast<dyn RenderingTypeMut> for ComplexGateway {}
impl Cast<dyn ResourceType> for ComplexGateway {}
impl Cast<dyn ResourceTypeMut> for ComplexGateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for ComplexGateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ComplexGateway {}
impl Cast<dyn ResourceParameterType> for ComplexGateway {}
impl Cast<dyn ResourceParameterTypeMut> for ComplexGateway {}
impl Cast<dyn ResourceParameterBindingType> for ComplexGateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ComplexGateway {}
impl Cast<dyn ResourceRoleType> for ComplexGateway {}
impl Cast<dyn ResourceRoleTypeMut> for ComplexGateway {}
impl Cast<dyn RootElementType> for ComplexGateway {}
impl Cast<dyn RootElementTypeMut> for ComplexGateway {}
impl Cast<dyn ScriptTaskType> for ComplexGateway {}
impl Cast<dyn ScriptTaskTypeMut> for ComplexGateway {}
impl Cast<dyn ScriptType> for ComplexGateway {}
impl Cast<dyn ScriptTypeMut> for ComplexGateway {}
impl Cast<dyn SendTaskType> for ComplexGateway {}
impl Cast<dyn SendTaskTypeMut> for ComplexGateway {}
impl Cast<dyn SequenceFlowType> for ComplexGateway {}
impl Cast<dyn SequenceFlowTypeMut> for ComplexGateway {}
impl Cast<dyn ServiceTaskType> for ComplexGateway {}
impl Cast<dyn ServiceTaskTypeMut> for ComplexGateway {}
impl Cast<dyn SignalType> for ComplexGateway {}
impl Cast<dyn SignalTypeMut> for ComplexGateway {}
impl Cast<dyn SignalEventDefinitionType> for ComplexGateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for ComplexGateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ComplexGateway {}
impl Cast<dyn StartEventType> for ComplexGateway {}
impl Cast<dyn StartEventTypeMut> for ComplexGateway {}
impl Cast<dyn SubChoreographyType> for ComplexGateway {}
impl Cast<dyn SubChoreographyTypeMut> for ComplexGateway {}
impl Cast<dyn SubConversationType> for ComplexGateway {}
impl Cast<dyn SubConversationTypeMut> for ComplexGateway {}
impl Cast<dyn SubProcessType> for ComplexGateway {}
impl Cast<dyn SubProcessTypeMut> for ComplexGateway {}
impl Cast<dyn TaskType> for ComplexGateway {}
impl Cast<dyn TaskTypeMut> for ComplexGateway {}
impl Cast<dyn TerminateEventDefinitionType> for ComplexGateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn TextAnnotationType> for ComplexGateway {}
impl Cast<dyn TextAnnotationTypeMut> for ComplexGateway {}
impl Cast<dyn TextType> for ComplexGateway {}
impl Cast<dyn TextTypeMut> for ComplexGateway {}
impl Cast<dyn ThrowEventType> for ComplexGateway {}
impl Cast<dyn ThrowEventTypeMut> for ComplexGateway {}
impl Cast<dyn TimerEventDefinitionType> for ComplexGateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ComplexGateway {}
impl Cast<dyn TransactionType> for ComplexGateway {}
impl Cast<dyn TransactionTypeMut> for ComplexGateway {}
impl Cast<dyn UserTaskType> for ComplexGateway {}
impl Cast<dyn UserTaskTypeMut> for ComplexGateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:conditionalEventDefinition")]
pub struct ConditionalEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:condition")]
    #[tia("ConditionalEventDefinitionType",rg*="condition","ConditionalEventDefinitionTypeMut",s,rmg*="condition_mut")]
    pub condition: ConditionalEventDefinitionCondition,
}
impl DocumentElement for ConditionalEventDefinition {
    fn element(&self) -> Element {
        Element::ConditionalEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ConditionalEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl EventDefinitionType for ConditionalEventDefinition {}
impl EventDefinitionTypeMut for ConditionalEventDefinition {}
impl RootElementType for ConditionalEventDefinition {}
impl RootElementTypeMut for ConditionalEventDefinition {}
//

/// Access to `conditionalEventDefinition`
pub trait ConditionalEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of `condition` child
    fn condition(&self) -> &ConditionalEventDefinitionCondition;
}
dyn_clone::clone_trait_object!(ConditionalEventDefinitionType);
impl_downcast!(ConditionalEventDefinitionType);
/// Mutable access to `conditionalEventDefinition`
pub trait ConditionalEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + ConditionalEventDefinitionType
{
    /// Get a mutable value of `condition` child
    fn condition_mut(&mut self) -> &mut ConditionalEventDefinitionCondition;
    /// Set value of `condition` child
    fn set_condition(&mut self, value: ConditionalEventDefinitionCondition);
}
dyn_clone::clone_trait_object!(ConditionalEventDefinitionTypeMut);
impl_downcast!(ConditionalEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for ConditionalEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ImportType> for ConditionalEventDefinition {}
impl Cast<dyn ImportTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ActivityType> for ConditionalEventDefinition {}
impl Cast<dyn ActivityTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for ConditionalEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ArtifactType> for ConditionalEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn AssignmentType> for ConditionalEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn AssociationType> for ConditionalEventDefinition {}
impl Cast<dyn AssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn AuditingType> for ConditionalEventDefinition {}
impl Cast<dyn AuditingTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn BaseElementType> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ConditionalEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn BoundaryEventType> for ConditionalEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for ConditionalEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CallableElementType> for ConditionalEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CallActivityType> for ConditionalEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CallChoreographyType> for ConditionalEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CallConversationType> for ConditionalEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CatchEventType> for ConditionalEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CategoryType> for ConditionalEventDefinition {}
impl Cast<dyn CategoryTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CategoryValueType> for ConditionalEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyType> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for ConditionalEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CollaborationType> for ConditionalEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ComplexGatewayType> for ConditionalEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationType> for ConditionalEventDefinition {}
impl Cast<dyn ConversationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ConversationAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ConversationLinkType> for ConditionalEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ConversationNodeType> for ConditionalEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationKeyType> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for ConditionalEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataInputType> for ConditionalEventDefinition {}
impl Cast<dyn DataInputTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataInputAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataObjectType> for ConditionalEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for ConditionalEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataOutputType> for ConditionalEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataStateType> for ConditionalEventDefinition {}
impl Cast<dyn DataStateTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataStoreType> for ConditionalEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for ConditionalEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn DocumentationType> for ConditionalEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EndEventType> for ConditionalEventDefinition {}
impl Cast<dyn EndEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EndPointType> for ConditionalEventDefinition {}
impl Cast<dyn EndPointTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ErrorType> for ConditionalEventDefinition {}
impl Cast<dyn ErrorTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EscalationType> for ConditionalEventDefinition {}
impl Cast<dyn EscalationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EventType> for ConditionalEventDefinition {}
impl Cast<dyn EventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for ConditionalEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn EventDefinitionType> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for ConditionalEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ExpressionType> for ConditionalEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ExtensionType> for ConditionalEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ExtensionElementsType> for ConditionalEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn FlowElementType> for ConditionalEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn FlowNodeType> for ConditionalEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn FormalExpressionType> for ConditionalEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GatewayType> for ConditionalEventDefinition {}
impl Cast<dyn GatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalConversationType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for ConditionalEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn GroupType> for ConditionalEventDefinition {}
impl Cast<dyn GroupTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn HumanPerformerType> for ConditionalEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for ConditionalEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for ConditionalEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn InputSetType> for ConditionalEventDefinition {}
impl Cast<dyn InputSetTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn InterfaceType> for ConditionalEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for ConditionalEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for ConditionalEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn InputOutputBindingType> for ConditionalEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for ConditionalEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ItemDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn LaneType> for ConditionalEventDefinition {}
impl Cast<dyn LaneTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn LaneSetType> for ConditionalEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for ConditionalEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ManualTaskType> for ConditionalEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MessageType> for ConditionalEventDefinition {}
impl Cast<dyn MessageTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MessageFlowType> for ConditionalEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MonitoringType> for ConditionalEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ConditionalEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn OperationType> for ConditionalEventDefinition {}
impl Cast<dyn OperationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn OutputSetType> for ConditionalEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ParallelGatewayType> for ConditionalEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantType> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for ConditionalEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn PartnerEntityType> for ConditionalEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn PartnerRoleType> for ConditionalEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn PerformerType> for ConditionalEventDefinition {}
impl Cast<dyn PerformerTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn PotentialOwnerType> for ConditionalEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ProcessType> for ConditionalEventDefinition {}
impl Cast<dyn ProcessTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn PropertyType> for ConditionalEventDefinition {}
impl Cast<dyn PropertyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ReceiveTaskType> for ConditionalEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn RelationshipType> for ConditionalEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn RenderingType> for ConditionalEventDefinition {}
impl Cast<dyn RenderingTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ResourceType> for ConditionalEventDefinition {}
impl Cast<dyn ResourceTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for ConditionalEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ResourceParameterType> for ConditionalEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for ConditionalEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ResourceRoleType> for ConditionalEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn RootElementType> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for ConditionalEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for ConditionalEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ScriptType> for ConditionalEventDefinition {}
impl Cast<dyn ScriptTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SendTaskType> for ConditionalEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SequenceFlowType> for ConditionalEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ServiceTaskType> for ConditionalEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SignalType> for ConditionalEventDefinition {}
impl Cast<dyn SignalTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for ConditionalEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn StartEventType> for ConditionalEventDefinition {}
impl Cast<dyn StartEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SubChoreographyType> for ConditionalEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SubConversationType> for ConditionalEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn SubProcessType> for ConditionalEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TaskType> for ConditionalEventDefinition {}
impl Cast<dyn TaskTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TextAnnotationType> for ConditionalEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TextType> for ConditionalEventDefinition {}
impl Cast<dyn TextTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn ThrowEventType> for ConditionalEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for ConditionalEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn TransactionType> for ConditionalEventDefinition {}
impl Cast<dyn TransactionTypeMut> for ConditionalEventDefinition {}
impl Cast<dyn UserTaskType> for ConditionalEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for ConditionalEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:conversation")]
pub struct Conversation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ConversationNodeType",rg*="name","ConversationNodeTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ConversationNodeType",rg*="participant_refs","ConversationNodeTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:messageFlowRef")]
    #[tia("ConversationNodeType",rg*="message_flow_refs","ConversationNodeTypeMut",s,rmg*="message_flow_refs_mut")]
    pub message_flow_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ConversationNodeType",rg*="correlation_keys","ConversationNodeTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
}
impl DocumentElement for Conversation {
    fn element(&self) -> Element {
        Element::Conversation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Conversation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ConversationType for Conversation {}
impl ConversationTypeMut for Conversation {}
//

/// Access to `conversation`
pub trait ConversationType: ConversationNodeType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ConversationType);
impl_downcast!(ConversationType);
/// Mutable access to `conversation`
pub trait ConversationTypeMut:
    ConversationNodeTypeMut + Downcast + Debug + Send + DynClone + ConversationType
{
}
dyn_clone::clone_trait_object!(ConversationTypeMut);
impl_downcast!(ConversationTypeMut);
impl Cast<dyn DefinitionsType> for Conversation {}
impl Cast<dyn DefinitionsTypeMut> for Conversation {}
impl Cast<dyn ImportType> for Conversation {}
impl Cast<dyn ImportTypeMut> for Conversation {}
impl Cast<dyn ActivityType> for Conversation {}
impl Cast<dyn ActivityTypeMut> for Conversation {}
impl Cast<dyn AdHocSubProcessType> for Conversation {}
impl Cast<dyn AdHocSubProcessTypeMut> for Conversation {}
impl Cast<dyn ArtifactType> for Conversation {}
impl Cast<dyn ArtifactTypeMut> for Conversation {}
impl Cast<dyn AssignmentType> for Conversation {}
impl Cast<dyn AssignmentTypeMut> for Conversation {}
impl Cast<dyn AssociationType> for Conversation {}
impl Cast<dyn AssociationTypeMut> for Conversation {}
impl Cast<dyn AuditingType> for Conversation {}
impl Cast<dyn AuditingTypeMut> for Conversation {}
impl Cast<dyn BaseElementType> for Conversation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Conversation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Conversation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Conversation {}
impl Cast<dyn BoundaryEventType> for Conversation {}
impl Cast<dyn BoundaryEventTypeMut> for Conversation {}
impl Cast<dyn BusinessRuleTaskType> for Conversation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Conversation {}
impl Cast<dyn CallableElementType> for Conversation {}
impl Cast<dyn CallableElementTypeMut> for Conversation {}
impl Cast<dyn CallActivityType> for Conversation {}
impl Cast<dyn CallActivityTypeMut> for Conversation {}
impl Cast<dyn CallChoreographyType> for Conversation {}
impl Cast<dyn CallChoreographyTypeMut> for Conversation {}
impl Cast<dyn CallConversationType> for Conversation {}
impl Cast<dyn CallConversationTypeMut> for Conversation {}
impl Cast<dyn CancelEventDefinitionType> for Conversation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn CatchEventType> for Conversation {}
impl Cast<dyn CatchEventTypeMut> for Conversation {}
impl Cast<dyn CategoryType> for Conversation {}
impl Cast<dyn CategoryTypeMut> for Conversation {}
impl Cast<dyn CategoryValueType> for Conversation {}
impl Cast<dyn CategoryValueTypeMut> for Conversation {}
impl Cast<dyn ChoreographyType> for Conversation {}
impl Cast<dyn ChoreographyTypeMut> for Conversation {}
impl Cast<dyn ChoreographyActivityType> for Conversation {}
impl Cast<dyn ChoreographyActivityTypeMut> for Conversation {}
impl Cast<dyn ChoreographyTaskType> for Conversation {}
impl Cast<dyn ChoreographyTaskTypeMut> for Conversation {}
impl Cast<dyn CollaborationType> for Conversation {}
impl Cast<dyn CollaborationTypeMut> for Conversation {}
impl Cast<dyn CompensateEventDefinitionType> for Conversation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Conversation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Conversation {}
impl Cast<dyn ComplexGatewayType> for Conversation {}
impl Cast<dyn ComplexGatewayTypeMut> for Conversation {}
impl Cast<dyn ConditionalEventDefinitionType> for Conversation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn ConversationType> for Conversation {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationTypeMut> for Conversation {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationAssociationType> for Conversation {}
impl Cast<dyn ConversationAssociationTypeMut> for Conversation {}
impl Cast<dyn ConversationLinkType> for Conversation {}
impl Cast<dyn ConversationLinkTypeMut> for Conversation {}
impl Cast<dyn ConversationNodeType> for Conversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationNodeTypeMut> for Conversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationKeyType> for Conversation {}
impl Cast<dyn CorrelationKeyTypeMut> for Conversation {}
impl Cast<dyn CorrelationPropertyType> for Conversation {}
impl Cast<dyn CorrelationPropertyTypeMut> for Conversation {}
impl Cast<dyn CorrelationPropertyBindingType> for Conversation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Conversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Conversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Conversation {}
impl Cast<dyn CorrelationSubscriptionType> for Conversation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Conversation {}
impl Cast<dyn DataAssociationType> for Conversation {}
impl Cast<dyn DataAssociationTypeMut> for Conversation {}
impl Cast<dyn DataInputType> for Conversation {}
impl Cast<dyn DataInputTypeMut> for Conversation {}
impl Cast<dyn DataInputAssociationType> for Conversation {}
impl Cast<dyn DataInputAssociationTypeMut> for Conversation {}
impl Cast<dyn DataObjectType> for Conversation {}
impl Cast<dyn DataObjectTypeMut> for Conversation {}
impl Cast<dyn DataObjectReferenceType> for Conversation {}
impl Cast<dyn DataObjectReferenceTypeMut> for Conversation {}
impl Cast<dyn DataOutputType> for Conversation {}
impl Cast<dyn DataOutputTypeMut> for Conversation {}
impl Cast<dyn DataOutputAssociationType> for Conversation {}
impl Cast<dyn DataOutputAssociationTypeMut> for Conversation {}
impl Cast<dyn DataStateType> for Conversation {}
impl Cast<dyn DataStateTypeMut> for Conversation {}
impl Cast<dyn DataStoreType> for Conversation {}
impl Cast<dyn DataStoreTypeMut> for Conversation {}
impl Cast<dyn DataStoreReferenceType> for Conversation {}
impl Cast<dyn DataStoreReferenceTypeMut> for Conversation {}
impl Cast<dyn DocumentationType> for Conversation {}
impl Cast<dyn DocumentationTypeMut> for Conversation {}
impl Cast<dyn EndEventType> for Conversation {}
impl Cast<dyn EndEventTypeMut> for Conversation {}
impl Cast<dyn EndPointType> for Conversation {}
impl Cast<dyn EndPointTypeMut> for Conversation {}
impl Cast<dyn ErrorType> for Conversation {}
impl Cast<dyn ErrorTypeMut> for Conversation {}
impl Cast<dyn ErrorEventDefinitionType> for Conversation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn EscalationType> for Conversation {}
impl Cast<dyn EscalationTypeMut> for Conversation {}
impl Cast<dyn EscalationEventDefinitionType> for Conversation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn EventType> for Conversation {}
impl Cast<dyn EventTypeMut> for Conversation {}
impl Cast<dyn EventBasedGatewayType> for Conversation {}
impl Cast<dyn EventBasedGatewayTypeMut> for Conversation {}
impl Cast<dyn EventDefinitionType> for Conversation {}
impl Cast<dyn EventDefinitionTypeMut> for Conversation {}
impl Cast<dyn ExclusiveGatewayType> for Conversation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Conversation {}
impl Cast<dyn ExpressionType> for Conversation {}
impl Cast<dyn ExpressionTypeMut> for Conversation {}
impl Cast<dyn ExtensionType> for Conversation {}
impl Cast<dyn ExtensionTypeMut> for Conversation {}
impl Cast<dyn ExtensionElementsType> for Conversation {}
impl Cast<dyn ExtensionElementsTypeMut> for Conversation {}
impl Cast<dyn FlowElementType> for Conversation {}
impl Cast<dyn FlowElementTypeMut> for Conversation {}
impl Cast<dyn FlowNodeType> for Conversation {}
impl Cast<dyn FlowNodeTypeMut> for Conversation {}
impl Cast<dyn FormalExpressionType> for Conversation {}
impl Cast<dyn FormalExpressionTypeMut> for Conversation {}
impl Cast<dyn GatewayType> for Conversation {}
impl Cast<dyn GatewayTypeMut> for Conversation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Conversation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Conversation {}
impl Cast<dyn GlobalChoreographyTaskType> for Conversation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Conversation {}
impl Cast<dyn GlobalConversationType> for Conversation {}
impl Cast<dyn GlobalConversationTypeMut> for Conversation {}
impl Cast<dyn GlobalManualTaskType> for Conversation {}
impl Cast<dyn GlobalManualTaskTypeMut> for Conversation {}
impl Cast<dyn GlobalScriptTaskType> for Conversation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Conversation {}
impl Cast<dyn GlobalTaskType> for Conversation {}
impl Cast<dyn GlobalTaskTypeMut> for Conversation {}
impl Cast<dyn GlobalUserTaskType> for Conversation {}
impl Cast<dyn GlobalUserTaskTypeMut> for Conversation {}
impl Cast<dyn GroupType> for Conversation {}
impl Cast<dyn GroupTypeMut> for Conversation {}
impl Cast<dyn HumanPerformerType> for Conversation {}
impl Cast<dyn HumanPerformerTypeMut> for Conversation {}
impl Cast<dyn ImplicitThrowEventType> for Conversation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Conversation {}
impl Cast<dyn InclusiveGatewayType> for Conversation {}
impl Cast<dyn InclusiveGatewayTypeMut> for Conversation {}
impl Cast<dyn InputSetType> for Conversation {}
impl Cast<dyn InputSetTypeMut> for Conversation {}
impl Cast<dyn InterfaceType> for Conversation {}
impl Cast<dyn InterfaceTypeMut> for Conversation {}
impl Cast<dyn IntermediateCatchEventType> for Conversation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Conversation {}
impl Cast<dyn IntermediateThrowEventType> for Conversation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Conversation {}
impl Cast<dyn InputOutputBindingType> for Conversation {}
impl Cast<dyn InputOutputBindingTypeMut> for Conversation {}
impl Cast<dyn InputOutputSpecificationType> for Conversation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Conversation {}
impl Cast<dyn ItemDefinitionType> for Conversation {}
impl Cast<dyn ItemDefinitionTypeMut> for Conversation {}
impl Cast<dyn LaneType> for Conversation {}
impl Cast<dyn LaneTypeMut> for Conversation {}
impl Cast<dyn LaneSetType> for Conversation {}
impl Cast<dyn LaneSetTypeMut> for Conversation {}
impl Cast<dyn LinkEventDefinitionType> for Conversation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn LoopCharacteristicsType> for Conversation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Conversation {}
impl Cast<dyn ManualTaskType> for Conversation {}
impl Cast<dyn ManualTaskTypeMut> for Conversation {}
impl Cast<dyn MessageType> for Conversation {}
impl Cast<dyn MessageTypeMut> for Conversation {}
impl Cast<dyn MessageEventDefinitionType> for Conversation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn MessageFlowType> for Conversation {}
impl Cast<dyn MessageFlowTypeMut> for Conversation {}
impl Cast<dyn MessageFlowAssociationType> for Conversation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Conversation {}
impl Cast<dyn MonitoringType> for Conversation {}
impl Cast<dyn MonitoringTypeMut> for Conversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Conversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Conversation {}
impl Cast<dyn OperationType> for Conversation {}
impl Cast<dyn OperationTypeMut> for Conversation {}
impl Cast<dyn OutputSetType> for Conversation {}
impl Cast<dyn OutputSetTypeMut> for Conversation {}
impl Cast<dyn ParallelGatewayType> for Conversation {}
impl Cast<dyn ParallelGatewayTypeMut> for Conversation {}
impl Cast<dyn ParticipantType> for Conversation {}
impl Cast<dyn ParticipantTypeMut> for Conversation {}
impl Cast<dyn ParticipantAssociationType> for Conversation {}
impl Cast<dyn ParticipantAssociationTypeMut> for Conversation {}
impl Cast<dyn ParticipantMultiplicityType> for Conversation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Conversation {}
impl Cast<dyn PartnerEntityType> for Conversation {}
impl Cast<dyn PartnerEntityTypeMut> for Conversation {}
impl Cast<dyn PartnerRoleType> for Conversation {}
impl Cast<dyn PartnerRoleTypeMut> for Conversation {}
impl Cast<dyn PerformerType> for Conversation {}
impl Cast<dyn PerformerTypeMut> for Conversation {}
impl Cast<dyn PotentialOwnerType> for Conversation {}
impl Cast<dyn PotentialOwnerTypeMut> for Conversation {}
impl Cast<dyn ProcessType> for Conversation {}
impl Cast<dyn ProcessTypeMut> for Conversation {}
impl Cast<dyn PropertyType> for Conversation {}
impl Cast<dyn PropertyTypeMut> for Conversation {}
impl Cast<dyn ReceiveTaskType> for Conversation {}
impl Cast<dyn ReceiveTaskTypeMut> for Conversation {}
impl Cast<dyn RelationshipType> for Conversation {}
impl Cast<dyn RelationshipTypeMut> for Conversation {}
impl Cast<dyn RenderingType> for Conversation {}
impl Cast<dyn RenderingTypeMut> for Conversation {}
impl Cast<dyn ResourceType> for Conversation {}
impl Cast<dyn ResourceTypeMut> for Conversation {}
impl Cast<dyn ResourceAssignmentExpressionType> for Conversation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Conversation {}
impl Cast<dyn ResourceParameterType> for Conversation {}
impl Cast<dyn ResourceParameterTypeMut> for Conversation {}
impl Cast<dyn ResourceParameterBindingType> for Conversation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Conversation {}
impl Cast<dyn ResourceRoleType> for Conversation {}
impl Cast<dyn ResourceRoleTypeMut> for Conversation {}
impl Cast<dyn RootElementType> for Conversation {}
impl Cast<dyn RootElementTypeMut> for Conversation {}
impl Cast<dyn ScriptTaskType> for Conversation {}
impl Cast<dyn ScriptTaskTypeMut> for Conversation {}
impl Cast<dyn ScriptType> for Conversation {}
impl Cast<dyn ScriptTypeMut> for Conversation {}
impl Cast<dyn SendTaskType> for Conversation {}
impl Cast<dyn SendTaskTypeMut> for Conversation {}
impl Cast<dyn SequenceFlowType> for Conversation {}
impl Cast<dyn SequenceFlowTypeMut> for Conversation {}
impl Cast<dyn ServiceTaskType> for Conversation {}
impl Cast<dyn ServiceTaskTypeMut> for Conversation {}
impl Cast<dyn SignalType> for Conversation {}
impl Cast<dyn SignalTypeMut> for Conversation {}
impl Cast<dyn SignalEventDefinitionType> for Conversation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn StandardLoopCharacteristicsType> for Conversation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Conversation {}
impl Cast<dyn StartEventType> for Conversation {}
impl Cast<dyn StartEventTypeMut> for Conversation {}
impl Cast<dyn SubChoreographyType> for Conversation {}
impl Cast<dyn SubChoreographyTypeMut> for Conversation {}
impl Cast<dyn SubConversationType> for Conversation {}
impl Cast<dyn SubConversationTypeMut> for Conversation {}
impl Cast<dyn SubProcessType> for Conversation {}
impl Cast<dyn SubProcessTypeMut> for Conversation {}
impl Cast<dyn TaskType> for Conversation {}
impl Cast<dyn TaskTypeMut> for Conversation {}
impl Cast<dyn TerminateEventDefinitionType> for Conversation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn TextAnnotationType> for Conversation {}
impl Cast<dyn TextAnnotationTypeMut> for Conversation {}
impl Cast<dyn TextType> for Conversation {}
impl Cast<dyn TextTypeMut> for Conversation {}
impl Cast<dyn ThrowEventType> for Conversation {}
impl Cast<dyn ThrowEventTypeMut> for Conversation {}
impl Cast<dyn TimerEventDefinitionType> for Conversation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Conversation {}
impl Cast<dyn TransactionType> for Conversation {}
impl Cast<dyn TransactionTypeMut> for Conversation {}
impl Cast<dyn UserTaskType> for Conversation {}
impl Cast<dyn UserTaskTypeMut> for Conversation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:conversationAssociation")]
pub struct ConversationAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "innerConversationNodeRef")]
    #[tia("ConversationAssociationType",rg*="inner_conversation_node_ref","ConversationAssociationTypeMut",s)]
    pub inner_conversation_node_ref: String,
    #[xml(attr = "outerConversationNodeRef")]
    #[tia("ConversationAssociationType",rg*="outer_conversation_node_ref","ConversationAssociationTypeMut",s)]
    pub outer_conversation_node_ref: String,
}
impl DocumentElement for ConversationAssociation {
    fn element(&self) -> Element {
        Element::ConversationAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ConversationAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `conversationAssociation`
pub trait ConversationAssociationType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `innerConversationNodeRef`
    fn inner_conversation_node_ref(&self) -> &String;
    /// Get value of attribute `outerConversationNodeRef`
    fn outer_conversation_node_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(ConversationAssociationType);
impl_downcast!(ConversationAssociationType);
/// Mutable access to `conversationAssociation`
pub trait ConversationAssociationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ConversationAssociationType
{
    /// Set value of attribute `innerConversationNodeRef`
    fn set_inner_conversation_node_ref(&mut self, value: String);
    /// Set value of attribute `outerConversationNodeRef`
    fn set_outer_conversation_node_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(ConversationAssociationTypeMut);
impl_downcast!(ConversationAssociationTypeMut);
impl Cast<dyn DefinitionsType> for ConversationAssociation {}
impl Cast<dyn DefinitionsTypeMut> for ConversationAssociation {}
impl Cast<dyn ImportType> for ConversationAssociation {}
impl Cast<dyn ImportTypeMut> for ConversationAssociation {}
impl Cast<dyn ActivityType> for ConversationAssociation {}
impl Cast<dyn ActivityTypeMut> for ConversationAssociation {}
impl Cast<dyn AdHocSubProcessType> for ConversationAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for ConversationAssociation {}
impl Cast<dyn ArtifactType> for ConversationAssociation {}
impl Cast<dyn ArtifactTypeMut> for ConversationAssociation {}
impl Cast<dyn AssignmentType> for ConversationAssociation {}
impl Cast<dyn AssignmentTypeMut> for ConversationAssociation {}
impl Cast<dyn AssociationType> for ConversationAssociation {}
impl Cast<dyn AssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn AuditingType> for ConversationAssociation {}
impl Cast<dyn AuditingTypeMut> for ConversationAssociation {}
impl Cast<dyn BaseElementType> for ConversationAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ConversationAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ConversationAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ConversationAssociation {}
impl Cast<dyn BoundaryEventType> for ConversationAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for ConversationAssociation {}
impl Cast<dyn BusinessRuleTaskType> for ConversationAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn CallableElementType> for ConversationAssociation {}
impl Cast<dyn CallableElementTypeMut> for ConversationAssociation {}
impl Cast<dyn CallActivityType> for ConversationAssociation {}
impl Cast<dyn CallActivityTypeMut> for ConversationAssociation {}
impl Cast<dyn CallChoreographyType> for ConversationAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for ConversationAssociation {}
impl Cast<dyn CallConversationType> for ConversationAssociation {}
impl Cast<dyn CallConversationTypeMut> for ConversationAssociation {}
impl Cast<dyn CancelEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn CatchEventType> for ConversationAssociation {}
impl Cast<dyn CatchEventTypeMut> for ConversationAssociation {}
impl Cast<dyn CategoryType> for ConversationAssociation {}
impl Cast<dyn CategoryTypeMut> for ConversationAssociation {}
impl Cast<dyn CategoryValueType> for ConversationAssociation {}
impl Cast<dyn CategoryValueTypeMut> for ConversationAssociation {}
impl Cast<dyn ChoreographyType> for ConversationAssociation {}
impl Cast<dyn ChoreographyTypeMut> for ConversationAssociation {}
impl Cast<dyn ChoreographyActivityType> for ConversationAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for ConversationAssociation {}
impl Cast<dyn ChoreographyTaskType> for ConversationAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn CollaborationType> for ConversationAssociation {}
impl Cast<dyn CollaborationTypeMut> for ConversationAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ConversationAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn ComplexGatewayType> for ConversationAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn ConversationType> for ConversationAssociation {}
impl Cast<dyn ConversationTypeMut> for ConversationAssociation {}
impl Cast<dyn ConversationAssociationType> for ConversationAssociation {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for ConversationAssociation {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationLinkType> for ConversationAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for ConversationAssociation {}
impl Cast<dyn ConversationNodeType> for ConversationAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for ConversationAssociation {}
impl Cast<dyn CorrelationKeyType> for ConversationAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyType> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ConversationAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ConversationAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for ConversationAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ConversationAssociation {}
impl Cast<dyn DataAssociationType> for ConversationAssociation {}
impl Cast<dyn DataAssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn DataInputType> for ConversationAssociation {}
impl Cast<dyn DataInputTypeMut> for ConversationAssociation {}
impl Cast<dyn DataInputAssociationType> for ConversationAssociation {}
impl Cast<dyn DataInputAssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn DataObjectType> for ConversationAssociation {}
impl Cast<dyn DataObjectTypeMut> for ConversationAssociation {}
impl Cast<dyn DataObjectReferenceType> for ConversationAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for ConversationAssociation {}
impl Cast<dyn DataOutputType> for ConversationAssociation {}
impl Cast<dyn DataOutputTypeMut> for ConversationAssociation {}
impl Cast<dyn DataOutputAssociationType> for ConversationAssociation {}
impl Cast<dyn DataOutputAssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn DataStateType> for ConversationAssociation {}
impl Cast<dyn DataStateTypeMut> for ConversationAssociation {}
impl Cast<dyn DataStoreType> for ConversationAssociation {}
impl Cast<dyn DataStoreTypeMut> for ConversationAssociation {}
impl Cast<dyn DataStoreReferenceType> for ConversationAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for ConversationAssociation {}
impl Cast<dyn DocumentationType> for ConversationAssociation {}
impl Cast<dyn DocumentationTypeMut> for ConversationAssociation {}
impl Cast<dyn EndEventType> for ConversationAssociation {}
impl Cast<dyn EndEventTypeMut> for ConversationAssociation {}
impl Cast<dyn EndPointType> for ConversationAssociation {}
impl Cast<dyn EndPointTypeMut> for ConversationAssociation {}
impl Cast<dyn ErrorType> for ConversationAssociation {}
impl Cast<dyn ErrorTypeMut> for ConversationAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn EscalationType> for ConversationAssociation {}
impl Cast<dyn EscalationTypeMut> for ConversationAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn EventType> for ConversationAssociation {}
impl Cast<dyn EventTypeMut> for ConversationAssociation {}
impl Cast<dyn EventBasedGatewayType> for ConversationAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn EventDefinitionType> for ConversationAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn ExclusiveGatewayType> for ConversationAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn ExpressionType> for ConversationAssociation {}
impl Cast<dyn ExpressionTypeMut> for ConversationAssociation {}
impl Cast<dyn ExtensionType> for ConversationAssociation {}
impl Cast<dyn ExtensionTypeMut> for ConversationAssociation {}
impl Cast<dyn ExtensionElementsType> for ConversationAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for ConversationAssociation {}
impl Cast<dyn FlowElementType> for ConversationAssociation {}
impl Cast<dyn FlowElementTypeMut> for ConversationAssociation {}
impl Cast<dyn FlowNodeType> for ConversationAssociation {}
impl Cast<dyn FlowNodeTypeMut> for ConversationAssociation {}
impl Cast<dyn FormalExpressionType> for ConversationAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for ConversationAssociation {}
impl Cast<dyn GatewayType> for ConversationAssociation {}
impl Cast<dyn GatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalConversationType> for ConversationAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalManualTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalScriptTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GlobalUserTaskType> for ConversationAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn GroupType> for ConversationAssociation {}
impl Cast<dyn GroupTypeMut> for ConversationAssociation {}
impl Cast<dyn HumanPerformerType> for ConversationAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for ConversationAssociation {}
impl Cast<dyn ImplicitThrowEventType> for ConversationAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ConversationAssociation {}
impl Cast<dyn InclusiveGatewayType> for ConversationAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn InputSetType> for ConversationAssociation {}
impl Cast<dyn InputSetTypeMut> for ConversationAssociation {}
impl Cast<dyn InterfaceType> for ConversationAssociation {}
impl Cast<dyn InterfaceTypeMut> for ConversationAssociation {}
impl Cast<dyn IntermediateCatchEventType> for ConversationAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ConversationAssociation {}
impl Cast<dyn IntermediateThrowEventType> for ConversationAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ConversationAssociation {}
impl Cast<dyn InputOutputBindingType> for ConversationAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for ConversationAssociation {}
impl Cast<dyn InputOutputSpecificationType> for ConversationAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ConversationAssociation {}
impl Cast<dyn ItemDefinitionType> for ConversationAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn LaneType> for ConversationAssociation {}
impl Cast<dyn LaneTypeMut> for ConversationAssociation {}
impl Cast<dyn LaneSetType> for ConversationAssociation {}
impl Cast<dyn LaneSetTypeMut> for ConversationAssociation {}
impl Cast<dyn LinkEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn LoopCharacteristicsType> for ConversationAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ConversationAssociation {}
impl Cast<dyn ManualTaskType> for ConversationAssociation {}
impl Cast<dyn ManualTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn MessageType> for ConversationAssociation {}
impl Cast<dyn MessageTypeMut> for ConversationAssociation {}
impl Cast<dyn MessageEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn MessageFlowType> for ConversationAssociation {}
impl Cast<dyn MessageFlowTypeMut> for ConversationAssociation {}
impl Cast<dyn MessageFlowAssociationType> for ConversationAssociation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn MonitoringType> for ConversationAssociation {}
impl Cast<dyn MonitoringTypeMut> for ConversationAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ConversationAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ConversationAssociation {}
impl Cast<dyn OperationType> for ConversationAssociation {}
impl Cast<dyn OperationTypeMut> for ConversationAssociation {}
impl Cast<dyn OutputSetType> for ConversationAssociation {}
impl Cast<dyn OutputSetTypeMut> for ConversationAssociation {}
impl Cast<dyn ParallelGatewayType> for ConversationAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for ConversationAssociation {}
impl Cast<dyn ParticipantType> for ConversationAssociation {}
impl Cast<dyn ParticipantTypeMut> for ConversationAssociation {}
impl Cast<dyn ParticipantAssociationType> for ConversationAssociation {}
impl Cast<dyn ParticipantAssociationTypeMut> for ConversationAssociation {}
impl Cast<dyn ParticipantMultiplicityType> for ConversationAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ConversationAssociation {}
impl Cast<dyn PartnerEntityType> for ConversationAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for ConversationAssociation {}
impl Cast<dyn PartnerRoleType> for ConversationAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for ConversationAssociation {}
impl Cast<dyn PerformerType> for ConversationAssociation {}
impl Cast<dyn PerformerTypeMut> for ConversationAssociation {}
impl Cast<dyn PotentialOwnerType> for ConversationAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for ConversationAssociation {}
impl Cast<dyn ProcessType> for ConversationAssociation {}
impl Cast<dyn ProcessTypeMut> for ConversationAssociation {}
impl Cast<dyn PropertyType> for ConversationAssociation {}
impl Cast<dyn PropertyTypeMut> for ConversationAssociation {}
impl Cast<dyn ReceiveTaskType> for ConversationAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn RelationshipType> for ConversationAssociation {}
impl Cast<dyn RelationshipTypeMut> for ConversationAssociation {}
impl Cast<dyn RenderingType> for ConversationAssociation {}
impl Cast<dyn RenderingTypeMut> for ConversationAssociation {}
impl Cast<dyn ResourceType> for ConversationAssociation {}
impl Cast<dyn ResourceTypeMut> for ConversationAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for ConversationAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ConversationAssociation {}
impl Cast<dyn ResourceParameterType> for ConversationAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for ConversationAssociation {}
impl Cast<dyn ResourceParameterBindingType> for ConversationAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ConversationAssociation {}
impl Cast<dyn ResourceRoleType> for ConversationAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for ConversationAssociation {}
impl Cast<dyn RootElementType> for ConversationAssociation {}
impl Cast<dyn RootElementTypeMut> for ConversationAssociation {}
impl Cast<dyn ScriptTaskType> for ConversationAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn ScriptType> for ConversationAssociation {}
impl Cast<dyn ScriptTypeMut> for ConversationAssociation {}
impl Cast<dyn SendTaskType> for ConversationAssociation {}
impl Cast<dyn SendTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn SequenceFlowType> for ConversationAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for ConversationAssociation {}
impl Cast<dyn ServiceTaskType> for ConversationAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for ConversationAssociation {}
impl Cast<dyn SignalType> for ConversationAssociation {}
impl Cast<dyn SignalTypeMut> for ConversationAssociation {}
impl Cast<dyn SignalEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for ConversationAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ConversationAssociation {}
impl Cast<dyn StartEventType> for ConversationAssociation {}
impl Cast<dyn StartEventTypeMut> for ConversationAssociation {}
impl Cast<dyn SubChoreographyType> for ConversationAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for ConversationAssociation {}
impl Cast<dyn SubConversationType> for ConversationAssociation {}
impl Cast<dyn SubConversationTypeMut> for ConversationAssociation {}
impl Cast<dyn SubProcessType> for ConversationAssociation {}
impl Cast<dyn SubProcessTypeMut> for ConversationAssociation {}
impl Cast<dyn TaskType> for ConversationAssociation {}
impl Cast<dyn TaskTypeMut> for ConversationAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn TextAnnotationType> for ConversationAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for ConversationAssociation {}
impl Cast<dyn TextType> for ConversationAssociation {}
impl Cast<dyn TextTypeMut> for ConversationAssociation {}
impl Cast<dyn ThrowEventType> for ConversationAssociation {}
impl Cast<dyn ThrowEventTypeMut> for ConversationAssociation {}
impl Cast<dyn TimerEventDefinitionType> for ConversationAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ConversationAssociation {}
impl Cast<dyn TransactionType> for ConversationAssociation {}
impl Cast<dyn TransactionTypeMut> for ConversationAssociation {}
impl Cast<dyn UserTaskType> for ConversationAssociation {}
impl Cast<dyn UserTaskTypeMut> for ConversationAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:conversationLink")]
pub struct ConversationLink {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ConversationLinkType",rg*="name","ConversationLinkTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "sourceRef")]
    #[tia("ConversationLinkType",rg*="source_ref","ConversationLinkTypeMut",s)]
    pub source_ref: String,
    #[xml(attr = "targetRef")]
    #[tia("ConversationLinkType",rg*="target_ref","ConversationLinkTypeMut",s)]
    pub target_ref: String,
}
impl DocumentElement for ConversationLink {
    fn element(&self) -> Element {
        Element::ConversationLink
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ConversationLink {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `conversationLink`
pub trait ConversationLinkType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `sourceRef`
    fn source_ref(&self) -> &String;
    /// Get value of attribute `targetRef`
    fn target_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(ConversationLinkType);
impl_downcast!(ConversationLinkType);
/// Mutable access to `conversationLink`
pub trait ConversationLinkTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ConversationLinkType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `sourceRef`
    fn set_source_ref(&mut self, value: String);
    /// Set value of attribute `targetRef`
    fn set_target_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(ConversationLinkTypeMut);
impl_downcast!(ConversationLinkTypeMut);
impl Cast<dyn DefinitionsType> for ConversationLink {}
impl Cast<dyn DefinitionsTypeMut> for ConversationLink {}
impl Cast<dyn ImportType> for ConversationLink {}
impl Cast<dyn ImportTypeMut> for ConversationLink {}
impl Cast<dyn ActivityType> for ConversationLink {}
impl Cast<dyn ActivityTypeMut> for ConversationLink {}
impl Cast<dyn AdHocSubProcessType> for ConversationLink {}
impl Cast<dyn AdHocSubProcessTypeMut> for ConversationLink {}
impl Cast<dyn ArtifactType> for ConversationLink {}
impl Cast<dyn ArtifactTypeMut> for ConversationLink {}
impl Cast<dyn AssignmentType> for ConversationLink {}
impl Cast<dyn AssignmentTypeMut> for ConversationLink {}
impl Cast<dyn AssociationType> for ConversationLink {}
impl Cast<dyn AssociationTypeMut> for ConversationLink {}
impl Cast<dyn AuditingType> for ConversationLink {}
impl Cast<dyn AuditingTypeMut> for ConversationLink {}
impl Cast<dyn BaseElementType> for ConversationLink {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ConversationLink {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ConversationLink {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ConversationLink {}
impl Cast<dyn BoundaryEventType> for ConversationLink {}
impl Cast<dyn BoundaryEventTypeMut> for ConversationLink {}
impl Cast<dyn BusinessRuleTaskType> for ConversationLink {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ConversationLink {}
impl Cast<dyn CallableElementType> for ConversationLink {}
impl Cast<dyn CallableElementTypeMut> for ConversationLink {}
impl Cast<dyn CallActivityType> for ConversationLink {}
impl Cast<dyn CallActivityTypeMut> for ConversationLink {}
impl Cast<dyn CallChoreographyType> for ConversationLink {}
impl Cast<dyn CallChoreographyTypeMut> for ConversationLink {}
impl Cast<dyn CallConversationType> for ConversationLink {}
impl Cast<dyn CallConversationTypeMut> for ConversationLink {}
impl Cast<dyn CancelEventDefinitionType> for ConversationLink {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn CatchEventType> for ConversationLink {}
impl Cast<dyn CatchEventTypeMut> for ConversationLink {}
impl Cast<dyn CategoryType> for ConversationLink {}
impl Cast<dyn CategoryTypeMut> for ConversationLink {}
impl Cast<dyn CategoryValueType> for ConversationLink {}
impl Cast<dyn CategoryValueTypeMut> for ConversationLink {}
impl Cast<dyn ChoreographyType> for ConversationLink {}
impl Cast<dyn ChoreographyTypeMut> for ConversationLink {}
impl Cast<dyn ChoreographyActivityType> for ConversationLink {}
impl Cast<dyn ChoreographyActivityTypeMut> for ConversationLink {}
impl Cast<dyn ChoreographyTaskType> for ConversationLink {}
impl Cast<dyn ChoreographyTaskTypeMut> for ConversationLink {}
impl Cast<dyn CollaborationType> for ConversationLink {}
impl Cast<dyn CollaborationTypeMut> for ConversationLink {}
impl Cast<dyn CompensateEventDefinitionType> for ConversationLink {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ConversationLink {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn ComplexGatewayType> for ConversationLink {}
impl Cast<dyn ComplexGatewayTypeMut> for ConversationLink {}
impl Cast<dyn ConditionalEventDefinitionType> for ConversationLink {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn ConversationType> for ConversationLink {}
impl Cast<dyn ConversationTypeMut> for ConversationLink {}
impl Cast<dyn ConversationAssociationType> for ConversationLink {}
impl Cast<dyn ConversationAssociationTypeMut> for ConversationLink {}
impl Cast<dyn ConversationLinkType> for ConversationLink {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationLinkTypeMut> for ConversationLink {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationNodeType> for ConversationLink {}
impl Cast<dyn ConversationNodeTypeMut> for ConversationLink {}
impl Cast<dyn CorrelationKeyType> for ConversationLink {}
impl Cast<dyn CorrelationKeyTypeMut> for ConversationLink {}
impl Cast<dyn CorrelationPropertyType> for ConversationLink {}
impl Cast<dyn CorrelationPropertyTypeMut> for ConversationLink {}
impl Cast<dyn CorrelationPropertyBindingType> for ConversationLink {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ConversationLink {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ConversationLink {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ConversationLink {}
impl Cast<dyn CorrelationSubscriptionType> for ConversationLink {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ConversationLink {}
impl Cast<dyn DataAssociationType> for ConversationLink {}
impl Cast<dyn DataAssociationTypeMut> for ConversationLink {}
impl Cast<dyn DataInputType> for ConversationLink {}
impl Cast<dyn DataInputTypeMut> for ConversationLink {}
impl Cast<dyn DataInputAssociationType> for ConversationLink {}
impl Cast<dyn DataInputAssociationTypeMut> for ConversationLink {}
impl Cast<dyn DataObjectType> for ConversationLink {}
impl Cast<dyn DataObjectTypeMut> for ConversationLink {}
impl Cast<dyn DataObjectReferenceType> for ConversationLink {}
impl Cast<dyn DataObjectReferenceTypeMut> for ConversationLink {}
impl Cast<dyn DataOutputType> for ConversationLink {}
impl Cast<dyn DataOutputTypeMut> for ConversationLink {}
impl Cast<dyn DataOutputAssociationType> for ConversationLink {}
impl Cast<dyn DataOutputAssociationTypeMut> for ConversationLink {}
impl Cast<dyn DataStateType> for ConversationLink {}
impl Cast<dyn DataStateTypeMut> for ConversationLink {}
impl Cast<dyn DataStoreType> for ConversationLink {}
impl Cast<dyn DataStoreTypeMut> for ConversationLink {}
impl Cast<dyn DataStoreReferenceType> for ConversationLink {}
impl Cast<dyn DataStoreReferenceTypeMut> for ConversationLink {}
impl Cast<dyn DocumentationType> for ConversationLink {}
impl Cast<dyn DocumentationTypeMut> for ConversationLink {}
impl Cast<dyn EndEventType> for ConversationLink {}
impl Cast<dyn EndEventTypeMut> for ConversationLink {}
impl Cast<dyn EndPointType> for ConversationLink {}
impl Cast<dyn EndPointTypeMut> for ConversationLink {}
impl Cast<dyn ErrorType> for ConversationLink {}
impl Cast<dyn ErrorTypeMut> for ConversationLink {}
impl Cast<dyn ErrorEventDefinitionType> for ConversationLink {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn EscalationType> for ConversationLink {}
impl Cast<dyn EscalationTypeMut> for ConversationLink {}
impl Cast<dyn EscalationEventDefinitionType> for ConversationLink {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn EventType> for ConversationLink {}
impl Cast<dyn EventTypeMut> for ConversationLink {}
impl Cast<dyn EventBasedGatewayType> for ConversationLink {}
impl Cast<dyn EventBasedGatewayTypeMut> for ConversationLink {}
impl Cast<dyn EventDefinitionType> for ConversationLink {}
impl Cast<dyn EventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn ExclusiveGatewayType> for ConversationLink {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ConversationLink {}
impl Cast<dyn ExpressionType> for ConversationLink {}
impl Cast<dyn ExpressionTypeMut> for ConversationLink {}
impl Cast<dyn ExtensionType> for ConversationLink {}
impl Cast<dyn ExtensionTypeMut> for ConversationLink {}
impl Cast<dyn ExtensionElementsType> for ConversationLink {}
impl Cast<dyn ExtensionElementsTypeMut> for ConversationLink {}
impl Cast<dyn FlowElementType> for ConversationLink {}
impl Cast<dyn FlowElementTypeMut> for ConversationLink {}
impl Cast<dyn FlowNodeType> for ConversationLink {}
impl Cast<dyn FlowNodeTypeMut> for ConversationLink {}
impl Cast<dyn FormalExpressionType> for ConversationLink {}
impl Cast<dyn FormalExpressionTypeMut> for ConversationLink {}
impl Cast<dyn GatewayType> for ConversationLink {}
impl Cast<dyn GatewayTypeMut> for ConversationLink {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ConversationLink {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ConversationLink {}
impl Cast<dyn GlobalChoreographyTaskType> for ConversationLink {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ConversationLink {}
impl Cast<dyn GlobalConversationType> for ConversationLink {}
impl Cast<dyn GlobalConversationTypeMut> for ConversationLink {}
impl Cast<dyn GlobalManualTaskType> for ConversationLink {}
impl Cast<dyn GlobalManualTaskTypeMut> for ConversationLink {}
impl Cast<dyn GlobalScriptTaskType> for ConversationLink {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ConversationLink {}
impl Cast<dyn GlobalTaskType> for ConversationLink {}
impl Cast<dyn GlobalTaskTypeMut> for ConversationLink {}
impl Cast<dyn GlobalUserTaskType> for ConversationLink {}
impl Cast<dyn GlobalUserTaskTypeMut> for ConversationLink {}
impl Cast<dyn GroupType> for ConversationLink {}
impl Cast<dyn GroupTypeMut> for ConversationLink {}
impl Cast<dyn HumanPerformerType> for ConversationLink {}
impl Cast<dyn HumanPerformerTypeMut> for ConversationLink {}
impl Cast<dyn ImplicitThrowEventType> for ConversationLink {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ConversationLink {}
impl Cast<dyn InclusiveGatewayType> for ConversationLink {}
impl Cast<dyn InclusiveGatewayTypeMut> for ConversationLink {}
impl Cast<dyn InputSetType> for ConversationLink {}
impl Cast<dyn InputSetTypeMut> for ConversationLink {}
impl Cast<dyn InterfaceType> for ConversationLink {}
impl Cast<dyn InterfaceTypeMut> for ConversationLink {}
impl Cast<dyn IntermediateCatchEventType> for ConversationLink {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ConversationLink {}
impl Cast<dyn IntermediateThrowEventType> for ConversationLink {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ConversationLink {}
impl Cast<dyn InputOutputBindingType> for ConversationLink {}
impl Cast<dyn InputOutputBindingTypeMut> for ConversationLink {}
impl Cast<dyn InputOutputSpecificationType> for ConversationLink {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ConversationLink {}
impl Cast<dyn ItemDefinitionType> for ConversationLink {}
impl Cast<dyn ItemDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn LaneType> for ConversationLink {}
impl Cast<dyn LaneTypeMut> for ConversationLink {}
impl Cast<dyn LaneSetType> for ConversationLink {}
impl Cast<dyn LaneSetTypeMut> for ConversationLink {}
impl Cast<dyn LinkEventDefinitionType> for ConversationLink {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn LoopCharacteristicsType> for ConversationLink {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ConversationLink {}
impl Cast<dyn ManualTaskType> for ConversationLink {}
impl Cast<dyn ManualTaskTypeMut> for ConversationLink {}
impl Cast<dyn MessageType> for ConversationLink {}
impl Cast<dyn MessageTypeMut> for ConversationLink {}
impl Cast<dyn MessageEventDefinitionType> for ConversationLink {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn MessageFlowType> for ConversationLink {}
impl Cast<dyn MessageFlowTypeMut> for ConversationLink {}
impl Cast<dyn MessageFlowAssociationType> for ConversationLink {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ConversationLink {}
impl Cast<dyn MonitoringType> for ConversationLink {}
impl Cast<dyn MonitoringTypeMut> for ConversationLink {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ConversationLink {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ConversationLink {}
impl Cast<dyn OperationType> for ConversationLink {}
impl Cast<dyn OperationTypeMut> for ConversationLink {}
impl Cast<dyn OutputSetType> for ConversationLink {}
impl Cast<dyn OutputSetTypeMut> for ConversationLink {}
impl Cast<dyn ParallelGatewayType> for ConversationLink {}
impl Cast<dyn ParallelGatewayTypeMut> for ConversationLink {}
impl Cast<dyn ParticipantType> for ConversationLink {}
impl Cast<dyn ParticipantTypeMut> for ConversationLink {}
impl Cast<dyn ParticipantAssociationType> for ConversationLink {}
impl Cast<dyn ParticipantAssociationTypeMut> for ConversationLink {}
impl Cast<dyn ParticipantMultiplicityType> for ConversationLink {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ConversationLink {}
impl Cast<dyn PartnerEntityType> for ConversationLink {}
impl Cast<dyn PartnerEntityTypeMut> for ConversationLink {}
impl Cast<dyn PartnerRoleType> for ConversationLink {}
impl Cast<dyn PartnerRoleTypeMut> for ConversationLink {}
impl Cast<dyn PerformerType> for ConversationLink {}
impl Cast<dyn PerformerTypeMut> for ConversationLink {}
impl Cast<dyn PotentialOwnerType> for ConversationLink {}
impl Cast<dyn PotentialOwnerTypeMut> for ConversationLink {}
impl Cast<dyn ProcessType> for ConversationLink {}
impl Cast<dyn ProcessTypeMut> for ConversationLink {}
impl Cast<dyn PropertyType> for ConversationLink {}
impl Cast<dyn PropertyTypeMut> for ConversationLink {}
impl Cast<dyn ReceiveTaskType> for ConversationLink {}
impl Cast<dyn ReceiveTaskTypeMut> for ConversationLink {}
impl Cast<dyn RelationshipType> for ConversationLink {}
impl Cast<dyn RelationshipTypeMut> for ConversationLink {}
impl Cast<dyn RenderingType> for ConversationLink {}
impl Cast<dyn RenderingTypeMut> for ConversationLink {}
impl Cast<dyn ResourceType> for ConversationLink {}
impl Cast<dyn ResourceTypeMut> for ConversationLink {}
impl Cast<dyn ResourceAssignmentExpressionType> for ConversationLink {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ConversationLink {}
impl Cast<dyn ResourceParameterType> for ConversationLink {}
impl Cast<dyn ResourceParameterTypeMut> for ConversationLink {}
impl Cast<dyn ResourceParameterBindingType> for ConversationLink {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ConversationLink {}
impl Cast<dyn ResourceRoleType> for ConversationLink {}
impl Cast<dyn ResourceRoleTypeMut> for ConversationLink {}
impl Cast<dyn RootElementType> for ConversationLink {}
impl Cast<dyn RootElementTypeMut> for ConversationLink {}
impl Cast<dyn ScriptTaskType> for ConversationLink {}
impl Cast<dyn ScriptTaskTypeMut> for ConversationLink {}
impl Cast<dyn ScriptType> for ConversationLink {}
impl Cast<dyn ScriptTypeMut> for ConversationLink {}
impl Cast<dyn SendTaskType> for ConversationLink {}
impl Cast<dyn SendTaskTypeMut> for ConversationLink {}
impl Cast<dyn SequenceFlowType> for ConversationLink {}
impl Cast<dyn SequenceFlowTypeMut> for ConversationLink {}
impl Cast<dyn ServiceTaskType> for ConversationLink {}
impl Cast<dyn ServiceTaskTypeMut> for ConversationLink {}
impl Cast<dyn SignalType> for ConversationLink {}
impl Cast<dyn SignalTypeMut> for ConversationLink {}
impl Cast<dyn SignalEventDefinitionType> for ConversationLink {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn StandardLoopCharacteristicsType> for ConversationLink {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ConversationLink {}
impl Cast<dyn StartEventType> for ConversationLink {}
impl Cast<dyn StartEventTypeMut> for ConversationLink {}
impl Cast<dyn SubChoreographyType> for ConversationLink {}
impl Cast<dyn SubChoreographyTypeMut> for ConversationLink {}
impl Cast<dyn SubConversationType> for ConversationLink {}
impl Cast<dyn SubConversationTypeMut> for ConversationLink {}
impl Cast<dyn SubProcessType> for ConversationLink {}
impl Cast<dyn SubProcessTypeMut> for ConversationLink {}
impl Cast<dyn TaskType> for ConversationLink {}
impl Cast<dyn TaskTypeMut> for ConversationLink {}
impl Cast<dyn TerminateEventDefinitionType> for ConversationLink {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn TextAnnotationType> for ConversationLink {}
impl Cast<dyn TextAnnotationTypeMut> for ConversationLink {}
impl Cast<dyn TextType> for ConversationLink {}
impl Cast<dyn TextTypeMut> for ConversationLink {}
impl Cast<dyn ThrowEventType> for ConversationLink {}
impl Cast<dyn ThrowEventTypeMut> for ConversationLink {}
impl Cast<dyn TimerEventDefinitionType> for ConversationLink {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ConversationLink {}
impl Cast<dyn TransactionType> for ConversationLink {}
impl Cast<dyn TransactionTypeMut> for ConversationLink {}
impl Cast<dyn UserTaskType> for ConversationLink {}
impl Cast<dyn UserTaskTypeMut> for ConversationLink {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:conversationNode")]
#[serde(tag = "type")]
pub enum ConversationNode {
    #[xml(tag = "bpmn:callConversation")]
    CallConversation(CallConversation),
    #[xml(tag = "bpmn:conversation")]
    Conversation(Conversation),
    #[xml(tag = "bpmn:subConversation")]
    SubConversation(SubConversation),
}
impl ConversationNode {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            ConversationNode::CallConversation(e) => Box::new(e) as Box<dyn DocumentElement>,
            ConversationNode::Conversation(e) => Box::new(e) as Box<dyn DocumentElement>,
            ConversationNode::SubConversation(e) => Box::new(e) as Box<dyn DocumentElement>,
        }
    }
}
impl DocumentElementContainer for ConversationNode {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            ConversationNode::CallConversation(e) => e.find_by_id_mut(id),
            ConversationNode::Conversation(e) => e.find_by_id_mut(id),
            ConversationNode::SubConversation(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            ConversationNode::CallConversation(e) => e.find_by_id(id),
            ConversationNode::Conversation(e) => e.find_by_id(id),
            ConversationNode::SubConversation(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for ConversationNode {
    fn element(&self) -> Element {
        Element::ConversationNode
    }
}
/// Access to `conversationNode`
pub trait ConversationNodeType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `participantRef` child
    fn participant_refs(&self) -> &Vec<String>;
    /// Get value of `messageFlowRef` child
    fn message_flow_refs(&self) -> &Vec<String>;
    /// Get value of `correlationKey` child
    fn correlation_keys(&self) -> &Vec<CorrelationKey>;
}
dyn_clone::clone_trait_object!(ConversationNodeType);
impl_downcast!(ConversationNodeType);
/// Mutable access to `conversationNode`
pub trait ConversationNodeTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ConversationNodeType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `participantRef` child
    fn participant_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `participantRef` child
    fn set_participant_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `messageFlowRef` child
    fn message_flow_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `messageFlowRef` child
    fn set_message_flow_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `correlationKey` child
    fn correlation_keys_mut(&mut self) -> &mut Vec<CorrelationKey>;
    /// Set value of `correlationKey` child
    fn set_correlation_keys(&mut self, value: Vec<CorrelationKey>);
}
dyn_clone::clone_trait_object!(ConversationNodeTypeMut);
impl_downcast!(ConversationNodeTypeMut);
impl Cast<dyn DefinitionsType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DefinitionsType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DefinitionsType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImportType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImportType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImportType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImportType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImportTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImportTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ActivityType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ActivityType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ActivityType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ActivityType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ArtifactType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ArtifactType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssignmentType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssignmentType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssociationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssociationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssociationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AuditingType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AuditingType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AuditingType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AuditingType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BaseElementType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BaseElementType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BoundaryEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BoundaryEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallableElementType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallableElementType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallableElementType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallableElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallActivityType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallActivityType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallChoreographyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallChoreographyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallConversationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallConversationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallConversationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CatchEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CatchEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CatchEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryValueType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryValueType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CollaborationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CollaborationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CollaborationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexGatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationLinkType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationLinkType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationLinkType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationNodeType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationNodeType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationNodeType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationKeyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataAssociationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataInputType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataInputType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataInputType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataInputType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataInputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataObjectType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataOutputType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStateType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStateType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStateType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStateType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStateType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DocumentationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DocumentationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DocumentationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndEventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndPointType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndPointType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndPointType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndPointType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ErrorType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ErrorType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ErrorType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ErrorType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EscalationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EscalationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EscalationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EscalationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExpressionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExpressionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExpressionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowElementType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowElementType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowElementType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowNodeType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowNodeType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FormalExpressionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FormalExpressionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalConversationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalConversationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalConversationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GroupType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GroupType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GroupType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GroupType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GroupTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn GroupTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn HumanPerformerType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn HumanPerformerType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputSetType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputSetType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputSetType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputSetType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputSetType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InterfaceType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InterfaceType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputBindingType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ItemDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneSetType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneSetType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ManualTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ManualTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ManualTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageFlowType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MonitoringType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MonitoringType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MonitoringType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OperationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn OperationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OperationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn OperationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OperationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn OperationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OutputSetType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn OutputSetType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParticipantType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerEntityType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerEntityType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerEntityType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerRoleType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerRoleType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PerformerType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PerformerType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PerformerType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PerformerType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ProcessType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ProcessType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ProcessType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ProcessType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PropertyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PropertyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PropertyType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PropertyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RelationshipType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RelationshipType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RenderingType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RenderingType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RenderingType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RenderingType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceParameterType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceParameterType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceRoleType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceRoleType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceRoleType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RootElementType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RootElementType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RootElementType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RootElementType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SendTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SendTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SequenceFlowType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SequenceFlowType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ServiceTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ServiceTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SignalType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SignalType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SignalType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SignalType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SignalTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SignalTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn StartEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn StartEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn StartEventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn StartEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubChoreographyType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubChoreographyType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubConversationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubConversationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubProcessType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubProcessType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextAnnotationType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextAnnotationType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextAnnotationType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ThrowEventType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ThrowEventType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            ConversationNode::Conversation(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::Conversation(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            ConversationNode::SubConversation(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TransactionType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TransactionType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TransactionType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TransactionType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TransactionType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for ConversationNode {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn UserTaskType>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn UserTaskType>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for ConversationNode {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            ConversationNode::Conversation(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            ConversationNode::SubConversation(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            ConversationNode::CallConversation(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            ConversationNode::Conversation(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            ConversationNode::SubConversation(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:correlationKey")]
pub struct CorrelationKey {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CorrelationKeyType",rg*="name","CorrelationKeyTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:correlationPropertyRef")]
    #[tia("CorrelationKeyType",rg*="correlation_property_refs","CorrelationKeyTypeMut",s,rmg*="correlation_property_refs_mut")]
    pub correlation_property_refs: Vec<String>,
}
impl DocumentElement for CorrelationKey {
    fn element(&self) -> Element {
        Element::CorrelationKey
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CorrelationKey {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `correlationKey`
pub trait CorrelationKeyType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `correlationPropertyRef` child
    fn correlation_property_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(CorrelationKeyType);
impl_downcast!(CorrelationKeyType);
/// Mutable access to `correlationKey`
pub trait CorrelationKeyTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + CorrelationKeyType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `correlationPropertyRef` child
    fn correlation_property_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `correlationPropertyRef` child
    fn set_correlation_property_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(CorrelationKeyTypeMut);
impl_downcast!(CorrelationKeyTypeMut);
impl Cast<dyn DefinitionsType> for CorrelationKey {}
impl Cast<dyn DefinitionsTypeMut> for CorrelationKey {}
impl Cast<dyn ImportType> for CorrelationKey {}
impl Cast<dyn ImportTypeMut> for CorrelationKey {}
impl Cast<dyn ActivityType> for CorrelationKey {}
impl Cast<dyn ActivityTypeMut> for CorrelationKey {}
impl Cast<dyn AdHocSubProcessType> for CorrelationKey {}
impl Cast<dyn AdHocSubProcessTypeMut> for CorrelationKey {}
impl Cast<dyn ArtifactType> for CorrelationKey {}
impl Cast<dyn ArtifactTypeMut> for CorrelationKey {}
impl Cast<dyn AssignmentType> for CorrelationKey {}
impl Cast<dyn AssignmentTypeMut> for CorrelationKey {}
impl Cast<dyn AssociationType> for CorrelationKey {}
impl Cast<dyn AssociationTypeMut> for CorrelationKey {}
impl Cast<dyn AuditingType> for CorrelationKey {}
impl Cast<dyn AuditingTypeMut> for CorrelationKey {}
impl Cast<dyn BaseElementType> for CorrelationKey {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CorrelationKey {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CorrelationKey {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CorrelationKey {}
impl Cast<dyn BoundaryEventType> for CorrelationKey {}
impl Cast<dyn BoundaryEventTypeMut> for CorrelationKey {}
impl Cast<dyn BusinessRuleTaskType> for CorrelationKey {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CorrelationKey {}
impl Cast<dyn CallableElementType> for CorrelationKey {}
impl Cast<dyn CallableElementTypeMut> for CorrelationKey {}
impl Cast<dyn CallActivityType> for CorrelationKey {}
impl Cast<dyn CallActivityTypeMut> for CorrelationKey {}
impl Cast<dyn CallChoreographyType> for CorrelationKey {}
impl Cast<dyn CallChoreographyTypeMut> for CorrelationKey {}
impl Cast<dyn CallConversationType> for CorrelationKey {}
impl Cast<dyn CallConversationTypeMut> for CorrelationKey {}
impl Cast<dyn CancelEventDefinitionType> for CorrelationKey {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn CatchEventType> for CorrelationKey {}
impl Cast<dyn CatchEventTypeMut> for CorrelationKey {}
impl Cast<dyn CategoryType> for CorrelationKey {}
impl Cast<dyn CategoryTypeMut> for CorrelationKey {}
impl Cast<dyn CategoryValueType> for CorrelationKey {}
impl Cast<dyn CategoryValueTypeMut> for CorrelationKey {}
impl Cast<dyn ChoreographyType> for CorrelationKey {}
impl Cast<dyn ChoreographyTypeMut> for CorrelationKey {}
impl Cast<dyn ChoreographyActivityType> for CorrelationKey {}
impl Cast<dyn ChoreographyActivityTypeMut> for CorrelationKey {}
impl Cast<dyn ChoreographyTaskType> for CorrelationKey {}
impl Cast<dyn ChoreographyTaskTypeMut> for CorrelationKey {}
impl Cast<dyn CollaborationType> for CorrelationKey {}
impl Cast<dyn CollaborationTypeMut> for CorrelationKey {}
impl Cast<dyn CompensateEventDefinitionType> for CorrelationKey {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CorrelationKey {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn ComplexGatewayType> for CorrelationKey {}
impl Cast<dyn ComplexGatewayTypeMut> for CorrelationKey {}
impl Cast<dyn ConditionalEventDefinitionType> for CorrelationKey {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn ConversationType> for CorrelationKey {}
impl Cast<dyn ConversationTypeMut> for CorrelationKey {}
impl Cast<dyn ConversationAssociationType> for CorrelationKey {}
impl Cast<dyn ConversationAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn ConversationLinkType> for CorrelationKey {}
impl Cast<dyn ConversationLinkTypeMut> for CorrelationKey {}
impl Cast<dyn ConversationNodeType> for CorrelationKey {}
impl Cast<dyn ConversationNodeTypeMut> for CorrelationKey {}
impl Cast<dyn CorrelationKeyType> for CorrelationKey {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for CorrelationKey {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyType> for CorrelationKey {}
impl Cast<dyn CorrelationPropertyTypeMut> for CorrelationKey {}
impl Cast<dyn CorrelationPropertyBindingType> for CorrelationKey {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CorrelationKey {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CorrelationKey {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CorrelationKey {}
impl Cast<dyn CorrelationSubscriptionType> for CorrelationKey {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CorrelationKey {}
impl Cast<dyn DataAssociationType> for CorrelationKey {}
impl Cast<dyn DataAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn DataInputType> for CorrelationKey {}
impl Cast<dyn DataInputTypeMut> for CorrelationKey {}
impl Cast<dyn DataInputAssociationType> for CorrelationKey {}
impl Cast<dyn DataInputAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn DataObjectType> for CorrelationKey {}
impl Cast<dyn DataObjectTypeMut> for CorrelationKey {}
impl Cast<dyn DataObjectReferenceType> for CorrelationKey {}
impl Cast<dyn DataObjectReferenceTypeMut> for CorrelationKey {}
impl Cast<dyn DataOutputType> for CorrelationKey {}
impl Cast<dyn DataOutputTypeMut> for CorrelationKey {}
impl Cast<dyn DataOutputAssociationType> for CorrelationKey {}
impl Cast<dyn DataOutputAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn DataStateType> for CorrelationKey {}
impl Cast<dyn DataStateTypeMut> for CorrelationKey {}
impl Cast<dyn DataStoreType> for CorrelationKey {}
impl Cast<dyn DataStoreTypeMut> for CorrelationKey {}
impl Cast<dyn DataStoreReferenceType> for CorrelationKey {}
impl Cast<dyn DataStoreReferenceTypeMut> for CorrelationKey {}
impl Cast<dyn DocumentationType> for CorrelationKey {}
impl Cast<dyn DocumentationTypeMut> for CorrelationKey {}
impl Cast<dyn EndEventType> for CorrelationKey {}
impl Cast<dyn EndEventTypeMut> for CorrelationKey {}
impl Cast<dyn EndPointType> for CorrelationKey {}
impl Cast<dyn EndPointTypeMut> for CorrelationKey {}
impl Cast<dyn ErrorType> for CorrelationKey {}
impl Cast<dyn ErrorTypeMut> for CorrelationKey {}
impl Cast<dyn ErrorEventDefinitionType> for CorrelationKey {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn EscalationType> for CorrelationKey {}
impl Cast<dyn EscalationTypeMut> for CorrelationKey {}
impl Cast<dyn EscalationEventDefinitionType> for CorrelationKey {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn EventType> for CorrelationKey {}
impl Cast<dyn EventTypeMut> for CorrelationKey {}
impl Cast<dyn EventBasedGatewayType> for CorrelationKey {}
impl Cast<dyn EventBasedGatewayTypeMut> for CorrelationKey {}
impl Cast<dyn EventDefinitionType> for CorrelationKey {}
impl Cast<dyn EventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn ExclusiveGatewayType> for CorrelationKey {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CorrelationKey {}
impl Cast<dyn ExpressionType> for CorrelationKey {}
impl Cast<dyn ExpressionTypeMut> for CorrelationKey {}
impl Cast<dyn ExtensionType> for CorrelationKey {}
impl Cast<dyn ExtensionTypeMut> for CorrelationKey {}
impl Cast<dyn ExtensionElementsType> for CorrelationKey {}
impl Cast<dyn ExtensionElementsTypeMut> for CorrelationKey {}
impl Cast<dyn FlowElementType> for CorrelationKey {}
impl Cast<dyn FlowElementTypeMut> for CorrelationKey {}
impl Cast<dyn FlowNodeType> for CorrelationKey {}
impl Cast<dyn FlowNodeTypeMut> for CorrelationKey {}
impl Cast<dyn FormalExpressionType> for CorrelationKey {}
impl Cast<dyn FormalExpressionTypeMut> for CorrelationKey {}
impl Cast<dyn GatewayType> for CorrelationKey {}
impl Cast<dyn GatewayTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CorrelationKey {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalChoreographyTaskType> for CorrelationKey {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalConversationType> for CorrelationKey {}
impl Cast<dyn GlobalConversationTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalManualTaskType> for CorrelationKey {}
impl Cast<dyn GlobalManualTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalScriptTaskType> for CorrelationKey {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalTaskType> for CorrelationKey {}
impl Cast<dyn GlobalTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GlobalUserTaskType> for CorrelationKey {}
impl Cast<dyn GlobalUserTaskTypeMut> for CorrelationKey {}
impl Cast<dyn GroupType> for CorrelationKey {}
impl Cast<dyn GroupTypeMut> for CorrelationKey {}
impl Cast<dyn HumanPerformerType> for CorrelationKey {}
impl Cast<dyn HumanPerformerTypeMut> for CorrelationKey {}
impl Cast<dyn ImplicitThrowEventType> for CorrelationKey {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CorrelationKey {}
impl Cast<dyn InclusiveGatewayType> for CorrelationKey {}
impl Cast<dyn InclusiveGatewayTypeMut> for CorrelationKey {}
impl Cast<dyn InputSetType> for CorrelationKey {}
impl Cast<dyn InputSetTypeMut> for CorrelationKey {}
impl Cast<dyn InterfaceType> for CorrelationKey {}
impl Cast<dyn InterfaceTypeMut> for CorrelationKey {}
impl Cast<dyn IntermediateCatchEventType> for CorrelationKey {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CorrelationKey {}
impl Cast<dyn IntermediateThrowEventType> for CorrelationKey {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CorrelationKey {}
impl Cast<dyn InputOutputBindingType> for CorrelationKey {}
impl Cast<dyn InputOutputBindingTypeMut> for CorrelationKey {}
impl Cast<dyn InputOutputSpecificationType> for CorrelationKey {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CorrelationKey {}
impl Cast<dyn ItemDefinitionType> for CorrelationKey {}
impl Cast<dyn ItemDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn LaneType> for CorrelationKey {}
impl Cast<dyn LaneTypeMut> for CorrelationKey {}
impl Cast<dyn LaneSetType> for CorrelationKey {}
impl Cast<dyn LaneSetTypeMut> for CorrelationKey {}
impl Cast<dyn LinkEventDefinitionType> for CorrelationKey {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn LoopCharacteristicsType> for CorrelationKey {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CorrelationKey {}
impl Cast<dyn ManualTaskType> for CorrelationKey {}
impl Cast<dyn ManualTaskTypeMut> for CorrelationKey {}
impl Cast<dyn MessageType> for CorrelationKey {}
impl Cast<dyn MessageTypeMut> for CorrelationKey {}
impl Cast<dyn MessageEventDefinitionType> for CorrelationKey {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn MessageFlowType> for CorrelationKey {}
impl Cast<dyn MessageFlowTypeMut> for CorrelationKey {}
impl Cast<dyn MessageFlowAssociationType> for CorrelationKey {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn MonitoringType> for CorrelationKey {}
impl Cast<dyn MonitoringTypeMut> for CorrelationKey {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CorrelationKey {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CorrelationKey {}
impl Cast<dyn OperationType> for CorrelationKey {}
impl Cast<dyn OperationTypeMut> for CorrelationKey {}
impl Cast<dyn OutputSetType> for CorrelationKey {}
impl Cast<dyn OutputSetTypeMut> for CorrelationKey {}
impl Cast<dyn ParallelGatewayType> for CorrelationKey {}
impl Cast<dyn ParallelGatewayTypeMut> for CorrelationKey {}
impl Cast<dyn ParticipantType> for CorrelationKey {}
impl Cast<dyn ParticipantTypeMut> for CorrelationKey {}
impl Cast<dyn ParticipantAssociationType> for CorrelationKey {}
impl Cast<dyn ParticipantAssociationTypeMut> for CorrelationKey {}
impl Cast<dyn ParticipantMultiplicityType> for CorrelationKey {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CorrelationKey {}
impl Cast<dyn PartnerEntityType> for CorrelationKey {}
impl Cast<dyn PartnerEntityTypeMut> for CorrelationKey {}
impl Cast<dyn PartnerRoleType> for CorrelationKey {}
impl Cast<dyn PartnerRoleTypeMut> for CorrelationKey {}
impl Cast<dyn PerformerType> for CorrelationKey {}
impl Cast<dyn PerformerTypeMut> for CorrelationKey {}
impl Cast<dyn PotentialOwnerType> for CorrelationKey {}
impl Cast<dyn PotentialOwnerTypeMut> for CorrelationKey {}
impl Cast<dyn ProcessType> for CorrelationKey {}
impl Cast<dyn ProcessTypeMut> for CorrelationKey {}
impl Cast<dyn PropertyType> for CorrelationKey {}
impl Cast<dyn PropertyTypeMut> for CorrelationKey {}
impl Cast<dyn ReceiveTaskType> for CorrelationKey {}
impl Cast<dyn ReceiveTaskTypeMut> for CorrelationKey {}
impl Cast<dyn RelationshipType> for CorrelationKey {}
impl Cast<dyn RelationshipTypeMut> for CorrelationKey {}
impl Cast<dyn RenderingType> for CorrelationKey {}
impl Cast<dyn RenderingTypeMut> for CorrelationKey {}
impl Cast<dyn ResourceType> for CorrelationKey {}
impl Cast<dyn ResourceTypeMut> for CorrelationKey {}
impl Cast<dyn ResourceAssignmentExpressionType> for CorrelationKey {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CorrelationKey {}
impl Cast<dyn ResourceParameterType> for CorrelationKey {}
impl Cast<dyn ResourceParameterTypeMut> for CorrelationKey {}
impl Cast<dyn ResourceParameterBindingType> for CorrelationKey {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CorrelationKey {}
impl Cast<dyn ResourceRoleType> for CorrelationKey {}
impl Cast<dyn ResourceRoleTypeMut> for CorrelationKey {}
impl Cast<dyn RootElementType> for CorrelationKey {}
impl Cast<dyn RootElementTypeMut> for CorrelationKey {}
impl Cast<dyn ScriptTaskType> for CorrelationKey {}
impl Cast<dyn ScriptTaskTypeMut> for CorrelationKey {}
impl Cast<dyn ScriptType> for CorrelationKey {}
impl Cast<dyn ScriptTypeMut> for CorrelationKey {}
impl Cast<dyn SendTaskType> for CorrelationKey {}
impl Cast<dyn SendTaskTypeMut> for CorrelationKey {}
impl Cast<dyn SequenceFlowType> for CorrelationKey {}
impl Cast<dyn SequenceFlowTypeMut> for CorrelationKey {}
impl Cast<dyn ServiceTaskType> for CorrelationKey {}
impl Cast<dyn ServiceTaskTypeMut> for CorrelationKey {}
impl Cast<dyn SignalType> for CorrelationKey {}
impl Cast<dyn SignalTypeMut> for CorrelationKey {}
impl Cast<dyn SignalEventDefinitionType> for CorrelationKey {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn StandardLoopCharacteristicsType> for CorrelationKey {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CorrelationKey {}
impl Cast<dyn StartEventType> for CorrelationKey {}
impl Cast<dyn StartEventTypeMut> for CorrelationKey {}
impl Cast<dyn SubChoreographyType> for CorrelationKey {}
impl Cast<dyn SubChoreographyTypeMut> for CorrelationKey {}
impl Cast<dyn SubConversationType> for CorrelationKey {}
impl Cast<dyn SubConversationTypeMut> for CorrelationKey {}
impl Cast<dyn SubProcessType> for CorrelationKey {}
impl Cast<dyn SubProcessTypeMut> for CorrelationKey {}
impl Cast<dyn TaskType> for CorrelationKey {}
impl Cast<dyn TaskTypeMut> for CorrelationKey {}
impl Cast<dyn TerminateEventDefinitionType> for CorrelationKey {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn TextAnnotationType> for CorrelationKey {}
impl Cast<dyn TextAnnotationTypeMut> for CorrelationKey {}
impl Cast<dyn TextType> for CorrelationKey {}
impl Cast<dyn TextTypeMut> for CorrelationKey {}
impl Cast<dyn ThrowEventType> for CorrelationKey {}
impl Cast<dyn ThrowEventTypeMut> for CorrelationKey {}
impl Cast<dyn TimerEventDefinitionType> for CorrelationKey {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CorrelationKey {}
impl Cast<dyn TransactionType> for CorrelationKey {}
impl Cast<dyn TransactionTypeMut> for CorrelationKey {}
impl Cast<dyn UserTaskType> for CorrelationKey {}
impl Cast<dyn UserTaskTypeMut> for CorrelationKey {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:correlationProperty")]
pub struct CorrelationProperty {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CorrelationPropertyType",rg*="name","CorrelationPropertyTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "type")]
    #[tia("CorrelationPropertyType",rg*="typ","CorrelationPropertyTypeMut",s)]
    pub typ: Option<String>,
    #[xml(child = "bpmn:correlationPropertyRetrievalExpression")]
    #[tia("CorrelationPropertyType",rg*="correlation_property_retrieval_expressions","CorrelationPropertyTypeMut",s,rmg*="correlation_property_retrieval_expressions_mut")]
    pub correlation_property_retrieval_expressions: Vec<CorrelationPropertyRetrievalExpression>,
}
impl DocumentElement for CorrelationProperty {
    fn element(&self) -> Element {
        Element::CorrelationProperty
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CorrelationProperty {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self
            .correlation_property_retrieval_expressions
            .find_by_id_mut(id)
        {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self
            .correlation_property_retrieval_expressions
            .find_by_id(id)
        {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for CorrelationProperty {}
impl RootElementTypeMut for CorrelationProperty {}
//

/// Access to `correlationProperty`
pub trait CorrelationPropertyType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `type`
    fn typ(&self) -> &Option<String>;
    /// Get value of `correlationPropertyRetrievalExpression` child
    fn correlation_property_retrieval_expressions(
        &self,
    ) -> &Vec<CorrelationPropertyRetrievalExpression>;
}
dyn_clone::clone_trait_object!(CorrelationPropertyType);
impl_downcast!(CorrelationPropertyType);
/// Mutable access to `correlationProperty`
pub trait CorrelationPropertyTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + CorrelationPropertyType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `type`
    fn set_typ(&mut self, value: Option<String>);
    /// Get a mutable value of `correlationPropertyRetrievalExpression` child
    fn correlation_property_retrieval_expressions_mut(
        &mut self,
    ) -> &mut Vec<CorrelationPropertyRetrievalExpression>;
    /// Set value of `correlationPropertyRetrievalExpression` child
    fn set_correlation_property_retrieval_expressions(
        &mut self,
        value: Vec<CorrelationPropertyRetrievalExpression>,
    );
}
dyn_clone::clone_trait_object!(CorrelationPropertyTypeMut);
impl_downcast!(CorrelationPropertyTypeMut);
impl Cast<dyn DefinitionsType> for CorrelationProperty {}
impl Cast<dyn DefinitionsTypeMut> for CorrelationProperty {}
impl Cast<dyn ImportType> for CorrelationProperty {}
impl Cast<dyn ImportTypeMut> for CorrelationProperty {}
impl Cast<dyn ActivityType> for CorrelationProperty {}
impl Cast<dyn ActivityTypeMut> for CorrelationProperty {}
impl Cast<dyn AdHocSubProcessType> for CorrelationProperty {}
impl Cast<dyn AdHocSubProcessTypeMut> for CorrelationProperty {}
impl Cast<dyn ArtifactType> for CorrelationProperty {}
impl Cast<dyn ArtifactTypeMut> for CorrelationProperty {}
impl Cast<dyn AssignmentType> for CorrelationProperty {}
impl Cast<dyn AssignmentTypeMut> for CorrelationProperty {}
impl Cast<dyn AssociationType> for CorrelationProperty {}
impl Cast<dyn AssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn AuditingType> for CorrelationProperty {}
impl Cast<dyn AuditingTypeMut> for CorrelationProperty {}
impl Cast<dyn BaseElementType> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CorrelationProperty {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CorrelationProperty {}
impl Cast<dyn BoundaryEventType> for CorrelationProperty {}
impl Cast<dyn BoundaryEventTypeMut> for CorrelationProperty {}
impl Cast<dyn BusinessRuleTaskType> for CorrelationProperty {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn CallableElementType> for CorrelationProperty {}
impl Cast<dyn CallableElementTypeMut> for CorrelationProperty {}
impl Cast<dyn CallActivityType> for CorrelationProperty {}
impl Cast<dyn CallActivityTypeMut> for CorrelationProperty {}
impl Cast<dyn CallChoreographyType> for CorrelationProperty {}
impl Cast<dyn CallChoreographyTypeMut> for CorrelationProperty {}
impl Cast<dyn CallConversationType> for CorrelationProperty {}
impl Cast<dyn CallConversationTypeMut> for CorrelationProperty {}
impl Cast<dyn CancelEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn CatchEventType> for CorrelationProperty {}
impl Cast<dyn CatchEventTypeMut> for CorrelationProperty {}
impl Cast<dyn CategoryType> for CorrelationProperty {}
impl Cast<dyn CategoryTypeMut> for CorrelationProperty {}
impl Cast<dyn CategoryValueType> for CorrelationProperty {}
impl Cast<dyn CategoryValueTypeMut> for CorrelationProperty {}
impl Cast<dyn ChoreographyType> for CorrelationProperty {}
impl Cast<dyn ChoreographyTypeMut> for CorrelationProperty {}
impl Cast<dyn ChoreographyActivityType> for CorrelationProperty {}
impl Cast<dyn ChoreographyActivityTypeMut> for CorrelationProperty {}
impl Cast<dyn ChoreographyTaskType> for CorrelationProperty {}
impl Cast<dyn ChoreographyTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn CollaborationType> for CorrelationProperty {}
impl Cast<dyn CollaborationTypeMut> for CorrelationProperty {}
impl Cast<dyn CompensateEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CorrelationProperty {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn ComplexGatewayType> for CorrelationProperty {}
impl Cast<dyn ComplexGatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn ConditionalEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn ConversationType> for CorrelationProperty {}
impl Cast<dyn ConversationTypeMut> for CorrelationProperty {}
impl Cast<dyn ConversationAssociationType> for CorrelationProperty {}
impl Cast<dyn ConversationAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn ConversationLinkType> for CorrelationProperty {}
impl Cast<dyn ConversationLinkTypeMut> for CorrelationProperty {}
impl Cast<dyn ConversationNodeType> for CorrelationProperty {}
impl Cast<dyn ConversationNodeTypeMut> for CorrelationProperty {}
impl Cast<dyn CorrelationKeyType> for CorrelationProperty {}
impl Cast<dyn CorrelationKeyTypeMut> for CorrelationProperty {}
impl Cast<dyn CorrelationPropertyType> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for CorrelationProperty {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CorrelationProperty {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CorrelationProperty {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CorrelationProperty {}
impl Cast<dyn CorrelationSubscriptionType> for CorrelationProperty {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CorrelationProperty {}
impl Cast<dyn DataAssociationType> for CorrelationProperty {}
impl Cast<dyn DataAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn DataInputType> for CorrelationProperty {}
impl Cast<dyn DataInputTypeMut> for CorrelationProperty {}
impl Cast<dyn DataInputAssociationType> for CorrelationProperty {}
impl Cast<dyn DataInputAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn DataObjectType> for CorrelationProperty {}
impl Cast<dyn DataObjectTypeMut> for CorrelationProperty {}
impl Cast<dyn DataObjectReferenceType> for CorrelationProperty {}
impl Cast<dyn DataObjectReferenceTypeMut> for CorrelationProperty {}
impl Cast<dyn DataOutputType> for CorrelationProperty {}
impl Cast<dyn DataOutputTypeMut> for CorrelationProperty {}
impl Cast<dyn DataOutputAssociationType> for CorrelationProperty {}
impl Cast<dyn DataOutputAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn DataStateType> for CorrelationProperty {}
impl Cast<dyn DataStateTypeMut> for CorrelationProperty {}
impl Cast<dyn DataStoreType> for CorrelationProperty {}
impl Cast<dyn DataStoreTypeMut> for CorrelationProperty {}
impl Cast<dyn DataStoreReferenceType> for CorrelationProperty {}
impl Cast<dyn DataStoreReferenceTypeMut> for CorrelationProperty {}
impl Cast<dyn DocumentationType> for CorrelationProperty {}
impl Cast<dyn DocumentationTypeMut> for CorrelationProperty {}
impl Cast<dyn EndEventType> for CorrelationProperty {}
impl Cast<dyn EndEventTypeMut> for CorrelationProperty {}
impl Cast<dyn EndPointType> for CorrelationProperty {}
impl Cast<dyn EndPointTypeMut> for CorrelationProperty {}
impl Cast<dyn ErrorType> for CorrelationProperty {}
impl Cast<dyn ErrorTypeMut> for CorrelationProperty {}
impl Cast<dyn ErrorEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn EscalationType> for CorrelationProperty {}
impl Cast<dyn EscalationTypeMut> for CorrelationProperty {}
impl Cast<dyn EscalationEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn EventType> for CorrelationProperty {}
impl Cast<dyn EventTypeMut> for CorrelationProperty {}
impl Cast<dyn EventBasedGatewayType> for CorrelationProperty {}
impl Cast<dyn EventBasedGatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn EventDefinitionType> for CorrelationProperty {}
impl Cast<dyn EventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn ExclusiveGatewayType> for CorrelationProperty {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn ExpressionType> for CorrelationProperty {}
impl Cast<dyn ExpressionTypeMut> for CorrelationProperty {}
impl Cast<dyn ExtensionType> for CorrelationProperty {}
impl Cast<dyn ExtensionTypeMut> for CorrelationProperty {}
impl Cast<dyn ExtensionElementsType> for CorrelationProperty {}
impl Cast<dyn ExtensionElementsTypeMut> for CorrelationProperty {}
impl Cast<dyn FlowElementType> for CorrelationProperty {}
impl Cast<dyn FlowElementTypeMut> for CorrelationProperty {}
impl Cast<dyn FlowNodeType> for CorrelationProperty {}
impl Cast<dyn FlowNodeTypeMut> for CorrelationProperty {}
impl Cast<dyn FormalExpressionType> for CorrelationProperty {}
impl Cast<dyn FormalExpressionTypeMut> for CorrelationProperty {}
impl Cast<dyn GatewayType> for CorrelationProperty {}
impl Cast<dyn GatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalChoreographyTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalConversationType> for CorrelationProperty {}
impl Cast<dyn GlobalConversationTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalManualTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalManualTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalScriptTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GlobalUserTaskType> for CorrelationProperty {}
impl Cast<dyn GlobalUserTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn GroupType> for CorrelationProperty {}
impl Cast<dyn GroupTypeMut> for CorrelationProperty {}
impl Cast<dyn HumanPerformerType> for CorrelationProperty {}
impl Cast<dyn HumanPerformerTypeMut> for CorrelationProperty {}
impl Cast<dyn ImplicitThrowEventType> for CorrelationProperty {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CorrelationProperty {}
impl Cast<dyn InclusiveGatewayType> for CorrelationProperty {}
impl Cast<dyn InclusiveGatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn InputSetType> for CorrelationProperty {}
impl Cast<dyn InputSetTypeMut> for CorrelationProperty {}
impl Cast<dyn InterfaceType> for CorrelationProperty {}
impl Cast<dyn InterfaceTypeMut> for CorrelationProperty {}
impl Cast<dyn IntermediateCatchEventType> for CorrelationProperty {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CorrelationProperty {}
impl Cast<dyn IntermediateThrowEventType> for CorrelationProperty {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CorrelationProperty {}
impl Cast<dyn InputOutputBindingType> for CorrelationProperty {}
impl Cast<dyn InputOutputBindingTypeMut> for CorrelationProperty {}
impl Cast<dyn InputOutputSpecificationType> for CorrelationProperty {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CorrelationProperty {}
impl Cast<dyn ItemDefinitionType> for CorrelationProperty {}
impl Cast<dyn ItemDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn LaneType> for CorrelationProperty {}
impl Cast<dyn LaneTypeMut> for CorrelationProperty {}
impl Cast<dyn LaneSetType> for CorrelationProperty {}
impl Cast<dyn LaneSetTypeMut> for CorrelationProperty {}
impl Cast<dyn LinkEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn LoopCharacteristicsType> for CorrelationProperty {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CorrelationProperty {}
impl Cast<dyn ManualTaskType> for CorrelationProperty {}
impl Cast<dyn ManualTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn MessageType> for CorrelationProperty {}
impl Cast<dyn MessageTypeMut> for CorrelationProperty {}
impl Cast<dyn MessageEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn MessageFlowType> for CorrelationProperty {}
impl Cast<dyn MessageFlowTypeMut> for CorrelationProperty {}
impl Cast<dyn MessageFlowAssociationType> for CorrelationProperty {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn MonitoringType> for CorrelationProperty {}
impl Cast<dyn MonitoringTypeMut> for CorrelationProperty {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CorrelationProperty {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CorrelationProperty {}
impl Cast<dyn OperationType> for CorrelationProperty {}
impl Cast<dyn OperationTypeMut> for CorrelationProperty {}
impl Cast<dyn OutputSetType> for CorrelationProperty {}
impl Cast<dyn OutputSetTypeMut> for CorrelationProperty {}
impl Cast<dyn ParallelGatewayType> for CorrelationProperty {}
impl Cast<dyn ParallelGatewayTypeMut> for CorrelationProperty {}
impl Cast<dyn ParticipantType> for CorrelationProperty {}
impl Cast<dyn ParticipantTypeMut> for CorrelationProperty {}
impl Cast<dyn ParticipantAssociationType> for CorrelationProperty {}
impl Cast<dyn ParticipantAssociationTypeMut> for CorrelationProperty {}
impl Cast<dyn ParticipantMultiplicityType> for CorrelationProperty {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CorrelationProperty {}
impl Cast<dyn PartnerEntityType> for CorrelationProperty {}
impl Cast<dyn PartnerEntityTypeMut> for CorrelationProperty {}
impl Cast<dyn PartnerRoleType> for CorrelationProperty {}
impl Cast<dyn PartnerRoleTypeMut> for CorrelationProperty {}
impl Cast<dyn PerformerType> for CorrelationProperty {}
impl Cast<dyn PerformerTypeMut> for CorrelationProperty {}
impl Cast<dyn PotentialOwnerType> for CorrelationProperty {}
impl Cast<dyn PotentialOwnerTypeMut> for CorrelationProperty {}
impl Cast<dyn ProcessType> for CorrelationProperty {}
impl Cast<dyn ProcessTypeMut> for CorrelationProperty {}
impl Cast<dyn PropertyType> for CorrelationProperty {}
impl Cast<dyn PropertyTypeMut> for CorrelationProperty {}
impl Cast<dyn ReceiveTaskType> for CorrelationProperty {}
impl Cast<dyn ReceiveTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn RelationshipType> for CorrelationProperty {}
impl Cast<dyn RelationshipTypeMut> for CorrelationProperty {}
impl Cast<dyn RenderingType> for CorrelationProperty {}
impl Cast<dyn RenderingTypeMut> for CorrelationProperty {}
impl Cast<dyn ResourceType> for CorrelationProperty {}
impl Cast<dyn ResourceTypeMut> for CorrelationProperty {}
impl Cast<dyn ResourceAssignmentExpressionType> for CorrelationProperty {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CorrelationProperty {}
impl Cast<dyn ResourceParameterType> for CorrelationProperty {}
impl Cast<dyn ResourceParameterTypeMut> for CorrelationProperty {}
impl Cast<dyn ResourceParameterBindingType> for CorrelationProperty {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CorrelationProperty {}
impl Cast<dyn ResourceRoleType> for CorrelationProperty {}
impl Cast<dyn ResourceRoleTypeMut> for CorrelationProperty {}
impl Cast<dyn RootElementType> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for CorrelationProperty {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for CorrelationProperty {}
impl Cast<dyn ScriptTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn ScriptType> for CorrelationProperty {}
impl Cast<dyn ScriptTypeMut> for CorrelationProperty {}
impl Cast<dyn SendTaskType> for CorrelationProperty {}
impl Cast<dyn SendTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn SequenceFlowType> for CorrelationProperty {}
impl Cast<dyn SequenceFlowTypeMut> for CorrelationProperty {}
impl Cast<dyn ServiceTaskType> for CorrelationProperty {}
impl Cast<dyn ServiceTaskTypeMut> for CorrelationProperty {}
impl Cast<dyn SignalType> for CorrelationProperty {}
impl Cast<dyn SignalTypeMut> for CorrelationProperty {}
impl Cast<dyn SignalEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn StandardLoopCharacteristicsType> for CorrelationProperty {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CorrelationProperty {}
impl Cast<dyn StartEventType> for CorrelationProperty {}
impl Cast<dyn StartEventTypeMut> for CorrelationProperty {}
impl Cast<dyn SubChoreographyType> for CorrelationProperty {}
impl Cast<dyn SubChoreographyTypeMut> for CorrelationProperty {}
impl Cast<dyn SubConversationType> for CorrelationProperty {}
impl Cast<dyn SubConversationTypeMut> for CorrelationProperty {}
impl Cast<dyn SubProcessType> for CorrelationProperty {}
impl Cast<dyn SubProcessTypeMut> for CorrelationProperty {}
impl Cast<dyn TaskType> for CorrelationProperty {}
impl Cast<dyn TaskTypeMut> for CorrelationProperty {}
impl Cast<dyn TerminateEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn TextAnnotationType> for CorrelationProperty {}
impl Cast<dyn TextAnnotationTypeMut> for CorrelationProperty {}
impl Cast<dyn TextType> for CorrelationProperty {}
impl Cast<dyn TextTypeMut> for CorrelationProperty {}
impl Cast<dyn ThrowEventType> for CorrelationProperty {}
impl Cast<dyn ThrowEventTypeMut> for CorrelationProperty {}
impl Cast<dyn TimerEventDefinitionType> for CorrelationProperty {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CorrelationProperty {}
impl Cast<dyn TransactionType> for CorrelationProperty {}
impl Cast<dyn TransactionTypeMut> for CorrelationProperty {}
impl Cast<dyn UserTaskType> for CorrelationProperty {}
impl Cast<dyn UserTaskTypeMut> for CorrelationProperty {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:correlationPropertyBinding")]
pub struct CorrelationPropertyBinding {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "correlationPropertyRef")]
    #[tia("CorrelationPropertyBindingType",rg*="correlation_property_ref","CorrelationPropertyBindingTypeMut",s)]
    pub correlation_property_ref: String,
    #[xml(child = "bpmn:dataPath")]
    #[tia("CorrelationPropertyBindingType",rg*="data_path","CorrelationPropertyBindingTypeMut",s,rmg*="data_path_mut")]
    pub data_path: CorrelationPropertyBindingDataPath,
}
impl DocumentElement for CorrelationPropertyBinding {
    fn element(&self) -> Element {
        Element::CorrelationPropertyBinding
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CorrelationPropertyBinding {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_path.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_path.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `correlationPropertyBinding`
pub trait CorrelationPropertyBindingType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `correlationPropertyRef`
    fn correlation_property_ref(&self) -> &String;
    /// Get value of `dataPath` child
    fn data_path(&self) -> &CorrelationPropertyBindingDataPath;
}
dyn_clone::clone_trait_object!(CorrelationPropertyBindingType);
impl_downcast!(CorrelationPropertyBindingType);
/// Mutable access to `correlationPropertyBinding`
pub trait CorrelationPropertyBindingTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + CorrelationPropertyBindingType
{
    /// Set value of attribute `correlationPropertyRef`
    fn set_correlation_property_ref(&mut self, value: String);
    /// Get a mutable value of `dataPath` child
    fn data_path_mut(&mut self) -> &mut CorrelationPropertyBindingDataPath;
    /// Set value of `dataPath` child
    fn set_data_path(&mut self, value: CorrelationPropertyBindingDataPath);
}
dyn_clone::clone_trait_object!(CorrelationPropertyBindingTypeMut);
impl_downcast!(CorrelationPropertyBindingTypeMut);
impl Cast<dyn DefinitionsType> for CorrelationPropertyBinding {}
impl Cast<dyn DefinitionsTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ImportType> for CorrelationPropertyBinding {}
impl Cast<dyn ImportTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ActivityType> for CorrelationPropertyBinding {}
impl Cast<dyn ActivityTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn AdHocSubProcessType> for CorrelationPropertyBinding {}
impl Cast<dyn AdHocSubProcessTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ArtifactType> for CorrelationPropertyBinding {}
impl Cast<dyn ArtifactTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn AssignmentType> for CorrelationPropertyBinding {}
impl Cast<dyn AssignmentTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn AssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn AssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn AuditingType> for CorrelationPropertyBinding {}
impl Cast<dyn AuditingTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn BaseElementType> for CorrelationPropertyBinding {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CorrelationPropertyBinding {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CorrelationPropertyBinding {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn BoundaryEventType> for CorrelationPropertyBinding {}
impl Cast<dyn BoundaryEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn BusinessRuleTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CallableElementType> for CorrelationPropertyBinding {}
impl Cast<dyn CallableElementTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CallActivityType> for CorrelationPropertyBinding {}
impl Cast<dyn CallActivityTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CallChoreographyType> for CorrelationPropertyBinding {}
impl Cast<dyn CallChoreographyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CallConversationType> for CorrelationPropertyBinding {}
impl Cast<dyn CallConversationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CancelEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CatchEventType> for CorrelationPropertyBinding {}
impl Cast<dyn CatchEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CategoryType> for CorrelationPropertyBinding {}
impl Cast<dyn CategoryTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CategoryValueType> for CorrelationPropertyBinding {}
impl Cast<dyn CategoryValueTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyType> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyActivityType> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyActivityTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn ChoreographyTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CollaborationType> for CorrelationPropertyBinding {}
impl Cast<dyn CollaborationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CompensateEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ComplexGatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn ComplexGatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ConditionalEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationType> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationLinkType> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationLinkTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationNodeType> for CorrelationPropertyBinding {}
impl Cast<dyn ConversationNodeTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationKeyType> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationKeyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationPropertyType> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationPropertyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationPropertyBindingType> for CorrelationPropertyBinding {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CorrelationPropertyBinding {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationSubscriptionType> for CorrelationPropertyBinding {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn DataAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataInputType> for CorrelationPropertyBinding {}
impl Cast<dyn DataInputTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataInputAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn DataInputAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataObjectType> for CorrelationPropertyBinding {}
impl Cast<dyn DataObjectTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataObjectReferenceType> for CorrelationPropertyBinding {}
impl Cast<dyn DataObjectReferenceTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataOutputType> for CorrelationPropertyBinding {}
impl Cast<dyn DataOutputTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataOutputAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn DataOutputAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataStateType> for CorrelationPropertyBinding {}
impl Cast<dyn DataStateTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataStoreType> for CorrelationPropertyBinding {}
impl Cast<dyn DataStoreTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DataStoreReferenceType> for CorrelationPropertyBinding {}
impl Cast<dyn DataStoreReferenceTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn DocumentationType> for CorrelationPropertyBinding {}
impl Cast<dyn DocumentationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EndEventType> for CorrelationPropertyBinding {}
impl Cast<dyn EndEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EndPointType> for CorrelationPropertyBinding {}
impl Cast<dyn EndPointTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ErrorType> for CorrelationPropertyBinding {}
impl Cast<dyn ErrorTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ErrorEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EscalationType> for CorrelationPropertyBinding {}
impl Cast<dyn EscalationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EscalationEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EventType> for CorrelationPropertyBinding {}
impl Cast<dyn EventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EventBasedGatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn EventBasedGatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn EventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn EventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ExclusiveGatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ExpressionType> for CorrelationPropertyBinding {}
impl Cast<dyn ExpressionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ExtensionType> for CorrelationPropertyBinding {}
impl Cast<dyn ExtensionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ExtensionElementsType> for CorrelationPropertyBinding {}
impl Cast<dyn ExtensionElementsTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn FlowElementType> for CorrelationPropertyBinding {}
impl Cast<dyn FlowElementTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn FlowNodeType> for CorrelationPropertyBinding {}
impl Cast<dyn FlowNodeTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn FormalExpressionType> for CorrelationPropertyBinding {}
impl Cast<dyn FormalExpressionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn GatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalChoreographyTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalConversationType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalConversationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalManualTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalManualTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalScriptTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalUserTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn GlobalUserTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn GroupType> for CorrelationPropertyBinding {}
impl Cast<dyn GroupTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn HumanPerformerType> for CorrelationPropertyBinding {}
impl Cast<dyn HumanPerformerTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ImplicitThrowEventType> for CorrelationPropertyBinding {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn InclusiveGatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn InclusiveGatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn InputSetType> for CorrelationPropertyBinding {}
impl Cast<dyn InputSetTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn InterfaceType> for CorrelationPropertyBinding {}
impl Cast<dyn InterfaceTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn IntermediateCatchEventType> for CorrelationPropertyBinding {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn IntermediateThrowEventType> for CorrelationPropertyBinding {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn InputOutputBindingType> for CorrelationPropertyBinding {}
impl Cast<dyn InputOutputBindingTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn InputOutputSpecificationType> for CorrelationPropertyBinding {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ItemDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn ItemDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn LaneType> for CorrelationPropertyBinding {}
impl Cast<dyn LaneTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn LaneSetType> for CorrelationPropertyBinding {}
impl Cast<dyn LaneSetTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn LinkEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn LoopCharacteristicsType> for CorrelationPropertyBinding {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ManualTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn ManualTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MessageType> for CorrelationPropertyBinding {}
impl Cast<dyn MessageTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MessageEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MessageFlowType> for CorrelationPropertyBinding {}
impl Cast<dyn MessageFlowTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MessageFlowAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MonitoringType> for CorrelationPropertyBinding {}
impl Cast<dyn MonitoringTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CorrelationPropertyBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn OperationType> for CorrelationPropertyBinding {}
impl Cast<dyn OperationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn OutputSetType> for CorrelationPropertyBinding {}
impl Cast<dyn OutputSetTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ParallelGatewayType> for CorrelationPropertyBinding {}
impl Cast<dyn ParallelGatewayTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantType> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantAssociationType> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantAssociationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantMultiplicityType> for CorrelationPropertyBinding {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn PartnerEntityType> for CorrelationPropertyBinding {}
impl Cast<dyn PartnerEntityTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn PartnerRoleType> for CorrelationPropertyBinding {}
impl Cast<dyn PartnerRoleTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn PerformerType> for CorrelationPropertyBinding {}
impl Cast<dyn PerformerTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn PotentialOwnerType> for CorrelationPropertyBinding {}
impl Cast<dyn PotentialOwnerTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ProcessType> for CorrelationPropertyBinding {}
impl Cast<dyn ProcessTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn PropertyType> for CorrelationPropertyBinding {}
impl Cast<dyn PropertyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ReceiveTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn ReceiveTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn RelationshipType> for CorrelationPropertyBinding {}
impl Cast<dyn RelationshipTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn RenderingType> for CorrelationPropertyBinding {}
impl Cast<dyn RenderingTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceType> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceAssignmentExpressionType> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceParameterType> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceParameterTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceParameterBindingType> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceRoleType> for CorrelationPropertyBinding {}
impl Cast<dyn ResourceRoleTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn RootElementType> for CorrelationPropertyBinding {}
impl Cast<dyn RootElementTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ScriptTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn ScriptTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ScriptType> for CorrelationPropertyBinding {}
impl Cast<dyn ScriptTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SendTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn SendTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SequenceFlowType> for CorrelationPropertyBinding {}
impl Cast<dyn SequenceFlowTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ServiceTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn ServiceTaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SignalType> for CorrelationPropertyBinding {}
impl Cast<dyn SignalTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SignalEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn StandardLoopCharacteristicsType> for CorrelationPropertyBinding {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn StartEventType> for CorrelationPropertyBinding {}
impl Cast<dyn StartEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SubChoreographyType> for CorrelationPropertyBinding {}
impl Cast<dyn SubChoreographyTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SubConversationType> for CorrelationPropertyBinding {}
impl Cast<dyn SubConversationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn SubProcessType> for CorrelationPropertyBinding {}
impl Cast<dyn SubProcessTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TaskType> for CorrelationPropertyBinding {}
impl Cast<dyn TaskTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TerminateEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TextAnnotationType> for CorrelationPropertyBinding {}
impl Cast<dyn TextAnnotationTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TextType> for CorrelationPropertyBinding {}
impl Cast<dyn TextTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn ThrowEventType> for CorrelationPropertyBinding {}
impl Cast<dyn ThrowEventTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TimerEventDefinitionType> for CorrelationPropertyBinding {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn TransactionType> for CorrelationPropertyBinding {}
impl Cast<dyn TransactionTypeMut> for CorrelationPropertyBinding {}
impl Cast<dyn UserTaskType> for CorrelationPropertyBinding {}
impl Cast<dyn UserTaskTypeMut> for CorrelationPropertyBinding {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:correlationPropertyRetrievalExpression")]
pub struct CorrelationPropertyRetrievalExpression {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "messageRef")]
    #[tia("CorrelationPropertyRetrievalExpressionType",rg*="message_ref","CorrelationPropertyRetrievalExpressionTypeMut",s)]
    pub message_ref: String,
    #[xml(child = "bpmn:messagePath")]
    #[tia("CorrelationPropertyRetrievalExpressionType",rg*="message_path","CorrelationPropertyRetrievalExpressionTypeMut",s,rmg*="message_path_mut")]
    pub message_path: CorrelationPropertyRetrievalExpressionMessagePath,
}
impl DocumentElement for CorrelationPropertyRetrievalExpression {
    fn element(&self) -> Element {
        Element::CorrelationPropertyRetrievalExpression
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CorrelationPropertyRetrievalExpression {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.message_path.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.message_path.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `correlationPropertyRetrievalExpression`
pub trait CorrelationPropertyRetrievalExpressionType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `messageRef`
    fn message_ref(&self) -> &String;
    /// Get value of `messagePath` child
    fn message_path(&self) -> &CorrelationPropertyRetrievalExpressionMessagePath;
}
dyn_clone::clone_trait_object!(CorrelationPropertyRetrievalExpressionType);
impl_downcast!(CorrelationPropertyRetrievalExpressionType);
/// Mutable access to `correlationPropertyRetrievalExpression`
pub trait CorrelationPropertyRetrievalExpressionTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + CorrelationPropertyRetrievalExpressionType
{
    /// Set value of attribute `messageRef`
    fn set_message_ref(&mut self, value: String);
    /// Get a mutable value of `messagePath` child
    fn message_path_mut(&mut self) -> &mut CorrelationPropertyRetrievalExpressionMessagePath;
    /// Set value of `messagePath` child
    fn set_message_path(&mut self, value: CorrelationPropertyRetrievalExpressionMessagePath);
}
dyn_clone::clone_trait_object!(CorrelationPropertyRetrievalExpressionTypeMut);
impl_downcast!(CorrelationPropertyRetrievalExpressionTypeMut);
impl Cast<dyn DefinitionsType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DefinitionsTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ImportType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ImportTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ActivityType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ActivityTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AdHocSubProcessType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AdHocSubProcessTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ArtifactType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ArtifactTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AssignmentType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AssignmentTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AuditingType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn AuditingTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BaseElementType> for CorrelationPropertyRetrievalExpression {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CorrelationPropertyRetrievalExpression {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BoundaryEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BoundaryEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BusinessRuleTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallableElementType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallableElementTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallActivityType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallActivityTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallChoreographyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallChoreographyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallConversationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CallConversationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CancelEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CatchEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CatchEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CategoryType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CategoryTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CategoryValueType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CategoryValueTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyActivityType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyActivityTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ChoreographyTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CollaborationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CollaborationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CompensateEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ComplexGatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ComplexGatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConditionalEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationLinkType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationLinkTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationNodeType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ConversationNodeTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationKeyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationKeyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationPropertyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationPropertyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationPropertyBindingType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType>
    for CorrelationPropertyRetrievalExpression
{
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        Some(self)
    }

    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut>
    for CorrelationPropertyRetrievalExpression
{
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationSubscriptionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataInputType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataInputTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataInputAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataInputAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataObjectType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataObjectTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataObjectReferenceType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataObjectReferenceTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataOutputType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataOutputTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataOutputAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataOutputAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStateType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStateTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStoreType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStoreTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStoreReferenceType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DataStoreReferenceTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DocumentationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn DocumentationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EndEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EndEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EndPointType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EndPointTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ErrorType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ErrorTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ErrorEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EscalationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EscalationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EscalationEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventBasedGatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventBasedGatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn EventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExclusiveGatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExpressionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExpressionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExtensionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExtensionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExtensionElementsType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ExtensionElementsTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FlowElementType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FlowElementTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FlowNodeType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FlowNodeTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FormalExpressionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn FormalExpressionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalChoreographyTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalConversationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalConversationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalManualTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalManualTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalScriptTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalUserTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GlobalUserTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GroupType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn GroupTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn HumanPerformerType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn HumanPerformerTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ImplicitThrowEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InclusiveGatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InclusiveGatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputSetType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputSetTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InterfaceType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InterfaceTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn IntermediateCatchEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn IntermediateThrowEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputOutputBindingType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputOutputBindingTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputOutputSpecificationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ItemDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ItemDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LaneType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LaneTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LaneSetType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LaneSetTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LinkEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LoopCharacteristicsType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ManualTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ManualTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageFlowType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageFlowTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageFlowAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MonitoringType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MonitoringTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn OperationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn OperationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn OutputSetType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn OutputSetTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParallelGatewayType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParallelGatewayTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantAssociationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantAssociationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantMultiplicityType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PartnerEntityType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PartnerEntityTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PartnerRoleType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PartnerRoleTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PerformerType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PerformerTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PotentialOwnerType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PotentialOwnerTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ProcessType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ProcessTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PropertyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn PropertyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ReceiveTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ReceiveTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RelationshipType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RelationshipTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RenderingType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RenderingTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceAssignmentExpressionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceParameterType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceParameterTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceParameterBindingType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceRoleType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ResourceRoleTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RootElementType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn RootElementTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ScriptTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ScriptTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ScriptType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ScriptTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SendTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SendTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SequenceFlowType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SequenceFlowTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ServiceTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ServiceTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SignalType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SignalTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SignalEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn StandardLoopCharacteristicsType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn StartEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn StartEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubChoreographyType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubChoreographyTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubConversationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubConversationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubProcessType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn SubProcessTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TaskTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TerminateEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TextAnnotationType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TextAnnotationTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TextType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TextTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ThrowEventType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn ThrowEventTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TimerEventDefinitionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TransactionType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn TransactionTypeMut> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn UserTaskType> for CorrelationPropertyRetrievalExpression {}
impl Cast<dyn UserTaskTypeMut> for CorrelationPropertyRetrievalExpression {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:correlationSubscription")]
pub struct CorrelationSubscription {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "correlationKeyRef")]
    #[tia("CorrelationSubscriptionType",rg*="correlation_key_ref","CorrelationSubscriptionTypeMut",s)]
    pub correlation_key_ref: String,
    #[xml(child = "bpmn:correlationPropertyBinding")]
    #[tia("CorrelationSubscriptionType",rg*="correlation_property_bindings","CorrelationSubscriptionTypeMut",s,rmg*="correlation_property_bindings_mut")]
    pub correlation_property_bindings: Vec<CorrelationPropertyBinding>,
}
impl DocumentElement for CorrelationSubscription {
    fn element(&self) -> Element {
        Element::CorrelationSubscription
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for CorrelationSubscription {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.correlation_property_bindings.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.correlation_property_bindings.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `correlationSubscription`
pub trait CorrelationSubscriptionType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `correlationKeyRef`
    fn correlation_key_ref(&self) -> &String;
    /// Get value of `correlationPropertyBinding` child
    fn correlation_property_bindings(&self) -> &Vec<CorrelationPropertyBinding>;
}
dyn_clone::clone_trait_object!(CorrelationSubscriptionType);
impl_downcast!(CorrelationSubscriptionType);
/// Mutable access to `correlationSubscription`
pub trait CorrelationSubscriptionTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + CorrelationSubscriptionType
{
    /// Set value of attribute `correlationKeyRef`
    fn set_correlation_key_ref(&mut self, value: String);
    /// Get a mutable value of `correlationPropertyBinding` child
    fn correlation_property_bindings_mut(&mut self) -> &mut Vec<CorrelationPropertyBinding>;
    /// Set value of `correlationPropertyBinding` child
    fn set_correlation_property_bindings(&mut self, value: Vec<CorrelationPropertyBinding>);
}
dyn_clone::clone_trait_object!(CorrelationSubscriptionTypeMut);
impl_downcast!(CorrelationSubscriptionTypeMut);
impl Cast<dyn DefinitionsType> for CorrelationSubscription {}
impl Cast<dyn DefinitionsTypeMut> for CorrelationSubscription {}
impl Cast<dyn ImportType> for CorrelationSubscription {}
impl Cast<dyn ImportTypeMut> for CorrelationSubscription {}
impl Cast<dyn ActivityType> for CorrelationSubscription {}
impl Cast<dyn ActivityTypeMut> for CorrelationSubscription {}
impl Cast<dyn AdHocSubProcessType> for CorrelationSubscription {}
impl Cast<dyn AdHocSubProcessTypeMut> for CorrelationSubscription {}
impl Cast<dyn ArtifactType> for CorrelationSubscription {}
impl Cast<dyn ArtifactTypeMut> for CorrelationSubscription {}
impl Cast<dyn AssignmentType> for CorrelationSubscription {}
impl Cast<dyn AssignmentTypeMut> for CorrelationSubscription {}
impl Cast<dyn AssociationType> for CorrelationSubscription {}
impl Cast<dyn AssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn AuditingType> for CorrelationSubscription {}
impl Cast<dyn AuditingTypeMut> for CorrelationSubscription {}
impl Cast<dyn BaseElementType> for CorrelationSubscription {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for CorrelationSubscription {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for CorrelationSubscription {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for CorrelationSubscription {}
impl Cast<dyn BoundaryEventType> for CorrelationSubscription {}
impl Cast<dyn BoundaryEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn BusinessRuleTaskType> for CorrelationSubscription {}
impl Cast<dyn BusinessRuleTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn CallableElementType> for CorrelationSubscription {}
impl Cast<dyn CallableElementTypeMut> for CorrelationSubscription {}
impl Cast<dyn CallActivityType> for CorrelationSubscription {}
impl Cast<dyn CallActivityTypeMut> for CorrelationSubscription {}
impl Cast<dyn CallChoreographyType> for CorrelationSubscription {}
impl Cast<dyn CallChoreographyTypeMut> for CorrelationSubscription {}
impl Cast<dyn CallConversationType> for CorrelationSubscription {}
impl Cast<dyn CallConversationTypeMut> for CorrelationSubscription {}
impl Cast<dyn CancelEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn CancelEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn CatchEventType> for CorrelationSubscription {}
impl Cast<dyn CatchEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn CategoryType> for CorrelationSubscription {}
impl Cast<dyn CategoryTypeMut> for CorrelationSubscription {}
impl Cast<dyn CategoryValueType> for CorrelationSubscription {}
impl Cast<dyn CategoryValueTypeMut> for CorrelationSubscription {}
impl Cast<dyn ChoreographyType> for CorrelationSubscription {}
impl Cast<dyn ChoreographyTypeMut> for CorrelationSubscription {}
impl Cast<dyn ChoreographyActivityType> for CorrelationSubscription {}
impl Cast<dyn ChoreographyActivityTypeMut> for CorrelationSubscription {}
impl Cast<dyn ChoreographyTaskType> for CorrelationSubscription {}
impl Cast<dyn ChoreographyTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn CollaborationType> for CorrelationSubscription {}
impl Cast<dyn CollaborationTypeMut> for CorrelationSubscription {}
impl Cast<dyn CompensateEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ComplexBehaviorDefinitionType> for CorrelationSubscription {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ComplexGatewayType> for CorrelationSubscription {}
impl Cast<dyn ComplexGatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn ConditionalEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ConversationType> for CorrelationSubscription {}
impl Cast<dyn ConversationTypeMut> for CorrelationSubscription {}
impl Cast<dyn ConversationAssociationType> for CorrelationSubscription {}
impl Cast<dyn ConversationAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn ConversationLinkType> for CorrelationSubscription {}
impl Cast<dyn ConversationLinkTypeMut> for CorrelationSubscription {}
impl Cast<dyn ConversationNodeType> for CorrelationSubscription {}
impl Cast<dyn ConversationNodeTypeMut> for CorrelationSubscription {}
impl Cast<dyn CorrelationKeyType> for CorrelationSubscription {}
impl Cast<dyn CorrelationKeyTypeMut> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyType> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyTypeMut> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyBindingType> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for CorrelationSubscription {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for CorrelationSubscription {}
impl Cast<dyn CorrelationSubscriptionType> for CorrelationSubscription {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for CorrelationSubscription {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataAssociationType> for CorrelationSubscription {}
impl Cast<dyn DataAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataInputType> for CorrelationSubscription {}
impl Cast<dyn DataInputTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataInputAssociationType> for CorrelationSubscription {}
impl Cast<dyn DataInputAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataObjectType> for CorrelationSubscription {}
impl Cast<dyn DataObjectTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataObjectReferenceType> for CorrelationSubscription {}
impl Cast<dyn DataObjectReferenceTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataOutputType> for CorrelationSubscription {}
impl Cast<dyn DataOutputTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataOutputAssociationType> for CorrelationSubscription {}
impl Cast<dyn DataOutputAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataStateType> for CorrelationSubscription {}
impl Cast<dyn DataStateTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataStoreType> for CorrelationSubscription {}
impl Cast<dyn DataStoreTypeMut> for CorrelationSubscription {}
impl Cast<dyn DataStoreReferenceType> for CorrelationSubscription {}
impl Cast<dyn DataStoreReferenceTypeMut> for CorrelationSubscription {}
impl Cast<dyn DocumentationType> for CorrelationSubscription {}
impl Cast<dyn DocumentationTypeMut> for CorrelationSubscription {}
impl Cast<dyn EndEventType> for CorrelationSubscription {}
impl Cast<dyn EndEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn EndPointType> for CorrelationSubscription {}
impl Cast<dyn EndPointTypeMut> for CorrelationSubscription {}
impl Cast<dyn ErrorType> for CorrelationSubscription {}
impl Cast<dyn ErrorTypeMut> for CorrelationSubscription {}
impl Cast<dyn ErrorEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn EscalationType> for CorrelationSubscription {}
impl Cast<dyn EscalationTypeMut> for CorrelationSubscription {}
impl Cast<dyn EscalationEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn EventType> for CorrelationSubscription {}
impl Cast<dyn EventTypeMut> for CorrelationSubscription {}
impl Cast<dyn EventBasedGatewayType> for CorrelationSubscription {}
impl Cast<dyn EventBasedGatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn EventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn EventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ExclusiveGatewayType> for CorrelationSubscription {}
impl Cast<dyn ExclusiveGatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn ExpressionType> for CorrelationSubscription {}
impl Cast<dyn ExpressionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ExtensionType> for CorrelationSubscription {}
impl Cast<dyn ExtensionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ExtensionElementsType> for CorrelationSubscription {}
impl Cast<dyn ExtensionElementsTypeMut> for CorrelationSubscription {}
impl Cast<dyn FlowElementType> for CorrelationSubscription {}
impl Cast<dyn FlowElementTypeMut> for CorrelationSubscription {}
impl Cast<dyn FlowNodeType> for CorrelationSubscription {}
impl Cast<dyn FlowNodeTypeMut> for CorrelationSubscription {}
impl Cast<dyn FormalExpressionType> for CorrelationSubscription {}
impl Cast<dyn FormalExpressionTypeMut> for CorrelationSubscription {}
impl Cast<dyn GatewayType> for CorrelationSubscription {}
impl Cast<dyn GatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalBusinessRuleTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalChoreographyTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalConversationType> for CorrelationSubscription {}
impl Cast<dyn GlobalConversationTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalManualTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalManualTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalScriptTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalScriptTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GlobalUserTaskType> for CorrelationSubscription {}
impl Cast<dyn GlobalUserTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn GroupType> for CorrelationSubscription {}
impl Cast<dyn GroupTypeMut> for CorrelationSubscription {}
impl Cast<dyn HumanPerformerType> for CorrelationSubscription {}
impl Cast<dyn HumanPerformerTypeMut> for CorrelationSubscription {}
impl Cast<dyn ImplicitThrowEventType> for CorrelationSubscription {}
impl Cast<dyn ImplicitThrowEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn InclusiveGatewayType> for CorrelationSubscription {}
impl Cast<dyn InclusiveGatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn InputSetType> for CorrelationSubscription {}
impl Cast<dyn InputSetTypeMut> for CorrelationSubscription {}
impl Cast<dyn InterfaceType> for CorrelationSubscription {}
impl Cast<dyn InterfaceTypeMut> for CorrelationSubscription {}
impl Cast<dyn IntermediateCatchEventType> for CorrelationSubscription {}
impl Cast<dyn IntermediateCatchEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn IntermediateThrowEventType> for CorrelationSubscription {}
impl Cast<dyn IntermediateThrowEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn InputOutputBindingType> for CorrelationSubscription {}
impl Cast<dyn InputOutputBindingTypeMut> for CorrelationSubscription {}
impl Cast<dyn InputOutputSpecificationType> for CorrelationSubscription {}
impl Cast<dyn InputOutputSpecificationTypeMut> for CorrelationSubscription {}
impl Cast<dyn ItemDefinitionType> for CorrelationSubscription {}
impl Cast<dyn ItemDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn LaneType> for CorrelationSubscription {}
impl Cast<dyn LaneTypeMut> for CorrelationSubscription {}
impl Cast<dyn LaneSetType> for CorrelationSubscription {}
impl Cast<dyn LaneSetTypeMut> for CorrelationSubscription {}
impl Cast<dyn LinkEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn LinkEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn LoopCharacteristicsType> for CorrelationSubscription {}
impl Cast<dyn LoopCharacteristicsTypeMut> for CorrelationSubscription {}
impl Cast<dyn ManualTaskType> for CorrelationSubscription {}
impl Cast<dyn ManualTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn MessageType> for CorrelationSubscription {}
impl Cast<dyn MessageTypeMut> for CorrelationSubscription {}
impl Cast<dyn MessageEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn MessageEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn MessageFlowType> for CorrelationSubscription {}
impl Cast<dyn MessageFlowTypeMut> for CorrelationSubscription {}
impl Cast<dyn MessageFlowAssociationType> for CorrelationSubscription {}
impl Cast<dyn MessageFlowAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn MonitoringType> for CorrelationSubscription {}
impl Cast<dyn MonitoringTypeMut> for CorrelationSubscription {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for CorrelationSubscription {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for CorrelationSubscription {}
impl Cast<dyn OperationType> for CorrelationSubscription {}
impl Cast<dyn OperationTypeMut> for CorrelationSubscription {}
impl Cast<dyn OutputSetType> for CorrelationSubscription {}
impl Cast<dyn OutputSetTypeMut> for CorrelationSubscription {}
impl Cast<dyn ParallelGatewayType> for CorrelationSubscription {}
impl Cast<dyn ParallelGatewayTypeMut> for CorrelationSubscription {}
impl Cast<dyn ParticipantType> for CorrelationSubscription {}
impl Cast<dyn ParticipantTypeMut> for CorrelationSubscription {}
impl Cast<dyn ParticipantAssociationType> for CorrelationSubscription {}
impl Cast<dyn ParticipantAssociationTypeMut> for CorrelationSubscription {}
impl Cast<dyn ParticipantMultiplicityType> for CorrelationSubscription {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for CorrelationSubscription {}
impl Cast<dyn PartnerEntityType> for CorrelationSubscription {}
impl Cast<dyn PartnerEntityTypeMut> for CorrelationSubscription {}
impl Cast<dyn PartnerRoleType> for CorrelationSubscription {}
impl Cast<dyn PartnerRoleTypeMut> for CorrelationSubscription {}
impl Cast<dyn PerformerType> for CorrelationSubscription {}
impl Cast<dyn PerformerTypeMut> for CorrelationSubscription {}
impl Cast<dyn PotentialOwnerType> for CorrelationSubscription {}
impl Cast<dyn PotentialOwnerTypeMut> for CorrelationSubscription {}
impl Cast<dyn ProcessType> for CorrelationSubscription {}
impl Cast<dyn ProcessTypeMut> for CorrelationSubscription {}
impl Cast<dyn PropertyType> for CorrelationSubscription {}
impl Cast<dyn PropertyTypeMut> for CorrelationSubscription {}
impl Cast<dyn ReceiveTaskType> for CorrelationSubscription {}
impl Cast<dyn ReceiveTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn RelationshipType> for CorrelationSubscription {}
impl Cast<dyn RelationshipTypeMut> for CorrelationSubscription {}
impl Cast<dyn RenderingType> for CorrelationSubscription {}
impl Cast<dyn RenderingTypeMut> for CorrelationSubscription {}
impl Cast<dyn ResourceType> for CorrelationSubscription {}
impl Cast<dyn ResourceTypeMut> for CorrelationSubscription {}
impl Cast<dyn ResourceAssignmentExpressionType> for CorrelationSubscription {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for CorrelationSubscription {}
impl Cast<dyn ResourceParameterType> for CorrelationSubscription {}
impl Cast<dyn ResourceParameterTypeMut> for CorrelationSubscription {}
impl Cast<dyn ResourceParameterBindingType> for CorrelationSubscription {}
impl Cast<dyn ResourceParameterBindingTypeMut> for CorrelationSubscription {}
impl Cast<dyn ResourceRoleType> for CorrelationSubscription {}
impl Cast<dyn ResourceRoleTypeMut> for CorrelationSubscription {}
impl Cast<dyn RootElementType> for CorrelationSubscription {}
impl Cast<dyn RootElementTypeMut> for CorrelationSubscription {}
impl Cast<dyn ScriptTaskType> for CorrelationSubscription {}
impl Cast<dyn ScriptTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn ScriptType> for CorrelationSubscription {}
impl Cast<dyn ScriptTypeMut> for CorrelationSubscription {}
impl Cast<dyn SendTaskType> for CorrelationSubscription {}
impl Cast<dyn SendTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn SequenceFlowType> for CorrelationSubscription {}
impl Cast<dyn SequenceFlowTypeMut> for CorrelationSubscription {}
impl Cast<dyn ServiceTaskType> for CorrelationSubscription {}
impl Cast<dyn ServiceTaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn SignalType> for CorrelationSubscription {}
impl Cast<dyn SignalTypeMut> for CorrelationSubscription {}
impl Cast<dyn SignalEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn SignalEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn StandardLoopCharacteristicsType> for CorrelationSubscription {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for CorrelationSubscription {}
impl Cast<dyn StartEventType> for CorrelationSubscription {}
impl Cast<dyn StartEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn SubChoreographyType> for CorrelationSubscription {}
impl Cast<dyn SubChoreographyTypeMut> for CorrelationSubscription {}
impl Cast<dyn SubConversationType> for CorrelationSubscription {}
impl Cast<dyn SubConversationTypeMut> for CorrelationSubscription {}
impl Cast<dyn SubProcessType> for CorrelationSubscription {}
impl Cast<dyn SubProcessTypeMut> for CorrelationSubscription {}
impl Cast<dyn TaskType> for CorrelationSubscription {}
impl Cast<dyn TaskTypeMut> for CorrelationSubscription {}
impl Cast<dyn TerminateEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn TextAnnotationType> for CorrelationSubscription {}
impl Cast<dyn TextAnnotationTypeMut> for CorrelationSubscription {}
impl Cast<dyn TextType> for CorrelationSubscription {}
impl Cast<dyn TextTypeMut> for CorrelationSubscription {}
impl Cast<dyn ThrowEventType> for CorrelationSubscription {}
impl Cast<dyn ThrowEventTypeMut> for CorrelationSubscription {}
impl Cast<dyn TimerEventDefinitionType> for CorrelationSubscription {}
impl Cast<dyn TimerEventDefinitionTypeMut> for CorrelationSubscription {}
impl Cast<dyn TransactionType> for CorrelationSubscription {}
impl Cast<dyn TransactionTypeMut> for CorrelationSubscription {}
impl Cast<dyn UserTaskType> for CorrelationSubscription {}
impl Cast<dyn UserTaskTypeMut> for CorrelationSubscription {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataAssociation")]
pub struct DataAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(flatten_text = "bpmn:sourceRef")]
    #[tia("DataAssociationType",rg*="source_refs","DataAssociationTypeMut",s,rmg*="source_refs_mut")]
    pub source_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:targetRef")]
    #[tia("DataAssociationType",rg*="target_ref","DataAssociationTypeMut",s,rmg*="target_ref_mut")]
    pub target_ref: String,
    #[xml(child = "bpmn:transformation")]
    #[tia("DataAssociationType",rg*="transformation","DataAssociationTypeMut",s,rmg*="transformation_mut")]
    pub transformation: Option<DataAssociationTransformation>,
    #[xml(child = "bpmn:assignment")]
    #[tia("DataAssociationType",rg*="assignments","DataAssociationTypeMut",s,rmg*="assignments_mut")]
    pub assignments: Vec<Assignment>,
}
impl DocumentElement for DataAssociation {
    fn element(&self) -> Element {
        Element::DataAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.transformation.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.assignments.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.transformation.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.assignments.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataAssociation`
pub trait DataAssociationType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of `sourceRef` child
    fn source_refs(&self) -> &Vec<String>;
    /// Get value of `targetRef` child
    fn target_ref(&self) -> &String;
    /// Get value of `transformation` child
    fn transformation(&self) -> &Option<DataAssociationTransformation>;
    /// Get value of `assignment` child
    fn assignments(&self) -> &Vec<Assignment>;
}
dyn_clone::clone_trait_object!(DataAssociationType);
impl_downcast!(DataAssociationType);
/// Mutable access to `dataAssociation`
pub trait DataAssociationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + DataAssociationType
{
    /// Get a mutable value of `sourceRef` child
    fn source_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `sourceRef` child
    fn set_source_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `targetRef` child
    fn target_ref_mut(&mut self) -> &mut String;
    /// Set value of `targetRef` child
    fn set_target_ref(&mut self, value: String);
    /// Get a mutable value of `transformation` child
    fn transformation_mut(&mut self) -> &mut Option<DataAssociationTransformation>;
    /// Set value of `transformation` child
    fn set_transformation(&mut self, value: Option<DataAssociationTransformation>);
    /// Get a mutable value of `assignment` child
    fn assignments_mut(&mut self) -> &mut Vec<Assignment>;
    /// Set value of `assignment` child
    fn set_assignments(&mut self, value: Vec<Assignment>);
}
dyn_clone::clone_trait_object!(DataAssociationTypeMut);
impl_downcast!(DataAssociationTypeMut);
impl Cast<dyn DefinitionsType> for DataAssociation {}
impl Cast<dyn DefinitionsTypeMut> for DataAssociation {}
impl Cast<dyn ImportType> for DataAssociation {}
impl Cast<dyn ImportTypeMut> for DataAssociation {}
impl Cast<dyn ActivityType> for DataAssociation {}
impl Cast<dyn ActivityTypeMut> for DataAssociation {}
impl Cast<dyn AdHocSubProcessType> for DataAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataAssociation {}
impl Cast<dyn ArtifactType> for DataAssociation {}
impl Cast<dyn ArtifactTypeMut> for DataAssociation {}
impl Cast<dyn AssignmentType> for DataAssociation {}
impl Cast<dyn AssignmentTypeMut> for DataAssociation {}
impl Cast<dyn AssociationType> for DataAssociation {}
impl Cast<dyn AssociationTypeMut> for DataAssociation {}
impl Cast<dyn AuditingType> for DataAssociation {}
impl Cast<dyn AuditingTypeMut> for DataAssociation {}
impl Cast<dyn BaseElementType> for DataAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataAssociation {}
impl Cast<dyn BoundaryEventType> for DataAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for DataAssociation {}
impl Cast<dyn BusinessRuleTaskType> for DataAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataAssociation {}
impl Cast<dyn CallableElementType> for DataAssociation {}
impl Cast<dyn CallableElementTypeMut> for DataAssociation {}
impl Cast<dyn CallActivityType> for DataAssociation {}
impl Cast<dyn CallActivityTypeMut> for DataAssociation {}
impl Cast<dyn CallChoreographyType> for DataAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for DataAssociation {}
impl Cast<dyn CallConversationType> for DataAssociation {}
impl Cast<dyn CallConversationTypeMut> for DataAssociation {}
impl Cast<dyn CancelEventDefinitionType> for DataAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn CatchEventType> for DataAssociation {}
impl Cast<dyn CatchEventTypeMut> for DataAssociation {}
impl Cast<dyn CategoryType> for DataAssociation {}
impl Cast<dyn CategoryTypeMut> for DataAssociation {}
impl Cast<dyn CategoryValueType> for DataAssociation {}
impl Cast<dyn CategoryValueTypeMut> for DataAssociation {}
impl Cast<dyn ChoreographyType> for DataAssociation {}
impl Cast<dyn ChoreographyTypeMut> for DataAssociation {}
impl Cast<dyn ChoreographyActivityType> for DataAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataAssociation {}
impl Cast<dyn ChoreographyTaskType> for DataAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataAssociation {}
impl Cast<dyn CollaborationType> for DataAssociation {}
impl Cast<dyn CollaborationTypeMut> for DataAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for DataAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn ComplexGatewayType> for DataAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for DataAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for DataAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn ConversationType> for DataAssociation {}
impl Cast<dyn ConversationTypeMut> for DataAssociation {}
impl Cast<dyn ConversationAssociationType> for DataAssociation {}
impl Cast<dyn ConversationAssociationTypeMut> for DataAssociation {}
impl Cast<dyn ConversationLinkType> for DataAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for DataAssociation {}
impl Cast<dyn ConversationNodeType> for DataAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for DataAssociation {}
impl Cast<dyn CorrelationKeyType> for DataAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for DataAssociation {}
impl Cast<dyn CorrelationPropertyType> for DataAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for DataAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for DataAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataAssociation {}
impl Cast<dyn DataAssociationType> for DataAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataAssociationTypeMut> for DataAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputType> for DataAssociation {}
impl Cast<dyn DataInputTypeMut> for DataAssociation {}
impl Cast<dyn DataInputAssociationType> for DataAssociation {}
impl Cast<dyn DataInputAssociationTypeMut> for DataAssociation {}
impl Cast<dyn DataObjectType> for DataAssociation {}
impl Cast<dyn DataObjectTypeMut> for DataAssociation {}
impl Cast<dyn DataObjectReferenceType> for DataAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataAssociation {}
impl Cast<dyn DataOutputType> for DataAssociation {}
impl Cast<dyn DataOutputTypeMut> for DataAssociation {}
impl Cast<dyn DataOutputAssociationType> for DataAssociation {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataAssociation {}
impl Cast<dyn DataStateType> for DataAssociation {}
impl Cast<dyn DataStateTypeMut> for DataAssociation {}
impl Cast<dyn DataStoreType> for DataAssociation {}
impl Cast<dyn DataStoreTypeMut> for DataAssociation {}
impl Cast<dyn DataStoreReferenceType> for DataAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataAssociation {}
impl Cast<dyn DocumentationType> for DataAssociation {}
impl Cast<dyn DocumentationTypeMut> for DataAssociation {}
impl Cast<dyn EndEventType> for DataAssociation {}
impl Cast<dyn EndEventTypeMut> for DataAssociation {}
impl Cast<dyn EndPointType> for DataAssociation {}
impl Cast<dyn EndPointTypeMut> for DataAssociation {}
impl Cast<dyn ErrorType> for DataAssociation {}
impl Cast<dyn ErrorTypeMut> for DataAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for DataAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn EscalationType> for DataAssociation {}
impl Cast<dyn EscalationTypeMut> for DataAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for DataAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn EventType> for DataAssociation {}
impl Cast<dyn EventTypeMut> for DataAssociation {}
impl Cast<dyn EventBasedGatewayType> for DataAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataAssociation {}
impl Cast<dyn EventDefinitionType> for DataAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn ExclusiveGatewayType> for DataAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataAssociation {}
impl Cast<dyn ExpressionType> for DataAssociation {}
impl Cast<dyn ExpressionTypeMut> for DataAssociation {}
impl Cast<dyn ExtensionType> for DataAssociation {}
impl Cast<dyn ExtensionTypeMut> for DataAssociation {}
impl Cast<dyn ExtensionElementsType> for DataAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for DataAssociation {}
impl Cast<dyn FlowElementType> for DataAssociation {}
impl Cast<dyn FlowElementTypeMut> for DataAssociation {}
impl Cast<dyn FlowNodeType> for DataAssociation {}
impl Cast<dyn FlowNodeTypeMut> for DataAssociation {}
impl Cast<dyn FormalExpressionType> for DataAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for DataAssociation {}
impl Cast<dyn GatewayType> for DataAssociation {}
impl Cast<dyn GatewayTypeMut> for DataAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for DataAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataAssociation {}
impl Cast<dyn GlobalConversationType> for DataAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for DataAssociation {}
impl Cast<dyn GlobalManualTaskType> for DataAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataAssociation {}
impl Cast<dyn GlobalScriptTaskType> for DataAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataAssociation {}
impl Cast<dyn GlobalTaskType> for DataAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for DataAssociation {}
impl Cast<dyn GlobalUserTaskType> for DataAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataAssociation {}
impl Cast<dyn GroupType> for DataAssociation {}
impl Cast<dyn GroupTypeMut> for DataAssociation {}
impl Cast<dyn HumanPerformerType> for DataAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for DataAssociation {}
impl Cast<dyn ImplicitThrowEventType> for DataAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataAssociation {}
impl Cast<dyn InclusiveGatewayType> for DataAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataAssociation {}
impl Cast<dyn InputSetType> for DataAssociation {}
impl Cast<dyn InputSetTypeMut> for DataAssociation {}
impl Cast<dyn InterfaceType> for DataAssociation {}
impl Cast<dyn InterfaceTypeMut> for DataAssociation {}
impl Cast<dyn IntermediateCatchEventType> for DataAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataAssociation {}
impl Cast<dyn IntermediateThrowEventType> for DataAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataAssociation {}
impl Cast<dyn InputOutputBindingType> for DataAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for DataAssociation {}
impl Cast<dyn InputOutputSpecificationType> for DataAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataAssociation {}
impl Cast<dyn ItemDefinitionType> for DataAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn LaneType> for DataAssociation {}
impl Cast<dyn LaneTypeMut> for DataAssociation {}
impl Cast<dyn LaneSetType> for DataAssociation {}
impl Cast<dyn LaneSetTypeMut> for DataAssociation {}
impl Cast<dyn LinkEventDefinitionType> for DataAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn LoopCharacteristicsType> for DataAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataAssociation {}
impl Cast<dyn ManualTaskType> for DataAssociation {}
impl Cast<dyn ManualTaskTypeMut> for DataAssociation {}
impl Cast<dyn MessageType> for DataAssociation {}
impl Cast<dyn MessageTypeMut> for DataAssociation {}
impl Cast<dyn MessageEventDefinitionType> for DataAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn MessageFlowType> for DataAssociation {}
impl Cast<dyn MessageFlowTypeMut> for DataAssociation {}
impl Cast<dyn MessageFlowAssociationType> for DataAssociation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataAssociation {}
impl Cast<dyn MonitoringType> for DataAssociation {}
impl Cast<dyn MonitoringTypeMut> for DataAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataAssociation {}
impl Cast<dyn OperationType> for DataAssociation {}
impl Cast<dyn OperationTypeMut> for DataAssociation {}
impl Cast<dyn OutputSetType> for DataAssociation {}
impl Cast<dyn OutputSetTypeMut> for DataAssociation {}
impl Cast<dyn ParallelGatewayType> for DataAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for DataAssociation {}
impl Cast<dyn ParticipantType> for DataAssociation {}
impl Cast<dyn ParticipantTypeMut> for DataAssociation {}
impl Cast<dyn ParticipantAssociationType> for DataAssociation {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataAssociation {}
impl Cast<dyn ParticipantMultiplicityType> for DataAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataAssociation {}
impl Cast<dyn PartnerEntityType> for DataAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for DataAssociation {}
impl Cast<dyn PartnerRoleType> for DataAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for DataAssociation {}
impl Cast<dyn PerformerType> for DataAssociation {}
impl Cast<dyn PerformerTypeMut> for DataAssociation {}
impl Cast<dyn PotentialOwnerType> for DataAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for DataAssociation {}
impl Cast<dyn ProcessType> for DataAssociation {}
impl Cast<dyn ProcessTypeMut> for DataAssociation {}
impl Cast<dyn PropertyType> for DataAssociation {}
impl Cast<dyn PropertyTypeMut> for DataAssociation {}
impl Cast<dyn ReceiveTaskType> for DataAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for DataAssociation {}
impl Cast<dyn RelationshipType> for DataAssociation {}
impl Cast<dyn RelationshipTypeMut> for DataAssociation {}
impl Cast<dyn RenderingType> for DataAssociation {}
impl Cast<dyn RenderingTypeMut> for DataAssociation {}
impl Cast<dyn ResourceType> for DataAssociation {}
impl Cast<dyn ResourceTypeMut> for DataAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataAssociation {}
impl Cast<dyn ResourceParameterType> for DataAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for DataAssociation {}
impl Cast<dyn ResourceParameterBindingType> for DataAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataAssociation {}
impl Cast<dyn ResourceRoleType> for DataAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for DataAssociation {}
impl Cast<dyn RootElementType> for DataAssociation {}
impl Cast<dyn RootElementTypeMut> for DataAssociation {}
impl Cast<dyn ScriptTaskType> for DataAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for DataAssociation {}
impl Cast<dyn ScriptType> for DataAssociation {}
impl Cast<dyn ScriptTypeMut> for DataAssociation {}
impl Cast<dyn SendTaskType> for DataAssociation {}
impl Cast<dyn SendTaskTypeMut> for DataAssociation {}
impl Cast<dyn SequenceFlowType> for DataAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for DataAssociation {}
impl Cast<dyn ServiceTaskType> for DataAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for DataAssociation {}
impl Cast<dyn SignalType> for DataAssociation {}
impl Cast<dyn SignalTypeMut> for DataAssociation {}
impl Cast<dyn SignalEventDefinitionType> for DataAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataAssociation {}
impl Cast<dyn StartEventType> for DataAssociation {}
impl Cast<dyn StartEventTypeMut> for DataAssociation {}
impl Cast<dyn SubChoreographyType> for DataAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for DataAssociation {}
impl Cast<dyn SubConversationType> for DataAssociation {}
impl Cast<dyn SubConversationTypeMut> for DataAssociation {}
impl Cast<dyn SubProcessType> for DataAssociation {}
impl Cast<dyn SubProcessTypeMut> for DataAssociation {}
impl Cast<dyn TaskType> for DataAssociation {}
impl Cast<dyn TaskTypeMut> for DataAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for DataAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn TextAnnotationType> for DataAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for DataAssociation {}
impl Cast<dyn TextType> for DataAssociation {}
impl Cast<dyn TextTypeMut> for DataAssociation {}
impl Cast<dyn ThrowEventType> for DataAssociation {}
impl Cast<dyn ThrowEventTypeMut> for DataAssociation {}
impl Cast<dyn TimerEventDefinitionType> for DataAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataAssociation {}
impl Cast<dyn TransactionType> for DataAssociation {}
impl Cast<dyn TransactionTypeMut> for DataAssociation {}
impl Cast<dyn UserTaskType> for DataAssociation {}
impl Cast<dyn UserTaskTypeMut> for DataAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataInput")]
pub struct DataInput {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("DataInputType",rg*="name","DataInputTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataInputType",rg*="item_subject_ref","DataInputTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(attr = "isCollection")]
    #[tia("DataInputType",rg*="is_collection","DataInputTypeMut",s)]
    pub is_collection: Option<bool>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataInputType",rg*="data_state","DataInputTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataInput {
    fn element(&self) -> Element {
        Element::DataInput
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataInput {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataInput`
pub trait DataInputType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of attribute `isCollection`
    fn is_collection(&self) -> &Option<bool>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataInputType);
impl_downcast!(DataInputType);
/// Mutable access to `dataInput`
pub trait DataInputTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + DataInputType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Set value of attribute `isCollection`
    fn set_is_collection(&mut self, value: Option<bool>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataInputTypeMut);
impl_downcast!(DataInputTypeMut);
impl Cast<dyn DefinitionsType> for DataInput {}
impl Cast<dyn DefinitionsTypeMut> for DataInput {}
impl Cast<dyn ImportType> for DataInput {}
impl Cast<dyn ImportTypeMut> for DataInput {}
impl Cast<dyn ActivityType> for DataInput {}
impl Cast<dyn ActivityTypeMut> for DataInput {}
impl Cast<dyn AdHocSubProcessType> for DataInput {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataInput {}
impl Cast<dyn ArtifactType> for DataInput {}
impl Cast<dyn ArtifactTypeMut> for DataInput {}
impl Cast<dyn AssignmentType> for DataInput {}
impl Cast<dyn AssignmentTypeMut> for DataInput {}
impl Cast<dyn AssociationType> for DataInput {}
impl Cast<dyn AssociationTypeMut> for DataInput {}
impl Cast<dyn AuditingType> for DataInput {}
impl Cast<dyn AuditingTypeMut> for DataInput {}
impl Cast<dyn BaseElementType> for DataInput {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataInput {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataInput {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataInput {}
impl Cast<dyn BoundaryEventType> for DataInput {}
impl Cast<dyn BoundaryEventTypeMut> for DataInput {}
impl Cast<dyn BusinessRuleTaskType> for DataInput {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataInput {}
impl Cast<dyn CallableElementType> for DataInput {}
impl Cast<dyn CallableElementTypeMut> for DataInput {}
impl Cast<dyn CallActivityType> for DataInput {}
impl Cast<dyn CallActivityTypeMut> for DataInput {}
impl Cast<dyn CallChoreographyType> for DataInput {}
impl Cast<dyn CallChoreographyTypeMut> for DataInput {}
impl Cast<dyn CallConversationType> for DataInput {}
impl Cast<dyn CallConversationTypeMut> for DataInput {}
impl Cast<dyn CancelEventDefinitionType> for DataInput {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn CatchEventType> for DataInput {}
impl Cast<dyn CatchEventTypeMut> for DataInput {}
impl Cast<dyn CategoryType> for DataInput {}
impl Cast<dyn CategoryTypeMut> for DataInput {}
impl Cast<dyn CategoryValueType> for DataInput {}
impl Cast<dyn CategoryValueTypeMut> for DataInput {}
impl Cast<dyn ChoreographyType> for DataInput {}
impl Cast<dyn ChoreographyTypeMut> for DataInput {}
impl Cast<dyn ChoreographyActivityType> for DataInput {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataInput {}
impl Cast<dyn ChoreographyTaskType> for DataInput {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataInput {}
impl Cast<dyn CollaborationType> for DataInput {}
impl Cast<dyn CollaborationTypeMut> for DataInput {}
impl Cast<dyn CompensateEventDefinitionType> for DataInput {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataInput {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataInput {}
impl Cast<dyn ComplexGatewayType> for DataInput {}
impl Cast<dyn ComplexGatewayTypeMut> for DataInput {}
impl Cast<dyn ConditionalEventDefinitionType> for DataInput {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn ConversationType> for DataInput {}
impl Cast<dyn ConversationTypeMut> for DataInput {}
impl Cast<dyn ConversationAssociationType> for DataInput {}
impl Cast<dyn ConversationAssociationTypeMut> for DataInput {}
impl Cast<dyn ConversationLinkType> for DataInput {}
impl Cast<dyn ConversationLinkTypeMut> for DataInput {}
impl Cast<dyn ConversationNodeType> for DataInput {}
impl Cast<dyn ConversationNodeTypeMut> for DataInput {}
impl Cast<dyn CorrelationKeyType> for DataInput {}
impl Cast<dyn CorrelationKeyTypeMut> for DataInput {}
impl Cast<dyn CorrelationPropertyType> for DataInput {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataInput {}
impl Cast<dyn CorrelationPropertyBindingType> for DataInput {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataInput {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataInput {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataInput {}
impl Cast<dyn CorrelationSubscriptionType> for DataInput {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataInput {}
impl Cast<dyn DataAssociationType> for DataInput {}
impl Cast<dyn DataAssociationTypeMut> for DataInput {}
impl Cast<dyn DataInputType> for DataInput {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputTypeMut> for DataInput {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputAssociationType> for DataInput {}
impl Cast<dyn DataInputAssociationTypeMut> for DataInput {}
impl Cast<dyn DataObjectType> for DataInput {}
impl Cast<dyn DataObjectTypeMut> for DataInput {}
impl Cast<dyn DataObjectReferenceType> for DataInput {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataInput {}
impl Cast<dyn DataOutputType> for DataInput {}
impl Cast<dyn DataOutputTypeMut> for DataInput {}
impl Cast<dyn DataOutputAssociationType> for DataInput {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataInput {}
impl Cast<dyn DataStateType> for DataInput {}
impl Cast<dyn DataStateTypeMut> for DataInput {}
impl Cast<dyn DataStoreType> for DataInput {}
impl Cast<dyn DataStoreTypeMut> for DataInput {}
impl Cast<dyn DataStoreReferenceType> for DataInput {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataInput {}
impl Cast<dyn DocumentationType> for DataInput {}
impl Cast<dyn DocumentationTypeMut> for DataInput {}
impl Cast<dyn EndEventType> for DataInput {}
impl Cast<dyn EndEventTypeMut> for DataInput {}
impl Cast<dyn EndPointType> for DataInput {}
impl Cast<dyn EndPointTypeMut> for DataInput {}
impl Cast<dyn ErrorType> for DataInput {}
impl Cast<dyn ErrorTypeMut> for DataInput {}
impl Cast<dyn ErrorEventDefinitionType> for DataInput {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn EscalationType> for DataInput {}
impl Cast<dyn EscalationTypeMut> for DataInput {}
impl Cast<dyn EscalationEventDefinitionType> for DataInput {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn EventType> for DataInput {}
impl Cast<dyn EventTypeMut> for DataInput {}
impl Cast<dyn EventBasedGatewayType> for DataInput {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataInput {}
impl Cast<dyn EventDefinitionType> for DataInput {}
impl Cast<dyn EventDefinitionTypeMut> for DataInput {}
impl Cast<dyn ExclusiveGatewayType> for DataInput {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataInput {}
impl Cast<dyn ExpressionType> for DataInput {}
impl Cast<dyn ExpressionTypeMut> for DataInput {}
impl Cast<dyn ExtensionType> for DataInput {}
impl Cast<dyn ExtensionTypeMut> for DataInput {}
impl Cast<dyn ExtensionElementsType> for DataInput {}
impl Cast<dyn ExtensionElementsTypeMut> for DataInput {}
impl Cast<dyn FlowElementType> for DataInput {}
impl Cast<dyn FlowElementTypeMut> for DataInput {}
impl Cast<dyn FlowNodeType> for DataInput {}
impl Cast<dyn FlowNodeTypeMut> for DataInput {}
impl Cast<dyn FormalExpressionType> for DataInput {}
impl Cast<dyn FormalExpressionTypeMut> for DataInput {}
impl Cast<dyn GatewayType> for DataInput {}
impl Cast<dyn GatewayTypeMut> for DataInput {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataInput {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataInput {}
impl Cast<dyn GlobalChoreographyTaskType> for DataInput {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataInput {}
impl Cast<dyn GlobalConversationType> for DataInput {}
impl Cast<dyn GlobalConversationTypeMut> for DataInput {}
impl Cast<dyn GlobalManualTaskType> for DataInput {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataInput {}
impl Cast<dyn GlobalScriptTaskType> for DataInput {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataInput {}
impl Cast<dyn GlobalTaskType> for DataInput {}
impl Cast<dyn GlobalTaskTypeMut> for DataInput {}
impl Cast<dyn GlobalUserTaskType> for DataInput {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataInput {}
impl Cast<dyn GroupType> for DataInput {}
impl Cast<dyn GroupTypeMut> for DataInput {}
impl Cast<dyn HumanPerformerType> for DataInput {}
impl Cast<dyn HumanPerformerTypeMut> for DataInput {}
impl Cast<dyn ImplicitThrowEventType> for DataInput {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataInput {}
impl Cast<dyn InclusiveGatewayType> for DataInput {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataInput {}
impl Cast<dyn InputSetType> for DataInput {}
impl Cast<dyn InputSetTypeMut> for DataInput {}
impl Cast<dyn InterfaceType> for DataInput {}
impl Cast<dyn InterfaceTypeMut> for DataInput {}
impl Cast<dyn IntermediateCatchEventType> for DataInput {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataInput {}
impl Cast<dyn IntermediateThrowEventType> for DataInput {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataInput {}
impl Cast<dyn InputOutputBindingType> for DataInput {}
impl Cast<dyn InputOutputBindingTypeMut> for DataInput {}
impl Cast<dyn InputOutputSpecificationType> for DataInput {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataInput {}
impl Cast<dyn ItemDefinitionType> for DataInput {}
impl Cast<dyn ItemDefinitionTypeMut> for DataInput {}
impl Cast<dyn LaneType> for DataInput {}
impl Cast<dyn LaneTypeMut> for DataInput {}
impl Cast<dyn LaneSetType> for DataInput {}
impl Cast<dyn LaneSetTypeMut> for DataInput {}
impl Cast<dyn LinkEventDefinitionType> for DataInput {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn LoopCharacteristicsType> for DataInput {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataInput {}
impl Cast<dyn ManualTaskType> for DataInput {}
impl Cast<dyn ManualTaskTypeMut> for DataInput {}
impl Cast<dyn MessageType> for DataInput {}
impl Cast<dyn MessageTypeMut> for DataInput {}
impl Cast<dyn MessageEventDefinitionType> for DataInput {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn MessageFlowType> for DataInput {}
impl Cast<dyn MessageFlowTypeMut> for DataInput {}
impl Cast<dyn MessageFlowAssociationType> for DataInput {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataInput {}
impl Cast<dyn MonitoringType> for DataInput {}
impl Cast<dyn MonitoringTypeMut> for DataInput {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataInput {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataInput {}
impl Cast<dyn OperationType> for DataInput {}
impl Cast<dyn OperationTypeMut> for DataInput {}
impl Cast<dyn OutputSetType> for DataInput {}
impl Cast<dyn OutputSetTypeMut> for DataInput {}
impl Cast<dyn ParallelGatewayType> for DataInput {}
impl Cast<dyn ParallelGatewayTypeMut> for DataInput {}
impl Cast<dyn ParticipantType> for DataInput {}
impl Cast<dyn ParticipantTypeMut> for DataInput {}
impl Cast<dyn ParticipantAssociationType> for DataInput {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataInput {}
impl Cast<dyn ParticipantMultiplicityType> for DataInput {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataInput {}
impl Cast<dyn PartnerEntityType> for DataInput {}
impl Cast<dyn PartnerEntityTypeMut> for DataInput {}
impl Cast<dyn PartnerRoleType> for DataInput {}
impl Cast<dyn PartnerRoleTypeMut> for DataInput {}
impl Cast<dyn PerformerType> for DataInput {}
impl Cast<dyn PerformerTypeMut> for DataInput {}
impl Cast<dyn PotentialOwnerType> for DataInput {}
impl Cast<dyn PotentialOwnerTypeMut> for DataInput {}
impl Cast<dyn ProcessType> for DataInput {}
impl Cast<dyn ProcessTypeMut> for DataInput {}
impl Cast<dyn PropertyType> for DataInput {}
impl Cast<dyn PropertyTypeMut> for DataInput {}
impl Cast<dyn ReceiveTaskType> for DataInput {}
impl Cast<dyn ReceiveTaskTypeMut> for DataInput {}
impl Cast<dyn RelationshipType> for DataInput {}
impl Cast<dyn RelationshipTypeMut> for DataInput {}
impl Cast<dyn RenderingType> for DataInput {}
impl Cast<dyn RenderingTypeMut> for DataInput {}
impl Cast<dyn ResourceType> for DataInput {}
impl Cast<dyn ResourceTypeMut> for DataInput {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataInput {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataInput {}
impl Cast<dyn ResourceParameterType> for DataInput {}
impl Cast<dyn ResourceParameterTypeMut> for DataInput {}
impl Cast<dyn ResourceParameterBindingType> for DataInput {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataInput {}
impl Cast<dyn ResourceRoleType> for DataInput {}
impl Cast<dyn ResourceRoleTypeMut> for DataInput {}
impl Cast<dyn RootElementType> for DataInput {}
impl Cast<dyn RootElementTypeMut> for DataInput {}
impl Cast<dyn ScriptTaskType> for DataInput {}
impl Cast<dyn ScriptTaskTypeMut> for DataInput {}
impl Cast<dyn ScriptType> for DataInput {}
impl Cast<dyn ScriptTypeMut> for DataInput {}
impl Cast<dyn SendTaskType> for DataInput {}
impl Cast<dyn SendTaskTypeMut> for DataInput {}
impl Cast<dyn SequenceFlowType> for DataInput {}
impl Cast<dyn SequenceFlowTypeMut> for DataInput {}
impl Cast<dyn ServiceTaskType> for DataInput {}
impl Cast<dyn ServiceTaskTypeMut> for DataInput {}
impl Cast<dyn SignalType> for DataInput {}
impl Cast<dyn SignalTypeMut> for DataInput {}
impl Cast<dyn SignalEventDefinitionType> for DataInput {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataInput {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataInput {}
impl Cast<dyn StartEventType> for DataInput {}
impl Cast<dyn StartEventTypeMut> for DataInput {}
impl Cast<dyn SubChoreographyType> for DataInput {}
impl Cast<dyn SubChoreographyTypeMut> for DataInput {}
impl Cast<dyn SubConversationType> for DataInput {}
impl Cast<dyn SubConversationTypeMut> for DataInput {}
impl Cast<dyn SubProcessType> for DataInput {}
impl Cast<dyn SubProcessTypeMut> for DataInput {}
impl Cast<dyn TaskType> for DataInput {}
impl Cast<dyn TaskTypeMut> for DataInput {}
impl Cast<dyn TerminateEventDefinitionType> for DataInput {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn TextAnnotationType> for DataInput {}
impl Cast<dyn TextAnnotationTypeMut> for DataInput {}
impl Cast<dyn TextType> for DataInput {}
impl Cast<dyn TextTypeMut> for DataInput {}
impl Cast<dyn ThrowEventType> for DataInput {}
impl Cast<dyn ThrowEventTypeMut> for DataInput {}
impl Cast<dyn TimerEventDefinitionType> for DataInput {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataInput {}
impl Cast<dyn TransactionType> for DataInput {}
impl Cast<dyn TransactionTypeMut> for DataInput {}
impl Cast<dyn UserTaskType> for DataInput {}
impl Cast<dyn UserTaskTypeMut> for DataInput {}
/// Wrapper for multiInstanceLoopCharacteristics::inputDataItem element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct MultiInstanceLoopCharacteristicsInputDataItem(pub DataInput);
impl<'a> XmlRead<'a> for MultiInstanceLoopCharacteristicsInputDataItem {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(MultiInstanceLoopCharacteristicsInputDataItem(
            DataInput::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("inputDataItem", "dataInput")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for MultiInstanceLoopCharacteristicsInputDataItem {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataInputAssociation")]
pub struct DataInputAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(flatten_text = "bpmn:sourceRef")]
    #[tia("DataAssociationType",rg*="source_refs","DataAssociationTypeMut",s,rmg*="source_refs_mut")]
    pub source_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:targetRef")]
    #[tia("DataAssociationType",rg*="target_ref","DataAssociationTypeMut",s,rmg*="target_ref_mut")]
    pub target_ref: String,
    #[xml(child = "bpmn:transformation")]
    #[tia("DataAssociationType",rg*="transformation","DataAssociationTypeMut",s,rmg*="transformation_mut")]
    pub transformation: Option<DataAssociationTransformation>,
    #[xml(child = "bpmn:assignment")]
    #[tia("DataAssociationType",rg*="assignments","DataAssociationTypeMut",s,rmg*="assignments_mut")]
    pub assignments: Vec<Assignment>,
}
impl DocumentElement for DataInputAssociation {
    fn element(&self) -> Element {
        Element::DataInputAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataInputAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl DataInputAssociationType for DataInputAssociation {}
impl DataInputAssociationTypeMut for DataInputAssociation {}
//

/// Access to `dataInputAssociation`
pub trait DataInputAssociationType:
    DataAssociationType + Downcast + Debug + Send + DynClone
{
}
dyn_clone::clone_trait_object!(DataInputAssociationType);
impl_downcast!(DataInputAssociationType);
/// Mutable access to `dataInputAssociation`
pub trait DataInputAssociationTypeMut:
    DataAssociationTypeMut + Downcast + Debug + Send + DynClone + DataInputAssociationType
{
}
dyn_clone::clone_trait_object!(DataInputAssociationTypeMut);
impl_downcast!(DataInputAssociationTypeMut);
impl Cast<dyn DefinitionsType> for DataInputAssociation {}
impl Cast<dyn DefinitionsTypeMut> for DataInputAssociation {}
impl Cast<dyn ImportType> for DataInputAssociation {}
impl Cast<dyn ImportTypeMut> for DataInputAssociation {}
impl Cast<dyn ActivityType> for DataInputAssociation {}
impl Cast<dyn ActivityTypeMut> for DataInputAssociation {}
impl Cast<dyn AdHocSubProcessType> for DataInputAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataInputAssociation {}
impl Cast<dyn ArtifactType> for DataInputAssociation {}
impl Cast<dyn ArtifactTypeMut> for DataInputAssociation {}
impl Cast<dyn AssignmentType> for DataInputAssociation {}
impl Cast<dyn AssignmentTypeMut> for DataInputAssociation {}
impl Cast<dyn AssociationType> for DataInputAssociation {}
impl Cast<dyn AssociationTypeMut> for DataInputAssociation {}
impl Cast<dyn AuditingType> for DataInputAssociation {}
impl Cast<dyn AuditingTypeMut> for DataInputAssociation {}
impl Cast<dyn BaseElementType> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataInputAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataInputAssociation {}
impl Cast<dyn BoundaryEventType> for DataInputAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for DataInputAssociation {}
impl Cast<dyn BusinessRuleTaskType> for DataInputAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn CallableElementType> for DataInputAssociation {}
impl Cast<dyn CallableElementTypeMut> for DataInputAssociation {}
impl Cast<dyn CallActivityType> for DataInputAssociation {}
impl Cast<dyn CallActivityTypeMut> for DataInputAssociation {}
impl Cast<dyn CallChoreographyType> for DataInputAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for DataInputAssociation {}
impl Cast<dyn CallConversationType> for DataInputAssociation {}
impl Cast<dyn CallConversationTypeMut> for DataInputAssociation {}
impl Cast<dyn CancelEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn CatchEventType> for DataInputAssociation {}
impl Cast<dyn CatchEventTypeMut> for DataInputAssociation {}
impl Cast<dyn CategoryType> for DataInputAssociation {}
impl Cast<dyn CategoryTypeMut> for DataInputAssociation {}
impl Cast<dyn CategoryValueType> for DataInputAssociation {}
impl Cast<dyn CategoryValueTypeMut> for DataInputAssociation {}
impl Cast<dyn ChoreographyType> for DataInputAssociation {}
impl Cast<dyn ChoreographyTypeMut> for DataInputAssociation {}
impl Cast<dyn ChoreographyActivityType> for DataInputAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataInputAssociation {}
impl Cast<dyn ChoreographyTaskType> for DataInputAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn CollaborationType> for DataInputAssociation {}
impl Cast<dyn CollaborationTypeMut> for DataInputAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataInputAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn ComplexGatewayType> for DataInputAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn ConversationType> for DataInputAssociation {}
impl Cast<dyn ConversationTypeMut> for DataInputAssociation {}
impl Cast<dyn ConversationAssociationType> for DataInputAssociation {}
impl Cast<dyn ConversationAssociationTypeMut> for DataInputAssociation {}
impl Cast<dyn ConversationLinkType> for DataInputAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for DataInputAssociation {}
impl Cast<dyn ConversationNodeType> for DataInputAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for DataInputAssociation {}
impl Cast<dyn CorrelationKeyType> for DataInputAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyType> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataInputAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataInputAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for DataInputAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataInputAssociation {}
impl Cast<dyn DataAssociationType> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataAssociationTypeMut> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputType> for DataInputAssociation {}
impl Cast<dyn DataInputTypeMut> for DataInputAssociation {}
impl Cast<dyn DataInputAssociationType> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for DataInputAssociation {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataObjectType> for DataInputAssociation {}
impl Cast<dyn DataObjectTypeMut> for DataInputAssociation {}
impl Cast<dyn DataObjectReferenceType> for DataInputAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataInputAssociation {}
impl Cast<dyn DataOutputType> for DataInputAssociation {}
impl Cast<dyn DataOutputTypeMut> for DataInputAssociation {}
impl Cast<dyn DataOutputAssociationType> for DataInputAssociation {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataInputAssociation {}
impl Cast<dyn DataStateType> for DataInputAssociation {}
impl Cast<dyn DataStateTypeMut> for DataInputAssociation {}
impl Cast<dyn DataStoreType> for DataInputAssociation {}
impl Cast<dyn DataStoreTypeMut> for DataInputAssociation {}
impl Cast<dyn DataStoreReferenceType> for DataInputAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataInputAssociation {}
impl Cast<dyn DocumentationType> for DataInputAssociation {}
impl Cast<dyn DocumentationTypeMut> for DataInputAssociation {}
impl Cast<dyn EndEventType> for DataInputAssociation {}
impl Cast<dyn EndEventTypeMut> for DataInputAssociation {}
impl Cast<dyn EndPointType> for DataInputAssociation {}
impl Cast<dyn EndPointTypeMut> for DataInputAssociation {}
impl Cast<dyn ErrorType> for DataInputAssociation {}
impl Cast<dyn ErrorTypeMut> for DataInputAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn EscalationType> for DataInputAssociation {}
impl Cast<dyn EscalationTypeMut> for DataInputAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn EventType> for DataInputAssociation {}
impl Cast<dyn EventTypeMut> for DataInputAssociation {}
impl Cast<dyn EventBasedGatewayType> for DataInputAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn EventDefinitionType> for DataInputAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn ExclusiveGatewayType> for DataInputAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn ExpressionType> for DataInputAssociation {}
impl Cast<dyn ExpressionTypeMut> for DataInputAssociation {}
impl Cast<dyn ExtensionType> for DataInputAssociation {}
impl Cast<dyn ExtensionTypeMut> for DataInputAssociation {}
impl Cast<dyn ExtensionElementsType> for DataInputAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for DataInputAssociation {}
impl Cast<dyn FlowElementType> for DataInputAssociation {}
impl Cast<dyn FlowElementTypeMut> for DataInputAssociation {}
impl Cast<dyn FlowNodeType> for DataInputAssociation {}
impl Cast<dyn FlowNodeTypeMut> for DataInputAssociation {}
impl Cast<dyn FormalExpressionType> for DataInputAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for DataInputAssociation {}
impl Cast<dyn GatewayType> for DataInputAssociation {}
impl Cast<dyn GatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalConversationType> for DataInputAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalManualTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalScriptTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GlobalUserTaskType> for DataInputAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn GroupType> for DataInputAssociation {}
impl Cast<dyn GroupTypeMut> for DataInputAssociation {}
impl Cast<dyn HumanPerformerType> for DataInputAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for DataInputAssociation {}
impl Cast<dyn ImplicitThrowEventType> for DataInputAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataInputAssociation {}
impl Cast<dyn InclusiveGatewayType> for DataInputAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn InputSetType> for DataInputAssociation {}
impl Cast<dyn InputSetTypeMut> for DataInputAssociation {}
impl Cast<dyn InterfaceType> for DataInputAssociation {}
impl Cast<dyn InterfaceTypeMut> for DataInputAssociation {}
impl Cast<dyn IntermediateCatchEventType> for DataInputAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataInputAssociation {}
impl Cast<dyn IntermediateThrowEventType> for DataInputAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataInputAssociation {}
impl Cast<dyn InputOutputBindingType> for DataInputAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for DataInputAssociation {}
impl Cast<dyn InputOutputSpecificationType> for DataInputAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataInputAssociation {}
impl Cast<dyn ItemDefinitionType> for DataInputAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn LaneType> for DataInputAssociation {}
impl Cast<dyn LaneTypeMut> for DataInputAssociation {}
impl Cast<dyn LaneSetType> for DataInputAssociation {}
impl Cast<dyn LaneSetTypeMut> for DataInputAssociation {}
impl Cast<dyn LinkEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn LoopCharacteristicsType> for DataInputAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataInputAssociation {}
impl Cast<dyn ManualTaskType> for DataInputAssociation {}
impl Cast<dyn ManualTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn MessageType> for DataInputAssociation {}
impl Cast<dyn MessageTypeMut> for DataInputAssociation {}
impl Cast<dyn MessageEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn MessageFlowType> for DataInputAssociation {}
impl Cast<dyn MessageFlowTypeMut> for DataInputAssociation {}
impl Cast<dyn MessageFlowAssociationType> for DataInputAssociation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataInputAssociation {}
impl Cast<dyn MonitoringType> for DataInputAssociation {}
impl Cast<dyn MonitoringTypeMut> for DataInputAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataInputAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataInputAssociation {}
impl Cast<dyn OperationType> for DataInputAssociation {}
impl Cast<dyn OperationTypeMut> for DataInputAssociation {}
impl Cast<dyn OutputSetType> for DataInputAssociation {}
impl Cast<dyn OutputSetTypeMut> for DataInputAssociation {}
impl Cast<dyn ParallelGatewayType> for DataInputAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for DataInputAssociation {}
impl Cast<dyn ParticipantType> for DataInputAssociation {}
impl Cast<dyn ParticipantTypeMut> for DataInputAssociation {}
impl Cast<dyn ParticipantAssociationType> for DataInputAssociation {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataInputAssociation {}
impl Cast<dyn ParticipantMultiplicityType> for DataInputAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataInputAssociation {}
impl Cast<dyn PartnerEntityType> for DataInputAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for DataInputAssociation {}
impl Cast<dyn PartnerRoleType> for DataInputAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for DataInputAssociation {}
impl Cast<dyn PerformerType> for DataInputAssociation {}
impl Cast<dyn PerformerTypeMut> for DataInputAssociation {}
impl Cast<dyn PotentialOwnerType> for DataInputAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for DataInputAssociation {}
impl Cast<dyn ProcessType> for DataInputAssociation {}
impl Cast<dyn ProcessTypeMut> for DataInputAssociation {}
impl Cast<dyn PropertyType> for DataInputAssociation {}
impl Cast<dyn PropertyTypeMut> for DataInputAssociation {}
impl Cast<dyn ReceiveTaskType> for DataInputAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn RelationshipType> for DataInputAssociation {}
impl Cast<dyn RelationshipTypeMut> for DataInputAssociation {}
impl Cast<dyn RenderingType> for DataInputAssociation {}
impl Cast<dyn RenderingTypeMut> for DataInputAssociation {}
impl Cast<dyn ResourceType> for DataInputAssociation {}
impl Cast<dyn ResourceTypeMut> for DataInputAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataInputAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataInputAssociation {}
impl Cast<dyn ResourceParameterType> for DataInputAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for DataInputAssociation {}
impl Cast<dyn ResourceParameterBindingType> for DataInputAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataInputAssociation {}
impl Cast<dyn ResourceRoleType> for DataInputAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for DataInputAssociation {}
impl Cast<dyn RootElementType> for DataInputAssociation {}
impl Cast<dyn RootElementTypeMut> for DataInputAssociation {}
impl Cast<dyn ScriptTaskType> for DataInputAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn ScriptType> for DataInputAssociation {}
impl Cast<dyn ScriptTypeMut> for DataInputAssociation {}
impl Cast<dyn SendTaskType> for DataInputAssociation {}
impl Cast<dyn SendTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn SequenceFlowType> for DataInputAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for DataInputAssociation {}
impl Cast<dyn ServiceTaskType> for DataInputAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for DataInputAssociation {}
impl Cast<dyn SignalType> for DataInputAssociation {}
impl Cast<dyn SignalTypeMut> for DataInputAssociation {}
impl Cast<dyn SignalEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataInputAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataInputAssociation {}
impl Cast<dyn StartEventType> for DataInputAssociation {}
impl Cast<dyn StartEventTypeMut> for DataInputAssociation {}
impl Cast<dyn SubChoreographyType> for DataInputAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for DataInputAssociation {}
impl Cast<dyn SubConversationType> for DataInputAssociation {}
impl Cast<dyn SubConversationTypeMut> for DataInputAssociation {}
impl Cast<dyn SubProcessType> for DataInputAssociation {}
impl Cast<dyn SubProcessTypeMut> for DataInputAssociation {}
impl Cast<dyn TaskType> for DataInputAssociation {}
impl Cast<dyn TaskTypeMut> for DataInputAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn TextAnnotationType> for DataInputAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for DataInputAssociation {}
impl Cast<dyn TextType> for DataInputAssociation {}
impl Cast<dyn TextTypeMut> for DataInputAssociation {}
impl Cast<dyn ThrowEventType> for DataInputAssociation {}
impl Cast<dyn ThrowEventTypeMut> for DataInputAssociation {}
impl Cast<dyn TimerEventDefinitionType> for DataInputAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataInputAssociation {}
impl Cast<dyn TransactionType> for DataInputAssociation {}
impl Cast<dyn TransactionTypeMut> for DataInputAssociation {}
impl Cast<dyn UserTaskType> for DataInputAssociation {}
impl Cast<dyn UserTaskTypeMut> for DataInputAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataObject")]
pub struct DataObject {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataObjectType",rg*="item_subject_ref","DataObjectTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(attr = "isCollection")]
    #[tia("DataObjectType",rg*="is_collection","DataObjectTypeMut",s)]
    pub is_collection: Option<bool>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataObjectType",rg*="data_state","DataObjectTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataObject {
    fn element(&self) -> Element {
        Element::DataObject
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataObject {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataObject`
pub trait DataObjectType: FlowElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of attribute `isCollection`
    fn is_collection(&self) -> &Option<bool>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataObjectType);
impl_downcast!(DataObjectType);
/// Mutable access to `dataObject`
pub trait DataObjectTypeMut:
    FlowElementTypeMut + Downcast + Debug + Send + DynClone + DataObjectType
{
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Set value of attribute `isCollection`
    fn set_is_collection(&mut self, value: Option<bool>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataObjectTypeMut);
impl_downcast!(DataObjectTypeMut);
impl Cast<dyn DefinitionsType> for DataObject {}
impl Cast<dyn DefinitionsTypeMut> for DataObject {}
impl Cast<dyn ImportType> for DataObject {}
impl Cast<dyn ImportTypeMut> for DataObject {}
impl Cast<dyn ActivityType> for DataObject {}
impl Cast<dyn ActivityTypeMut> for DataObject {}
impl Cast<dyn AdHocSubProcessType> for DataObject {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataObject {}
impl Cast<dyn ArtifactType> for DataObject {}
impl Cast<dyn ArtifactTypeMut> for DataObject {}
impl Cast<dyn AssignmentType> for DataObject {}
impl Cast<dyn AssignmentTypeMut> for DataObject {}
impl Cast<dyn AssociationType> for DataObject {}
impl Cast<dyn AssociationTypeMut> for DataObject {}
impl Cast<dyn AuditingType> for DataObject {}
impl Cast<dyn AuditingTypeMut> for DataObject {}
impl Cast<dyn BaseElementType> for DataObject {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataObject {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataObject {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataObject {}
impl Cast<dyn BoundaryEventType> for DataObject {}
impl Cast<dyn BoundaryEventTypeMut> for DataObject {}
impl Cast<dyn BusinessRuleTaskType> for DataObject {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataObject {}
impl Cast<dyn CallableElementType> for DataObject {}
impl Cast<dyn CallableElementTypeMut> for DataObject {}
impl Cast<dyn CallActivityType> for DataObject {}
impl Cast<dyn CallActivityTypeMut> for DataObject {}
impl Cast<dyn CallChoreographyType> for DataObject {}
impl Cast<dyn CallChoreographyTypeMut> for DataObject {}
impl Cast<dyn CallConversationType> for DataObject {}
impl Cast<dyn CallConversationTypeMut> for DataObject {}
impl Cast<dyn CancelEventDefinitionType> for DataObject {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn CatchEventType> for DataObject {}
impl Cast<dyn CatchEventTypeMut> for DataObject {}
impl Cast<dyn CategoryType> for DataObject {}
impl Cast<dyn CategoryTypeMut> for DataObject {}
impl Cast<dyn CategoryValueType> for DataObject {}
impl Cast<dyn CategoryValueTypeMut> for DataObject {}
impl Cast<dyn ChoreographyType> for DataObject {}
impl Cast<dyn ChoreographyTypeMut> for DataObject {}
impl Cast<dyn ChoreographyActivityType> for DataObject {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataObject {}
impl Cast<dyn ChoreographyTaskType> for DataObject {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataObject {}
impl Cast<dyn CollaborationType> for DataObject {}
impl Cast<dyn CollaborationTypeMut> for DataObject {}
impl Cast<dyn CompensateEventDefinitionType> for DataObject {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataObject {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataObject {}
impl Cast<dyn ComplexGatewayType> for DataObject {}
impl Cast<dyn ComplexGatewayTypeMut> for DataObject {}
impl Cast<dyn ConditionalEventDefinitionType> for DataObject {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn ConversationType> for DataObject {}
impl Cast<dyn ConversationTypeMut> for DataObject {}
impl Cast<dyn ConversationAssociationType> for DataObject {}
impl Cast<dyn ConversationAssociationTypeMut> for DataObject {}
impl Cast<dyn ConversationLinkType> for DataObject {}
impl Cast<dyn ConversationLinkTypeMut> for DataObject {}
impl Cast<dyn ConversationNodeType> for DataObject {}
impl Cast<dyn ConversationNodeTypeMut> for DataObject {}
impl Cast<dyn CorrelationKeyType> for DataObject {}
impl Cast<dyn CorrelationKeyTypeMut> for DataObject {}
impl Cast<dyn CorrelationPropertyType> for DataObject {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataObject {}
impl Cast<dyn CorrelationPropertyBindingType> for DataObject {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataObject {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataObject {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataObject {}
impl Cast<dyn CorrelationSubscriptionType> for DataObject {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataObject {}
impl Cast<dyn DataAssociationType> for DataObject {}
impl Cast<dyn DataAssociationTypeMut> for DataObject {}
impl Cast<dyn DataInputType> for DataObject {}
impl Cast<dyn DataInputTypeMut> for DataObject {}
impl Cast<dyn DataInputAssociationType> for DataObject {}
impl Cast<dyn DataInputAssociationTypeMut> for DataObject {}
impl Cast<dyn DataObjectType> for DataObject {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataObjectTypeMut> for DataObject {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataObjectReferenceType> for DataObject {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataObject {}
impl Cast<dyn DataOutputType> for DataObject {}
impl Cast<dyn DataOutputTypeMut> for DataObject {}
impl Cast<dyn DataOutputAssociationType> for DataObject {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataObject {}
impl Cast<dyn DataStateType> for DataObject {}
impl Cast<dyn DataStateTypeMut> for DataObject {}
impl Cast<dyn DataStoreType> for DataObject {}
impl Cast<dyn DataStoreTypeMut> for DataObject {}
impl Cast<dyn DataStoreReferenceType> for DataObject {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataObject {}
impl Cast<dyn DocumentationType> for DataObject {}
impl Cast<dyn DocumentationTypeMut> for DataObject {}
impl Cast<dyn EndEventType> for DataObject {}
impl Cast<dyn EndEventTypeMut> for DataObject {}
impl Cast<dyn EndPointType> for DataObject {}
impl Cast<dyn EndPointTypeMut> for DataObject {}
impl Cast<dyn ErrorType> for DataObject {}
impl Cast<dyn ErrorTypeMut> for DataObject {}
impl Cast<dyn ErrorEventDefinitionType> for DataObject {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn EscalationType> for DataObject {}
impl Cast<dyn EscalationTypeMut> for DataObject {}
impl Cast<dyn EscalationEventDefinitionType> for DataObject {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn EventType> for DataObject {}
impl Cast<dyn EventTypeMut> for DataObject {}
impl Cast<dyn EventBasedGatewayType> for DataObject {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataObject {}
impl Cast<dyn EventDefinitionType> for DataObject {}
impl Cast<dyn EventDefinitionTypeMut> for DataObject {}
impl Cast<dyn ExclusiveGatewayType> for DataObject {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataObject {}
impl Cast<dyn ExpressionType> for DataObject {}
impl Cast<dyn ExpressionTypeMut> for DataObject {}
impl Cast<dyn ExtensionType> for DataObject {}
impl Cast<dyn ExtensionTypeMut> for DataObject {}
impl Cast<dyn ExtensionElementsType> for DataObject {}
impl Cast<dyn ExtensionElementsTypeMut> for DataObject {}
impl Cast<dyn FlowElementType> for DataObject {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for DataObject {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for DataObject {}
impl Cast<dyn FlowNodeTypeMut> for DataObject {}
impl Cast<dyn FormalExpressionType> for DataObject {}
impl Cast<dyn FormalExpressionTypeMut> for DataObject {}
impl Cast<dyn GatewayType> for DataObject {}
impl Cast<dyn GatewayTypeMut> for DataObject {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataObject {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataObject {}
impl Cast<dyn GlobalChoreographyTaskType> for DataObject {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataObject {}
impl Cast<dyn GlobalConversationType> for DataObject {}
impl Cast<dyn GlobalConversationTypeMut> for DataObject {}
impl Cast<dyn GlobalManualTaskType> for DataObject {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataObject {}
impl Cast<dyn GlobalScriptTaskType> for DataObject {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataObject {}
impl Cast<dyn GlobalTaskType> for DataObject {}
impl Cast<dyn GlobalTaskTypeMut> for DataObject {}
impl Cast<dyn GlobalUserTaskType> for DataObject {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataObject {}
impl Cast<dyn GroupType> for DataObject {}
impl Cast<dyn GroupTypeMut> for DataObject {}
impl Cast<dyn HumanPerformerType> for DataObject {}
impl Cast<dyn HumanPerformerTypeMut> for DataObject {}
impl Cast<dyn ImplicitThrowEventType> for DataObject {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataObject {}
impl Cast<dyn InclusiveGatewayType> for DataObject {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataObject {}
impl Cast<dyn InputSetType> for DataObject {}
impl Cast<dyn InputSetTypeMut> for DataObject {}
impl Cast<dyn InterfaceType> for DataObject {}
impl Cast<dyn InterfaceTypeMut> for DataObject {}
impl Cast<dyn IntermediateCatchEventType> for DataObject {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataObject {}
impl Cast<dyn IntermediateThrowEventType> for DataObject {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataObject {}
impl Cast<dyn InputOutputBindingType> for DataObject {}
impl Cast<dyn InputOutputBindingTypeMut> for DataObject {}
impl Cast<dyn InputOutputSpecificationType> for DataObject {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataObject {}
impl Cast<dyn ItemDefinitionType> for DataObject {}
impl Cast<dyn ItemDefinitionTypeMut> for DataObject {}
impl Cast<dyn LaneType> for DataObject {}
impl Cast<dyn LaneTypeMut> for DataObject {}
impl Cast<dyn LaneSetType> for DataObject {}
impl Cast<dyn LaneSetTypeMut> for DataObject {}
impl Cast<dyn LinkEventDefinitionType> for DataObject {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn LoopCharacteristicsType> for DataObject {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataObject {}
impl Cast<dyn ManualTaskType> for DataObject {}
impl Cast<dyn ManualTaskTypeMut> for DataObject {}
impl Cast<dyn MessageType> for DataObject {}
impl Cast<dyn MessageTypeMut> for DataObject {}
impl Cast<dyn MessageEventDefinitionType> for DataObject {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn MessageFlowType> for DataObject {}
impl Cast<dyn MessageFlowTypeMut> for DataObject {}
impl Cast<dyn MessageFlowAssociationType> for DataObject {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataObject {}
impl Cast<dyn MonitoringType> for DataObject {}
impl Cast<dyn MonitoringTypeMut> for DataObject {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataObject {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataObject {}
impl Cast<dyn OperationType> for DataObject {}
impl Cast<dyn OperationTypeMut> for DataObject {}
impl Cast<dyn OutputSetType> for DataObject {}
impl Cast<dyn OutputSetTypeMut> for DataObject {}
impl Cast<dyn ParallelGatewayType> for DataObject {}
impl Cast<dyn ParallelGatewayTypeMut> for DataObject {}
impl Cast<dyn ParticipantType> for DataObject {}
impl Cast<dyn ParticipantTypeMut> for DataObject {}
impl Cast<dyn ParticipantAssociationType> for DataObject {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataObject {}
impl Cast<dyn ParticipantMultiplicityType> for DataObject {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataObject {}
impl Cast<dyn PartnerEntityType> for DataObject {}
impl Cast<dyn PartnerEntityTypeMut> for DataObject {}
impl Cast<dyn PartnerRoleType> for DataObject {}
impl Cast<dyn PartnerRoleTypeMut> for DataObject {}
impl Cast<dyn PerformerType> for DataObject {}
impl Cast<dyn PerformerTypeMut> for DataObject {}
impl Cast<dyn PotentialOwnerType> for DataObject {}
impl Cast<dyn PotentialOwnerTypeMut> for DataObject {}
impl Cast<dyn ProcessType> for DataObject {}
impl Cast<dyn ProcessTypeMut> for DataObject {}
impl Cast<dyn PropertyType> for DataObject {}
impl Cast<dyn PropertyTypeMut> for DataObject {}
impl Cast<dyn ReceiveTaskType> for DataObject {}
impl Cast<dyn ReceiveTaskTypeMut> for DataObject {}
impl Cast<dyn RelationshipType> for DataObject {}
impl Cast<dyn RelationshipTypeMut> for DataObject {}
impl Cast<dyn RenderingType> for DataObject {}
impl Cast<dyn RenderingTypeMut> for DataObject {}
impl Cast<dyn ResourceType> for DataObject {}
impl Cast<dyn ResourceTypeMut> for DataObject {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataObject {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataObject {}
impl Cast<dyn ResourceParameterType> for DataObject {}
impl Cast<dyn ResourceParameterTypeMut> for DataObject {}
impl Cast<dyn ResourceParameterBindingType> for DataObject {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataObject {}
impl Cast<dyn ResourceRoleType> for DataObject {}
impl Cast<dyn ResourceRoleTypeMut> for DataObject {}
impl Cast<dyn RootElementType> for DataObject {}
impl Cast<dyn RootElementTypeMut> for DataObject {}
impl Cast<dyn ScriptTaskType> for DataObject {}
impl Cast<dyn ScriptTaskTypeMut> for DataObject {}
impl Cast<dyn ScriptType> for DataObject {}
impl Cast<dyn ScriptTypeMut> for DataObject {}
impl Cast<dyn SendTaskType> for DataObject {}
impl Cast<dyn SendTaskTypeMut> for DataObject {}
impl Cast<dyn SequenceFlowType> for DataObject {}
impl Cast<dyn SequenceFlowTypeMut> for DataObject {}
impl Cast<dyn ServiceTaskType> for DataObject {}
impl Cast<dyn ServiceTaskTypeMut> for DataObject {}
impl Cast<dyn SignalType> for DataObject {}
impl Cast<dyn SignalTypeMut> for DataObject {}
impl Cast<dyn SignalEventDefinitionType> for DataObject {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataObject {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataObject {}
impl Cast<dyn StartEventType> for DataObject {}
impl Cast<dyn StartEventTypeMut> for DataObject {}
impl Cast<dyn SubChoreographyType> for DataObject {}
impl Cast<dyn SubChoreographyTypeMut> for DataObject {}
impl Cast<dyn SubConversationType> for DataObject {}
impl Cast<dyn SubConversationTypeMut> for DataObject {}
impl Cast<dyn SubProcessType> for DataObject {}
impl Cast<dyn SubProcessTypeMut> for DataObject {}
impl Cast<dyn TaskType> for DataObject {}
impl Cast<dyn TaskTypeMut> for DataObject {}
impl Cast<dyn TerminateEventDefinitionType> for DataObject {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn TextAnnotationType> for DataObject {}
impl Cast<dyn TextAnnotationTypeMut> for DataObject {}
impl Cast<dyn TextType> for DataObject {}
impl Cast<dyn TextTypeMut> for DataObject {}
impl Cast<dyn ThrowEventType> for DataObject {}
impl Cast<dyn ThrowEventTypeMut> for DataObject {}
impl Cast<dyn TimerEventDefinitionType> for DataObject {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataObject {}
impl Cast<dyn TransactionType> for DataObject {}
impl Cast<dyn TransactionTypeMut> for DataObject {}
impl Cast<dyn UserTaskType> for DataObject {}
impl Cast<dyn UserTaskTypeMut> for DataObject {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataObjectReference")]
pub struct DataObjectReference {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataObjectReferenceType",rg*="item_subject_ref","DataObjectReferenceTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(attr = "dataObjectRef")]
    #[tia("DataObjectReferenceType",rg*="data_object_ref","DataObjectReferenceTypeMut",s)]
    pub data_object_ref: Option<String>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataObjectReferenceType",rg*="data_state","DataObjectReferenceTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataObjectReference {
    fn element(&self) -> Element {
        Element::DataObjectReference
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataObjectReference {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataObjectReference`
pub trait DataObjectReferenceType: FlowElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of attribute `dataObjectRef`
    fn data_object_ref(&self) -> &Option<String>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataObjectReferenceType);
impl_downcast!(DataObjectReferenceType);
/// Mutable access to `dataObjectReference`
pub trait DataObjectReferenceTypeMut:
    FlowElementTypeMut + Downcast + Debug + Send + DynClone + DataObjectReferenceType
{
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Set value of attribute `dataObjectRef`
    fn set_data_object_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataObjectReferenceTypeMut);
impl_downcast!(DataObjectReferenceTypeMut);
impl Cast<dyn DefinitionsType> for DataObjectReference {}
impl Cast<dyn DefinitionsTypeMut> for DataObjectReference {}
impl Cast<dyn ImportType> for DataObjectReference {}
impl Cast<dyn ImportTypeMut> for DataObjectReference {}
impl Cast<dyn ActivityType> for DataObjectReference {}
impl Cast<dyn ActivityTypeMut> for DataObjectReference {}
impl Cast<dyn AdHocSubProcessType> for DataObjectReference {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataObjectReference {}
impl Cast<dyn ArtifactType> for DataObjectReference {}
impl Cast<dyn ArtifactTypeMut> for DataObjectReference {}
impl Cast<dyn AssignmentType> for DataObjectReference {}
impl Cast<dyn AssignmentTypeMut> for DataObjectReference {}
impl Cast<dyn AssociationType> for DataObjectReference {}
impl Cast<dyn AssociationTypeMut> for DataObjectReference {}
impl Cast<dyn AuditingType> for DataObjectReference {}
impl Cast<dyn AuditingTypeMut> for DataObjectReference {}
impl Cast<dyn BaseElementType> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataObjectReference {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataObjectReference {}
impl Cast<dyn BoundaryEventType> for DataObjectReference {}
impl Cast<dyn BoundaryEventTypeMut> for DataObjectReference {}
impl Cast<dyn BusinessRuleTaskType> for DataObjectReference {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataObjectReference {}
impl Cast<dyn CallableElementType> for DataObjectReference {}
impl Cast<dyn CallableElementTypeMut> for DataObjectReference {}
impl Cast<dyn CallActivityType> for DataObjectReference {}
impl Cast<dyn CallActivityTypeMut> for DataObjectReference {}
impl Cast<dyn CallChoreographyType> for DataObjectReference {}
impl Cast<dyn CallChoreographyTypeMut> for DataObjectReference {}
impl Cast<dyn CallConversationType> for DataObjectReference {}
impl Cast<dyn CallConversationTypeMut> for DataObjectReference {}
impl Cast<dyn CancelEventDefinitionType> for DataObjectReference {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn CatchEventType> for DataObjectReference {}
impl Cast<dyn CatchEventTypeMut> for DataObjectReference {}
impl Cast<dyn CategoryType> for DataObjectReference {}
impl Cast<dyn CategoryTypeMut> for DataObjectReference {}
impl Cast<dyn CategoryValueType> for DataObjectReference {}
impl Cast<dyn CategoryValueTypeMut> for DataObjectReference {}
impl Cast<dyn ChoreographyType> for DataObjectReference {}
impl Cast<dyn ChoreographyTypeMut> for DataObjectReference {}
impl Cast<dyn ChoreographyActivityType> for DataObjectReference {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataObjectReference {}
impl Cast<dyn ChoreographyTaskType> for DataObjectReference {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataObjectReference {}
impl Cast<dyn CollaborationType> for DataObjectReference {}
impl Cast<dyn CollaborationTypeMut> for DataObjectReference {}
impl Cast<dyn CompensateEventDefinitionType> for DataObjectReference {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataObjectReference {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn ComplexGatewayType> for DataObjectReference {}
impl Cast<dyn ComplexGatewayTypeMut> for DataObjectReference {}
impl Cast<dyn ConditionalEventDefinitionType> for DataObjectReference {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn ConversationType> for DataObjectReference {}
impl Cast<dyn ConversationTypeMut> for DataObjectReference {}
impl Cast<dyn ConversationAssociationType> for DataObjectReference {}
impl Cast<dyn ConversationAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn ConversationLinkType> for DataObjectReference {}
impl Cast<dyn ConversationLinkTypeMut> for DataObjectReference {}
impl Cast<dyn ConversationNodeType> for DataObjectReference {}
impl Cast<dyn ConversationNodeTypeMut> for DataObjectReference {}
impl Cast<dyn CorrelationKeyType> for DataObjectReference {}
impl Cast<dyn CorrelationKeyTypeMut> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyType> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyBindingType> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataObjectReference {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataObjectReference {}
impl Cast<dyn CorrelationSubscriptionType> for DataObjectReference {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataObjectReference {}
impl Cast<dyn DataAssociationType> for DataObjectReference {}
impl Cast<dyn DataAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn DataInputType> for DataObjectReference {}
impl Cast<dyn DataInputTypeMut> for DataObjectReference {}
impl Cast<dyn DataInputAssociationType> for DataObjectReference {}
impl Cast<dyn DataInputAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn DataObjectType> for DataObjectReference {}
impl Cast<dyn DataObjectTypeMut> for DataObjectReference {}
impl Cast<dyn DataObjectReferenceType> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataOutputType> for DataObjectReference {}
impl Cast<dyn DataOutputTypeMut> for DataObjectReference {}
impl Cast<dyn DataOutputAssociationType> for DataObjectReference {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn DataStateType> for DataObjectReference {}
impl Cast<dyn DataStateTypeMut> for DataObjectReference {}
impl Cast<dyn DataStoreType> for DataObjectReference {}
impl Cast<dyn DataStoreTypeMut> for DataObjectReference {}
impl Cast<dyn DataStoreReferenceType> for DataObjectReference {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataObjectReference {}
impl Cast<dyn DocumentationType> for DataObjectReference {}
impl Cast<dyn DocumentationTypeMut> for DataObjectReference {}
impl Cast<dyn EndEventType> for DataObjectReference {}
impl Cast<dyn EndEventTypeMut> for DataObjectReference {}
impl Cast<dyn EndPointType> for DataObjectReference {}
impl Cast<dyn EndPointTypeMut> for DataObjectReference {}
impl Cast<dyn ErrorType> for DataObjectReference {}
impl Cast<dyn ErrorTypeMut> for DataObjectReference {}
impl Cast<dyn ErrorEventDefinitionType> for DataObjectReference {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn EscalationType> for DataObjectReference {}
impl Cast<dyn EscalationTypeMut> for DataObjectReference {}
impl Cast<dyn EscalationEventDefinitionType> for DataObjectReference {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn EventType> for DataObjectReference {}
impl Cast<dyn EventTypeMut> for DataObjectReference {}
impl Cast<dyn EventBasedGatewayType> for DataObjectReference {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataObjectReference {}
impl Cast<dyn EventDefinitionType> for DataObjectReference {}
impl Cast<dyn EventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn ExclusiveGatewayType> for DataObjectReference {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataObjectReference {}
impl Cast<dyn ExpressionType> for DataObjectReference {}
impl Cast<dyn ExpressionTypeMut> for DataObjectReference {}
impl Cast<dyn ExtensionType> for DataObjectReference {}
impl Cast<dyn ExtensionTypeMut> for DataObjectReference {}
impl Cast<dyn ExtensionElementsType> for DataObjectReference {}
impl Cast<dyn ExtensionElementsTypeMut> for DataObjectReference {}
impl Cast<dyn FlowElementType> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for DataObjectReference {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for DataObjectReference {}
impl Cast<dyn FlowNodeTypeMut> for DataObjectReference {}
impl Cast<dyn FormalExpressionType> for DataObjectReference {}
impl Cast<dyn FormalExpressionTypeMut> for DataObjectReference {}
impl Cast<dyn GatewayType> for DataObjectReference {}
impl Cast<dyn GatewayTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataObjectReference {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalChoreographyTaskType> for DataObjectReference {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalConversationType> for DataObjectReference {}
impl Cast<dyn GlobalConversationTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalManualTaskType> for DataObjectReference {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalScriptTaskType> for DataObjectReference {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalTaskType> for DataObjectReference {}
impl Cast<dyn GlobalTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GlobalUserTaskType> for DataObjectReference {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataObjectReference {}
impl Cast<dyn GroupType> for DataObjectReference {}
impl Cast<dyn GroupTypeMut> for DataObjectReference {}
impl Cast<dyn HumanPerformerType> for DataObjectReference {}
impl Cast<dyn HumanPerformerTypeMut> for DataObjectReference {}
impl Cast<dyn ImplicitThrowEventType> for DataObjectReference {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataObjectReference {}
impl Cast<dyn InclusiveGatewayType> for DataObjectReference {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataObjectReference {}
impl Cast<dyn InputSetType> for DataObjectReference {}
impl Cast<dyn InputSetTypeMut> for DataObjectReference {}
impl Cast<dyn InterfaceType> for DataObjectReference {}
impl Cast<dyn InterfaceTypeMut> for DataObjectReference {}
impl Cast<dyn IntermediateCatchEventType> for DataObjectReference {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataObjectReference {}
impl Cast<dyn IntermediateThrowEventType> for DataObjectReference {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataObjectReference {}
impl Cast<dyn InputOutputBindingType> for DataObjectReference {}
impl Cast<dyn InputOutputBindingTypeMut> for DataObjectReference {}
impl Cast<dyn InputOutputSpecificationType> for DataObjectReference {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataObjectReference {}
impl Cast<dyn ItemDefinitionType> for DataObjectReference {}
impl Cast<dyn ItemDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn LaneType> for DataObjectReference {}
impl Cast<dyn LaneTypeMut> for DataObjectReference {}
impl Cast<dyn LaneSetType> for DataObjectReference {}
impl Cast<dyn LaneSetTypeMut> for DataObjectReference {}
impl Cast<dyn LinkEventDefinitionType> for DataObjectReference {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn LoopCharacteristicsType> for DataObjectReference {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataObjectReference {}
impl Cast<dyn ManualTaskType> for DataObjectReference {}
impl Cast<dyn ManualTaskTypeMut> for DataObjectReference {}
impl Cast<dyn MessageType> for DataObjectReference {}
impl Cast<dyn MessageTypeMut> for DataObjectReference {}
impl Cast<dyn MessageEventDefinitionType> for DataObjectReference {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn MessageFlowType> for DataObjectReference {}
impl Cast<dyn MessageFlowTypeMut> for DataObjectReference {}
impl Cast<dyn MessageFlowAssociationType> for DataObjectReference {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn MonitoringType> for DataObjectReference {}
impl Cast<dyn MonitoringTypeMut> for DataObjectReference {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataObjectReference {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataObjectReference {}
impl Cast<dyn OperationType> for DataObjectReference {}
impl Cast<dyn OperationTypeMut> for DataObjectReference {}
impl Cast<dyn OutputSetType> for DataObjectReference {}
impl Cast<dyn OutputSetTypeMut> for DataObjectReference {}
impl Cast<dyn ParallelGatewayType> for DataObjectReference {}
impl Cast<dyn ParallelGatewayTypeMut> for DataObjectReference {}
impl Cast<dyn ParticipantType> for DataObjectReference {}
impl Cast<dyn ParticipantTypeMut> for DataObjectReference {}
impl Cast<dyn ParticipantAssociationType> for DataObjectReference {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataObjectReference {}
impl Cast<dyn ParticipantMultiplicityType> for DataObjectReference {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataObjectReference {}
impl Cast<dyn PartnerEntityType> for DataObjectReference {}
impl Cast<dyn PartnerEntityTypeMut> for DataObjectReference {}
impl Cast<dyn PartnerRoleType> for DataObjectReference {}
impl Cast<dyn PartnerRoleTypeMut> for DataObjectReference {}
impl Cast<dyn PerformerType> for DataObjectReference {}
impl Cast<dyn PerformerTypeMut> for DataObjectReference {}
impl Cast<dyn PotentialOwnerType> for DataObjectReference {}
impl Cast<dyn PotentialOwnerTypeMut> for DataObjectReference {}
impl Cast<dyn ProcessType> for DataObjectReference {}
impl Cast<dyn ProcessTypeMut> for DataObjectReference {}
impl Cast<dyn PropertyType> for DataObjectReference {}
impl Cast<dyn PropertyTypeMut> for DataObjectReference {}
impl Cast<dyn ReceiveTaskType> for DataObjectReference {}
impl Cast<dyn ReceiveTaskTypeMut> for DataObjectReference {}
impl Cast<dyn RelationshipType> for DataObjectReference {}
impl Cast<dyn RelationshipTypeMut> for DataObjectReference {}
impl Cast<dyn RenderingType> for DataObjectReference {}
impl Cast<dyn RenderingTypeMut> for DataObjectReference {}
impl Cast<dyn ResourceType> for DataObjectReference {}
impl Cast<dyn ResourceTypeMut> for DataObjectReference {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataObjectReference {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataObjectReference {}
impl Cast<dyn ResourceParameterType> for DataObjectReference {}
impl Cast<dyn ResourceParameterTypeMut> for DataObjectReference {}
impl Cast<dyn ResourceParameterBindingType> for DataObjectReference {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataObjectReference {}
impl Cast<dyn ResourceRoleType> for DataObjectReference {}
impl Cast<dyn ResourceRoleTypeMut> for DataObjectReference {}
impl Cast<dyn RootElementType> for DataObjectReference {}
impl Cast<dyn RootElementTypeMut> for DataObjectReference {}
impl Cast<dyn ScriptTaskType> for DataObjectReference {}
impl Cast<dyn ScriptTaskTypeMut> for DataObjectReference {}
impl Cast<dyn ScriptType> for DataObjectReference {}
impl Cast<dyn ScriptTypeMut> for DataObjectReference {}
impl Cast<dyn SendTaskType> for DataObjectReference {}
impl Cast<dyn SendTaskTypeMut> for DataObjectReference {}
impl Cast<dyn SequenceFlowType> for DataObjectReference {}
impl Cast<dyn SequenceFlowTypeMut> for DataObjectReference {}
impl Cast<dyn ServiceTaskType> for DataObjectReference {}
impl Cast<dyn ServiceTaskTypeMut> for DataObjectReference {}
impl Cast<dyn SignalType> for DataObjectReference {}
impl Cast<dyn SignalTypeMut> for DataObjectReference {}
impl Cast<dyn SignalEventDefinitionType> for DataObjectReference {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataObjectReference {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataObjectReference {}
impl Cast<dyn StartEventType> for DataObjectReference {}
impl Cast<dyn StartEventTypeMut> for DataObjectReference {}
impl Cast<dyn SubChoreographyType> for DataObjectReference {}
impl Cast<dyn SubChoreographyTypeMut> for DataObjectReference {}
impl Cast<dyn SubConversationType> for DataObjectReference {}
impl Cast<dyn SubConversationTypeMut> for DataObjectReference {}
impl Cast<dyn SubProcessType> for DataObjectReference {}
impl Cast<dyn SubProcessTypeMut> for DataObjectReference {}
impl Cast<dyn TaskType> for DataObjectReference {}
impl Cast<dyn TaskTypeMut> for DataObjectReference {}
impl Cast<dyn TerminateEventDefinitionType> for DataObjectReference {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn TextAnnotationType> for DataObjectReference {}
impl Cast<dyn TextAnnotationTypeMut> for DataObjectReference {}
impl Cast<dyn TextType> for DataObjectReference {}
impl Cast<dyn TextTypeMut> for DataObjectReference {}
impl Cast<dyn ThrowEventType> for DataObjectReference {}
impl Cast<dyn ThrowEventTypeMut> for DataObjectReference {}
impl Cast<dyn TimerEventDefinitionType> for DataObjectReference {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataObjectReference {}
impl Cast<dyn TransactionType> for DataObjectReference {}
impl Cast<dyn TransactionTypeMut> for DataObjectReference {}
impl Cast<dyn UserTaskType> for DataObjectReference {}
impl Cast<dyn UserTaskTypeMut> for DataObjectReference {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataOutput")]
pub struct DataOutput {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("DataOutputType",rg*="name","DataOutputTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataOutputType",rg*="item_subject_ref","DataOutputTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(attr = "isCollection")]
    #[tia("DataOutputType",rg*="is_collection","DataOutputTypeMut",s)]
    pub is_collection: Option<bool>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataOutputType",rg*="data_state","DataOutputTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataOutput {
    fn element(&self) -> Element {
        Element::DataOutput
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataOutput {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataOutput`
pub trait DataOutputType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of attribute `isCollection`
    fn is_collection(&self) -> &Option<bool>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataOutputType);
impl_downcast!(DataOutputType);
/// Mutable access to `dataOutput`
pub trait DataOutputTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + DataOutputType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Set value of attribute `isCollection`
    fn set_is_collection(&mut self, value: Option<bool>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataOutputTypeMut);
impl_downcast!(DataOutputTypeMut);
impl Cast<dyn DefinitionsType> for DataOutput {}
impl Cast<dyn DefinitionsTypeMut> for DataOutput {}
impl Cast<dyn ImportType> for DataOutput {}
impl Cast<dyn ImportTypeMut> for DataOutput {}
impl Cast<dyn ActivityType> for DataOutput {}
impl Cast<dyn ActivityTypeMut> for DataOutput {}
impl Cast<dyn AdHocSubProcessType> for DataOutput {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataOutput {}
impl Cast<dyn ArtifactType> for DataOutput {}
impl Cast<dyn ArtifactTypeMut> for DataOutput {}
impl Cast<dyn AssignmentType> for DataOutput {}
impl Cast<dyn AssignmentTypeMut> for DataOutput {}
impl Cast<dyn AssociationType> for DataOutput {}
impl Cast<dyn AssociationTypeMut> for DataOutput {}
impl Cast<dyn AuditingType> for DataOutput {}
impl Cast<dyn AuditingTypeMut> for DataOutput {}
impl Cast<dyn BaseElementType> for DataOutput {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataOutput {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataOutput {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataOutput {}
impl Cast<dyn BoundaryEventType> for DataOutput {}
impl Cast<dyn BoundaryEventTypeMut> for DataOutput {}
impl Cast<dyn BusinessRuleTaskType> for DataOutput {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataOutput {}
impl Cast<dyn CallableElementType> for DataOutput {}
impl Cast<dyn CallableElementTypeMut> for DataOutput {}
impl Cast<dyn CallActivityType> for DataOutput {}
impl Cast<dyn CallActivityTypeMut> for DataOutput {}
impl Cast<dyn CallChoreographyType> for DataOutput {}
impl Cast<dyn CallChoreographyTypeMut> for DataOutput {}
impl Cast<dyn CallConversationType> for DataOutput {}
impl Cast<dyn CallConversationTypeMut> for DataOutput {}
impl Cast<dyn CancelEventDefinitionType> for DataOutput {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn CatchEventType> for DataOutput {}
impl Cast<dyn CatchEventTypeMut> for DataOutput {}
impl Cast<dyn CategoryType> for DataOutput {}
impl Cast<dyn CategoryTypeMut> for DataOutput {}
impl Cast<dyn CategoryValueType> for DataOutput {}
impl Cast<dyn CategoryValueTypeMut> for DataOutput {}
impl Cast<dyn ChoreographyType> for DataOutput {}
impl Cast<dyn ChoreographyTypeMut> for DataOutput {}
impl Cast<dyn ChoreographyActivityType> for DataOutput {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataOutput {}
impl Cast<dyn ChoreographyTaskType> for DataOutput {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataOutput {}
impl Cast<dyn CollaborationType> for DataOutput {}
impl Cast<dyn CollaborationTypeMut> for DataOutput {}
impl Cast<dyn CompensateEventDefinitionType> for DataOutput {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataOutput {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataOutput {}
impl Cast<dyn ComplexGatewayType> for DataOutput {}
impl Cast<dyn ComplexGatewayTypeMut> for DataOutput {}
impl Cast<dyn ConditionalEventDefinitionType> for DataOutput {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn ConversationType> for DataOutput {}
impl Cast<dyn ConversationTypeMut> for DataOutput {}
impl Cast<dyn ConversationAssociationType> for DataOutput {}
impl Cast<dyn ConversationAssociationTypeMut> for DataOutput {}
impl Cast<dyn ConversationLinkType> for DataOutput {}
impl Cast<dyn ConversationLinkTypeMut> for DataOutput {}
impl Cast<dyn ConversationNodeType> for DataOutput {}
impl Cast<dyn ConversationNodeTypeMut> for DataOutput {}
impl Cast<dyn CorrelationKeyType> for DataOutput {}
impl Cast<dyn CorrelationKeyTypeMut> for DataOutput {}
impl Cast<dyn CorrelationPropertyType> for DataOutput {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataOutput {}
impl Cast<dyn CorrelationPropertyBindingType> for DataOutput {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataOutput {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataOutput {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataOutput {}
impl Cast<dyn CorrelationSubscriptionType> for DataOutput {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataOutput {}
impl Cast<dyn DataAssociationType> for DataOutput {}
impl Cast<dyn DataAssociationTypeMut> for DataOutput {}
impl Cast<dyn DataInputType> for DataOutput {}
impl Cast<dyn DataInputTypeMut> for DataOutput {}
impl Cast<dyn DataInputAssociationType> for DataOutput {}
impl Cast<dyn DataInputAssociationTypeMut> for DataOutput {}
impl Cast<dyn DataObjectType> for DataOutput {}
impl Cast<dyn DataObjectTypeMut> for DataOutput {}
impl Cast<dyn DataObjectReferenceType> for DataOutput {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataOutput {}
impl Cast<dyn DataOutputType> for DataOutput {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataOutputTypeMut> for DataOutput {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataOutputAssociationType> for DataOutput {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataOutput {}
impl Cast<dyn DataStateType> for DataOutput {}
impl Cast<dyn DataStateTypeMut> for DataOutput {}
impl Cast<dyn DataStoreType> for DataOutput {}
impl Cast<dyn DataStoreTypeMut> for DataOutput {}
impl Cast<dyn DataStoreReferenceType> for DataOutput {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataOutput {}
impl Cast<dyn DocumentationType> for DataOutput {}
impl Cast<dyn DocumentationTypeMut> for DataOutput {}
impl Cast<dyn EndEventType> for DataOutput {}
impl Cast<dyn EndEventTypeMut> for DataOutput {}
impl Cast<dyn EndPointType> for DataOutput {}
impl Cast<dyn EndPointTypeMut> for DataOutput {}
impl Cast<dyn ErrorType> for DataOutput {}
impl Cast<dyn ErrorTypeMut> for DataOutput {}
impl Cast<dyn ErrorEventDefinitionType> for DataOutput {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn EscalationType> for DataOutput {}
impl Cast<dyn EscalationTypeMut> for DataOutput {}
impl Cast<dyn EscalationEventDefinitionType> for DataOutput {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn EventType> for DataOutput {}
impl Cast<dyn EventTypeMut> for DataOutput {}
impl Cast<dyn EventBasedGatewayType> for DataOutput {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataOutput {}
impl Cast<dyn EventDefinitionType> for DataOutput {}
impl Cast<dyn EventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn ExclusiveGatewayType> for DataOutput {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataOutput {}
impl Cast<dyn ExpressionType> for DataOutput {}
impl Cast<dyn ExpressionTypeMut> for DataOutput {}
impl Cast<dyn ExtensionType> for DataOutput {}
impl Cast<dyn ExtensionTypeMut> for DataOutput {}
impl Cast<dyn ExtensionElementsType> for DataOutput {}
impl Cast<dyn ExtensionElementsTypeMut> for DataOutput {}
impl Cast<dyn FlowElementType> for DataOutput {}
impl Cast<dyn FlowElementTypeMut> for DataOutput {}
impl Cast<dyn FlowNodeType> for DataOutput {}
impl Cast<dyn FlowNodeTypeMut> for DataOutput {}
impl Cast<dyn FormalExpressionType> for DataOutput {}
impl Cast<dyn FormalExpressionTypeMut> for DataOutput {}
impl Cast<dyn GatewayType> for DataOutput {}
impl Cast<dyn GatewayTypeMut> for DataOutput {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataOutput {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataOutput {}
impl Cast<dyn GlobalChoreographyTaskType> for DataOutput {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataOutput {}
impl Cast<dyn GlobalConversationType> for DataOutput {}
impl Cast<dyn GlobalConversationTypeMut> for DataOutput {}
impl Cast<dyn GlobalManualTaskType> for DataOutput {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataOutput {}
impl Cast<dyn GlobalScriptTaskType> for DataOutput {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataOutput {}
impl Cast<dyn GlobalTaskType> for DataOutput {}
impl Cast<dyn GlobalTaskTypeMut> for DataOutput {}
impl Cast<dyn GlobalUserTaskType> for DataOutput {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataOutput {}
impl Cast<dyn GroupType> for DataOutput {}
impl Cast<dyn GroupTypeMut> for DataOutput {}
impl Cast<dyn HumanPerformerType> for DataOutput {}
impl Cast<dyn HumanPerformerTypeMut> for DataOutput {}
impl Cast<dyn ImplicitThrowEventType> for DataOutput {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataOutput {}
impl Cast<dyn InclusiveGatewayType> for DataOutput {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataOutput {}
impl Cast<dyn InputSetType> for DataOutput {}
impl Cast<dyn InputSetTypeMut> for DataOutput {}
impl Cast<dyn InterfaceType> for DataOutput {}
impl Cast<dyn InterfaceTypeMut> for DataOutput {}
impl Cast<dyn IntermediateCatchEventType> for DataOutput {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataOutput {}
impl Cast<dyn IntermediateThrowEventType> for DataOutput {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataOutput {}
impl Cast<dyn InputOutputBindingType> for DataOutput {}
impl Cast<dyn InputOutputBindingTypeMut> for DataOutput {}
impl Cast<dyn InputOutputSpecificationType> for DataOutput {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataOutput {}
impl Cast<dyn ItemDefinitionType> for DataOutput {}
impl Cast<dyn ItemDefinitionTypeMut> for DataOutput {}
impl Cast<dyn LaneType> for DataOutput {}
impl Cast<dyn LaneTypeMut> for DataOutput {}
impl Cast<dyn LaneSetType> for DataOutput {}
impl Cast<dyn LaneSetTypeMut> for DataOutput {}
impl Cast<dyn LinkEventDefinitionType> for DataOutput {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn LoopCharacteristicsType> for DataOutput {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataOutput {}
impl Cast<dyn ManualTaskType> for DataOutput {}
impl Cast<dyn ManualTaskTypeMut> for DataOutput {}
impl Cast<dyn MessageType> for DataOutput {}
impl Cast<dyn MessageTypeMut> for DataOutput {}
impl Cast<dyn MessageEventDefinitionType> for DataOutput {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn MessageFlowType> for DataOutput {}
impl Cast<dyn MessageFlowTypeMut> for DataOutput {}
impl Cast<dyn MessageFlowAssociationType> for DataOutput {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataOutput {}
impl Cast<dyn MonitoringType> for DataOutput {}
impl Cast<dyn MonitoringTypeMut> for DataOutput {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataOutput {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataOutput {}
impl Cast<dyn OperationType> for DataOutput {}
impl Cast<dyn OperationTypeMut> for DataOutput {}
impl Cast<dyn OutputSetType> for DataOutput {}
impl Cast<dyn OutputSetTypeMut> for DataOutput {}
impl Cast<dyn ParallelGatewayType> for DataOutput {}
impl Cast<dyn ParallelGatewayTypeMut> for DataOutput {}
impl Cast<dyn ParticipantType> for DataOutput {}
impl Cast<dyn ParticipantTypeMut> for DataOutput {}
impl Cast<dyn ParticipantAssociationType> for DataOutput {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataOutput {}
impl Cast<dyn ParticipantMultiplicityType> for DataOutput {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataOutput {}
impl Cast<dyn PartnerEntityType> for DataOutput {}
impl Cast<dyn PartnerEntityTypeMut> for DataOutput {}
impl Cast<dyn PartnerRoleType> for DataOutput {}
impl Cast<dyn PartnerRoleTypeMut> for DataOutput {}
impl Cast<dyn PerformerType> for DataOutput {}
impl Cast<dyn PerformerTypeMut> for DataOutput {}
impl Cast<dyn PotentialOwnerType> for DataOutput {}
impl Cast<dyn PotentialOwnerTypeMut> for DataOutput {}
impl Cast<dyn ProcessType> for DataOutput {}
impl Cast<dyn ProcessTypeMut> for DataOutput {}
impl Cast<dyn PropertyType> for DataOutput {}
impl Cast<dyn PropertyTypeMut> for DataOutput {}
impl Cast<dyn ReceiveTaskType> for DataOutput {}
impl Cast<dyn ReceiveTaskTypeMut> for DataOutput {}
impl Cast<dyn RelationshipType> for DataOutput {}
impl Cast<dyn RelationshipTypeMut> for DataOutput {}
impl Cast<dyn RenderingType> for DataOutput {}
impl Cast<dyn RenderingTypeMut> for DataOutput {}
impl Cast<dyn ResourceType> for DataOutput {}
impl Cast<dyn ResourceTypeMut> for DataOutput {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataOutput {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataOutput {}
impl Cast<dyn ResourceParameterType> for DataOutput {}
impl Cast<dyn ResourceParameterTypeMut> for DataOutput {}
impl Cast<dyn ResourceParameterBindingType> for DataOutput {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataOutput {}
impl Cast<dyn ResourceRoleType> for DataOutput {}
impl Cast<dyn ResourceRoleTypeMut> for DataOutput {}
impl Cast<dyn RootElementType> for DataOutput {}
impl Cast<dyn RootElementTypeMut> for DataOutput {}
impl Cast<dyn ScriptTaskType> for DataOutput {}
impl Cast<dyn ScriptTaskTypeMut> for DataOutput {}
impl Cast<dyn ScriptType> for DataOutput {}
impl Cast<dyn ScriptTypeMut> for DataOutput {}
impl Cast<dyn SendTaskType> for DataOutput {}
impl Cast<dyn SendTaskTypeMut> for DataOutput {}
impl Cast<dyn SequenceFlowType> for DataOutput {}
impl Cast<dyn SequenceFlowTypeMut> for DataOutput {}
impl Cast<dyn ServiceTaskType> for DataOutput {}
impl Cast<dyn ServiceTaskTypeMut> for DataOutput {}
impl Cast<dyn SignalType> for DataOutput {}
impl Cast<dyn SignalTypeMut> for DataOutput {}
impl Cast<dyn SignalEventDefinitionType> for DataOutput {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataOutput {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataOutput {}
impl Cast<dyn StartEventType> for DataOutput {}
impl Cast<dyn StartEventTypeMut> for DataOutput {}
impl Cast<dyn SubChoreographyType> for DataOutput {}
impl Cast<dyn SubChoreographyTypeMut> for DataOutput {}
impl Cast<dyn SubConversationType> for DataOutput {}
impl Cast<dyn SubConversationTypeMut> for DataOutput {}
impl Cast<dyn SubProcessType> for DataOutput {}
impl Cast<dyn SubProcessTypeMut> for DataOutput {}
impl Cast<dyn TaskType> for DataOutput {}
impl Cast<dyn TaskTypeMut> for DataOutput {}
impl Cast<dyn TerminateEventDefinitionType> for DataOutput {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn TextAnnotationType> for DataOutput {}
impl Cast<dyn TextAnnotationTypeMut> for DataOutput {}
impl Cast<dyn TextType> for DataOutput {}
impl Cast<dyn TextTypeMut> for DataOutput {}
impl Cast<dyn ThrowEventType> for DataOutput {}
impl Cast<dyn ThrowEventTypeMut> for DataOutput {}
impl Cast<dyn TimerEventDefinitionType> for DataOutput {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataOutput {}
impl Cast<dyn TransactionType> for DataOutput {}
impl Cast<dyn TransactionTypeMut> for DataOutput {}
impl Cast<dyn UserTaskType> for DataOutput {}
impl Cast<dyn UserTaskTypeMut> for DataOutput {}
/// Wrapper for multiInstanceLoopCharacteristics::outputDataItem element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct MultiInstanceLoopCharacteristicsOutputDataItem(pub DataOutput);
impl<'a> XmlRead<'a> for MultiInstanceLoopCharacteristicsOutputDataItem {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(MultiInstanceLoopCharacteristicsOutputDataItem(
            DataOutput::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("outputDataItem", "dataOutput")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for MultiInstanceLoopCharacteristicsOutputDataItem {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataOutputAssociation")]
pub struct DataOutputAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(flatten_text = "bpmn:sourceRef")]
    #[tia("DataAssociationType",rg*="source_refs","DataAssociationTypeMut",s,rmg*="source_refs_mut")]
    pub source_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:targetRef")]
    #[tia("DataAssociationType",rg*="target_ref","DataAssociationTypeMut",s,rmg*="target_ref_mut")]
    pub target_ref: String,
    #[xml(child = "bpmn:transformation")]
    #[tia("DataAssociationType",rg*="transformation","DataAssociationTypeMut",s,rmg*="transformation_mut")]
    pub transformation: Option<DataAssociationTransformation>,
    #[xml(child = "bpmn:assignment")]
    #[tia("DataAssociationType",rg*="assignments","DataAssociationTypeMut",s,rmg*="assignments_mut")]
    pub assignments: Vec<Assignment>,
}
impl DocumentElement for DataOutputAssociation {
    fn element(&self) -> Element {
        Element::DataOutputAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataOutputAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl DataOutputAssociationType for DataOutputAssociation {}
impl DataOutputAssociationTypeMut for DataOutputAssociation {}
//

/// Access to `dataOutputAssociation`
pub trait DataOutputAssociationType:
    DataAssociationType + Downcast + Debug + Send + DynClone
{
}
dyn_clone::clone_trait_object!(DataOutputAssociationType);
impl_downcast!(DataOutputAssociationType);
/// Mutable access to `dataOutputAssociation`
pub trait DataOutputAssociationTypeMut:
    DataAssociationTypeMut + Downcast + Debug + Send + DynClone + DataOutputAssociationType
{
}
dyn_clone::clone_trait_object!(DataOutputAssociationTypeMut);
impl_downcast!(DataOutputAssociationTypeMut);
impl Cast<dyn DefinitionsType> for DataOutputAssociation {}
impl Cast<dyn DefinitionsTypeMut> for DataOutputAssociation {}
impl Cast<dyn ImportType> for DataOutputAssociation {}
impl Cast<dyn ImportTypeMut> for DataOutputAssociation {}
impl Cast<dyn ActivityType> for DataOutputAssociation {}
impl Cast<dyn ActivityTypeMut> for DataOutputAssociation {}
impl Cast<dyn AdHocSubProcessType> for DataOutputAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataOutputAssociation {}
impl Cast<dyn ArtifactType> for DataOutputAssociation {}
impl Cast<dyn ArtifactTypeMut> for DataOutputAssociation {}
impl Cast<dyn AssignmentType> for DataOutputAssociation {}
impl Cast<dyn AssignmentTypeMut> for DataOutputAssociation {}
impl Cast<dyn AssociationType> for DataOutputAssociation {}
impl Cast<dyn AssociationTypeMut> for DataOutputAssociation {}
impl Cast<dyn AuditingType> for DataOutputAssociation {}
impl Cast<dyn AuditingTypeMut> for DataOutputAssociation {}
impl Cast<dyn BaseElementType> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataOutputAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataOutputAssociation {}
impl Cast<dyn BoundaryEventType> for DataOutputAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn BusinessRuleTaskType> for DataOutputAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn CallableElementType> for DataOutputAssociation {}
impl Cast<dyn CallableElementTypeMut> for DataOutputAssociation {}
impl Cast<dyn CallActivityType> for DataOutputAssociation {}
impl Cast<dyn CallActivityTypeMut> for DataOutputAssociation {}
impl Cast<dyn CallChoreographyType> for DataOutputAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for DataOutputAssociation {}
impl Cast<dyn CallConversationType> for DataOutputAssociation {}
impl Cast<dyn CallConversationTypeMut> for DataOutputAssociation {}
impl Cast<dyn CancelEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn CatchEventType> for DataOutputAssociation {}
impl Cast<dyn CatchEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn CategoryType> for DataOutputAssociation {}
impl Cast<dyn CategoryTypeMut> for DataOutputAssociation {}
impl Cast<dyn CategoryValueType> for DataOutputAssociation {}
impl Cast<dyn CategoryValueTypeMut> for DataOutputAssociation {}
impl Cast<dyn ChoreographyType> for DataOutputAssociation {}
impl Cast<dyn ChoreographyTypeMut> for DataOutputAssociation {}
impl Cast<dyn ChoreographyActivityType> for DataOutputAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataOutputAssociation {}
impl Cast<dyn ChoreographyTaskType> for DataOutputAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn CollaborationType> for DataOutputAssociation {}
impl Cast<dyn CollaborationTypeMut> for DataOutputAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataOutputAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ComplexGatewayType> for DataOutputAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ConversationType> for DataOutputAssociation {}
impl Cast<dyn ConversationTypeMut> for DataOutputAssociation {}
impl Cast<dyn ConversationAssociationType> for DataOutputAssociation {}
impl Cast<dyn ConversationAssociationTypeMut> for DataOutputAssociation {}
impl Cast<dyn ConversationLinkType> for DataOutputAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for DataOutputAssociation {}
impl Cast<dyn ConversationNodeType> for DataOutputAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for DataOutputAssociation {}
impl Cast<dyn CorrelationKeyType> for DataOutputAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyType> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataOutputAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataOutputAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for DataOutputAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataAssociationType> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataAssociationTypeMut> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataInputType> for DataOutputAssociation {}
impl Cast<dyn DataInputTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataInputAssociationType> for DataOutputAssociation {}
impl Cast<dyn DataInputAssociationTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataObjectType> for DataOutputAssociation {}
impl Cast<dyn DataObjectTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataObjectReferenceType> for DataOutputAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataOutputType> for DataOutputAssociation {}
impl Cast<dyn DataOutputTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataOutputAssociationType> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for DataOutputAssociation {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStateType> for DataOutputAssociation {}
impl Cast<dyn DataStateTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataStoreType> for DataOutputAssociation {}
impl Cast<dyn DataStoreTypeMut> for DataOutputAssociation {}
impl Cast<dyn DataStoreReferenceType> for DataOutputAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataOutputAssociation {}
impl Cast<dyn DocumentationType> for DataOutputAssociation {}
impl Cast<dyn DocumentationTypeMut> for DataOutputAssociation {}
impl Cast<dyn EndEventType> for DataOutputAssociation {}
impl Cast<dyn EndEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn EndPointType> for DataOutputAssociation {}
impl Cast<dyn EndPointTypeMut> for DataOutputAssociation {}
impl Cast<dyn ErrorType> for DataOutputAssociation {}
impl Cast<dyn ErrorTypeMut> for DataOutputAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn EscalationType> for DataOutputAssociation {}
impl Cast<dyn EscalationTypeMut> for DataOutputAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn EventType> for DataOutputAssociation {}
impl Cast<dyn EventTypeMut> for DataOutputAssociation {}
impl Cast<dyn EventBasedGatewayType> for DataOutputAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn EventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ExclusiveGatewayType> for DataOutputAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn ExpressionType> for DataOutputAssociation {}
impl Cast<dyn ExpressionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ExtensionType> for DataOutputAssociation {}
impl Cast<dyn ExtensionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ExtensionElementsType> for DataOutputAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for DataOutputAssociation {}
impl Cast<dyn FlowElementType> for DataOutputAssociation {}
impl Cast<dyn FlowElementTypeMut> for DataOutputAssociation {}
impl Cast<dyn FlowNodeType> for DataOutputAssociation {}
impl Cast<dyn FlowNodeTypeMut> for DataOutputAssociation {}
impl Cast<dyn FormalExpressionType> for DataOutputAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for DataOutputAssociation {}
impl Cast<dyn GatewayType> for DataOutputAssociation {}
impl Cast<dyn GatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalConversationType> for DataOutputAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalManualTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalScriptTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GlobalUserTaskType> for DataOutputAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn GroupType> for DataOutputAssociation {}
impl Cast<dyn GroupTypeMut> for DataOutputAssociation {}
impl Cast<dyn HumanPerformerType> for DataOutputAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for DataOutputAssociation {}
impl Cast<dyn ImplicitThrowEventType> for DataOutputAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn InclusiveGatewayType> for DataOutputAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn InputSetType> for DataOutputAssociation {}
impl Cast<dyn InputSetTypeMut> for DataOutputAssociation {}
impl Cast<dyn InterfaceType> for DataOutputAssociation {}
impl Cast<dyn InterfaceTypeMut> for DataOutputAssociation {}
impl Cast<dyn IntermediateCatchEventType> for DataOutputAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn IntermediateThrowEventType> for DataOutputAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn InputOutputBindingType> for DataOutputAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for DataOutputAssociation {}
impl Cast<dyn InputOutputSpecificationType> for DataOutputAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataOutputAssociation {}
impl Cast<dyn ItemDefinitionType> for DataOutputAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn LaneType> for DataOutputAssociation {}
impl Cast<dyn LaneTypeMut> for DataOutputAssociation {}
impl Cast<dyn LaneSetType> for DataOutputAssociation {}
impl Cast<dyn LaneSetTypeMut> for DataOutputAssociation {}
impl Cast<dyn LinkEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn LoopCharacteristicsType> for DataOutputAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataOutputAssociation {}
impl Cast<dyn ManualTaskType> for DataOutputAssociation {}
impl Cast<dyn ManualTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn MessageType> for DataOutputAssociation {}
impl Cast<dyn MessageTypeMut> for DataOutputAssociation {}
impl Cast<dyn MessageEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn MessageFlowType> for DataOutputAssociation {}
impl Cast<dyn MessageFlowTypeMut> for DataOutputAssociation {}
impl Cast<dyn MessageFlowAssociationType> for DataOutputAssociation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataOutputAssociation {}
impl Cast<dyn MonitoringType> for DataOutputAssociation {}
impl Cast<dyn MonitoringTypeMut> for DataOutputAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataOutputAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataOutputAssociation {}
impl Cast<dyn OperationType> for DataOutputAssociation {}
impl Cast<dyn OperationTypeMut> for DataOutputAssociation {}
impl Cast<dyn OutputSetType> for DataOutputAssociation {}
impl Cast<dyn OutputSetTypeMut> for DataOutputAssociation {}
impl Cast<dyn ParallelGatewayType> for DataOutputAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for DataOutputAssociation {}
impl Cast<dyn ParticipantType> for DataOutputAssociation {}
impl Cast<dyn ParticipantTypeMut> for DataOutputAssociation {}
impl Cast<dyn ParticipantAssociationType> for DataOutputAssociation {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataOutputAssociation {}
impl Cast<dyn ParticipantMultiplicityType> for DataOutputAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataOutputAssociation {}
impl Cast<dyn PartnerEntityType> for DataOutputAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for DataOutputAssociation {}
impl Cast<dyn PartnerRoleType> for DataOutputAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for DataOutputAssociation {}
impl Cast<dyn PerformerType> for DataOutputAssociation {}
impl Cast<dyn PerformerTypeMut> for DataOutputAssociation {}
impl Cast<dyn PotentialOwnerType> for DataOutputAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for DataOutputAssociation {}
impl Cast<dyn ProcessType> for DataOutputAssociation {}
impl Cast<dyn ProcessTypeMut> for DataOutputAssociation {}
impl Cast<dyn PropertyType> for DataOutputAssociation {}
impl Cast<dyn PropertyTypeMut> for DataOutputAssociation {}
impl Cast<dyn ReceiveTaskType> for DataOutputAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn RelationshipType> for DataOutputAssociation {}
impl Cast<dyn RelationshipTypeMut> for DataOutputAssociation {}
impl Cast<dyn RenderingType> for DataOutputAssociation {}
impl Cast<dyn RenderingTypeMut> for DataOutputAssociation {}
impl Cast<dyn ResourceType> for DataOutputAssociation {}
impl Cast<dyn ResourceTypeMut> for DataOutputAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataOutputAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataOutputAssociation {}
impl Cast<dyn ResourceParameterType> for DataOutputAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for DataOutputAssociation {}
impl Cast<dyn ResourceParameterBindingType> for DataOutputAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataOutputAssociation {}
impl Cast<dyn ResourceRoleType> for DataOutputAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for DataOutputAssociation {}
impl Cast<dyn RootElementType> for DataOutputAssociation {}
impl Cast<dyn RootElementTypeMut> for DataOutputAssociation {}
impl Cast<dyn ScriptTaskType> for DataOutputAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn ScriptType> for DataOutputAssociation {}
impl Cast<dyn ScriptTypeMut> for DataOutputAssociation {}
impl Cast<dyn SendTaskType> for DataOutputAssociation {}
impl Cast<dyn SendTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn SequenceFlowType> for DataOutputAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for DataOutputAssociation {}
impl Cast<dyn ServiceTaskType> for DataOutputAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn SignalType> for DataOutputAssociation {}
impl Cast<dyn SignalTypeMut> for DataOutputAssociation {}
impl Cast<dyn SignalEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataOutputAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataOutputAssociation {}
impl Cast<dyn StartEventType> for DataOutputAssociation {}
impl Cast<dyn StartEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn SubChoreographyType> for DataOutputAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for DataOutputAssociation {}
impl Cast<dyn SubConversationType> for DataOutputAssociation {}
impl Cast<dyn SubConversationTypeMut> for DataOutputAssociation {}
impl Cast<dyn SubProcessType> for DataOutputAssociation {}
impl Cast<dyn SubProcessTypeMut> for DataOutputAssociation {}
impl Cast<dyn TaskType> for DataOutputAssociation {}
impl Cast<dyn TaskTypeMut> for DataOutputAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn TextAnnotationType> for DataOutputAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for DataOutputAssociation {}
impl Cast<dyn TextType> for DataOutputAssociation {}
impl Cast<dyn TextTypeMut> for DataOutputAssociation {}
impl Cast<dyn ThrowEventType> for DataOutputAssociation {}
impl Cast<dyn ThrowEventTypeMut> for DataOutputAssociation {}
impl Cast<dyn TimerEventDefinitionType> for DataOutputAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataOutputAssociation {}
impl Cast<dyn TransactionType> for DataOutputAssociation {}
impl Cast<dyn TransactionTypeMut> for DataOutputAssociation {}
impl Cast<dyn UserTaskType> for DataOutputAssociation {}
impl Cast<dyn UserTaskTypeMut> for DataOutputAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataState")]
pub struct DataState {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("DataStateType",rg*="name","DataStateTypeMut",s)]
    pub name: Option<String>,
}
impl DocumentElement for DataState {
    fn element(&self) -> Element {
        Element::DataState
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataState {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `dataState`
pub trait DataStateType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(DataStateType);
impl_downcast!(DataStateType);
/// Mutable access to `dataState`
pub trait DataStateTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + DataStateType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(DataStateTypeMut);
impl_downcast!(DataStateTypeMut);
impl Cast<dyn DefinitionsType> for DataState {}
impl Cast<dyn DefinitionsTypeMut> for DataState {}
impl Cast<dyn ImportType> for DataState {}
impl Cast<dyn ImportTypeMut> for DataState {}
impl Cast<dyn ActivityType> for DataState {}
impl Cast<dyn ActivityTypeMut> for DataState {}
impl Cast<dyn AdHocSubProcessType> for DataState {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataState {}
impl Cast<dyn ArtifactType> for DataState {}
impl Cast<dyn ArtifactTypeMut> for DataState {}
impl Cast<dyn AssignmentType> for DataState {}
impl Cast<dyn AssignmentTypeMut> for DataState {}
impl Cast<dyn AssociationType> for DataState {}
impl Cast<dyn AssociationTypeMut> for DataState {}
impl Cast<dyn AuditingType> for DataState {}
impl Cast<dyn AuditingTypeMut> for DataState {}
impl Cast<dyn BaseElementType> for DataState {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataState {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataState {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataState {}
impl Cast<dyn BoundaryEventType> for DataState {}
impl Cast<dyn BoundaryEventTypeMut> for DataState {}
impl Cast<dyn BusinessRuleTaskType> for DataState {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataState {}
impl Cast<dyn CallableElementType> for DataState {}
impl Cast<dyn CallableElementTypeMut> for DataState {}
impl Cast<dyn CallActivityType> for DataState {}
impl Cast<dyn CallActivityTypeMut> for DataState {}
impl Cast<dyn CallChoreographyType> for DataState {}
impl Cast<dyn CallChoreographyTypeMut> for DataState {}
impl Cast<dyn CallConversationType> for DataState {}
impl Cast<dyn CallConversationTypeMut> for DataState {}
impl Cast<dyn CancelEventDefinitionType> for DataState {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataState {}
impl Cast<dyn CatchEventType> for DataState {}
impl Cast<dyn CatchEventTypeMut> for DataState {}
impl Cast<dyn CategoryType> for DataState {}
impl Cast<dyn CategoryTypeMut> for DataState {}
impl Cast<dyn CategoryValueType> for DataState {}
impl Cast<dyn CategoryValueTypeMut> for DataState {}
impl Cast<dyn ChoreographyType> for DataState {}
impl Cast<dyn ChoreographyTypeMut> for DataState {}
impl Cast<dyn ChoreographyActivityType> for DataState {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataState {}
impl Cast<dyn ChoreographyTaskType> for DataState {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataState {}
impl Cast<dyn CollaborationType> for DataState {}
impl Cast<dyn CollaborationTypeMut> for DataState {}
impl Cast<dyn CompensateEventDefinitionType> for DataState {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataState {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataState {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataState {}
impl Cast<dyn ComplexGatewayType> for DataState {}
impl Cast<dyn ComplexGatewayTypeMut> for DataState {}
impl Cast<dyn ConditionalEventDefinitionType> for DataState {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataState {}
impl Cast<dyn ConversationType> for DataState {}
impl Cast<dyn ConversationTypeMut> for DataState {}
impl Cast<dyn ConversationAssociationType> for DataState {}
impl Cast<dyn ConversationAssociationTypeMut> for DataState {}
impl Cast<dyn ConversationLinkType> for DataState {}
impl Cast<dyn ConversationLinkTypeMut> for DataState {}
impl Cast<dyn ConversationNodeType> for DataState {}
impl Cast<dyn ConversationNodeTypeMut> for DataState {}
impl Cast<dyn CorrelationKeyType> for DataState {}
impl Cast<dyn CorrelationKeyTypeMut> for DataState {}
impl Cast<dyn CorrelationPropertyType> for DataState {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataState {}
impl Cast<dyn CorrelationPropertyBindingType> for DataState {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataState {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataState {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataState {}
impl Cast<dyn CorrelationSubscriptionType> for DataState {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataState {}
impl Cast<dyn DataAssociationType> for DataState {}
impl Cast<dyn DataAssociationTypeMut> for DataState {}
impl Cast<dyn DataInputType> for DataState {}
impl Cast<dyn DataInputTypeMut> for DataState {}
impl Cast<dyn DataInputAssociationType> for DataState {}
impl Cast<dyn DataInputAssociationTypeMut> for DataState {}
impl Cast<dyn DataObjectType> for DataState {}
impl Cast<dyn DataObjectTypeMut> for DataState {}
impl Cast<dyn DataObjectReferenceType> for DataState {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataState {}
impl Cast<dyn DataOutputType> for DataState {}
impl Cast<dyn DataOutputTypeMut> for DataState {}
impl Cast<dyn DataOutputAssociationType> for DataState {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataState {}
impl Cast<dyn DataStateType> for DataState {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStateTypeMut> for DataState {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStoreType> for DataState {}
impl Cast<dyn DataStoreTypeMut> for DataState {}
impl Cast<dyn DataStoreReferenceType> for DataState {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataState {}
impl Cast<dyn DocumentationType> for DataState {}
impl Cast<dyn DocumentationTypeMut> for DataState {}
impl Cast<dyn EndEventType> for DataState {}
impl Cast<dyn EndEventTypeMut> for DataState {}
impl Cast<dyn EndPointType> for DataState {}
impl Cast<dyn EndPointTypeMut> for DataState {}
impl Cast<dyn ErrorType> for DataState {}
impl Cast<dyn ErrorTypeMut> for DataState {}
impl Cast<dyn ErrorEventDefinitionType> for DataState {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataState {}
impl Cast<dyn EscalationType> for DataState {}
impl Cast<dyn EscalationTypeMut> for DataState {}
impl Cast<dyn EscalationEventDefinitionType> for DataState {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataState {}
impl Cast<dyn EventType> for DataState {}
impl Cast<dyn EventTypeMut> for DataState {}
impl Cast<dyn EventBasedGatewayType> for DataState {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataState {}
impl Cast<dyn EventDefinitionType> for DataState {}
impl Cast<dyn EventDefinitionTypeMut> for DataState {}
impl Cast<dyn ExclusiveGatewayType> for DataState {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataState {}
impl Cast<dyn ExpressionType> for DataState {}
impl Cast<dyn ExpressionTypeMut> for DataState {}
impl Cast<dyn ExtensionType> for DataState {}
impl Cast<dyn ExtensionTypeMut> for DataState {}
impl Cast<dyn ExtensionElementsType> for DataState {}
impl Cast<dyn ExtensionElementsTypeMut> for DataState {}
impl Cast<dyn FlowElementType> for DataState {}
impl Cast<dyn FlowElementTypeMut> for DataState {}
impl Cast<dyn FlowNodeType> for DataState {}
impl Cast<dyn FlowNodeTypeMut> for DataState {}
impl Cast<dyn FormalExpressionType> for DataState {}
impl Cast<dyn FormalExpressionTypeMut> for DataState {}
impl Cast<dyn GatewayType> for DataState {}
impl Cast<dyn GatewayTypeMut> for DataState {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataState {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataState {}
impl Cast<dyn GlobalChoreographyTaskType> for DataState {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataState {}
impl Cast<dyn GlobalConversationType> for DataState {}
impl Cast<dyn GlobalConversationTypeMut> for DataState {}
impl Cast<dyn GlobalManualTaskType> for DataState {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataState {}
impl Cast<dyn GlobalScriptTaskType> for DataState {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataState {}
impl Cast<dyn GlobalTaskType> for DataState {}
impl Cast<dyn GlobalTaskTypeMut> for DataState {}
impl Cast<dyn GlobalUserTaskType> for DataState {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataState {}
impl Cast<dyn GroupType> for DataState {}
impl Cast<dyn GroupTypeMut> for DataState {}
impl Cast<dyn HumanPerformerType> for DataState {}
impl Cast<dyn HumanPerformerTypeMut> for DataState {}
impl Cast<dyn ImplicitThrowEventType> for DataState {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataState {}
impl Cast<dyn InclusiveGatewayType> for DataState {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataState {}
impl Cast<dyn InputSetType> for DataState {}
impl Cast<dyn InputSetTypeMut> for DataState {}
impl Cast<dyn InterfaceType> for DataState {}
impl Cast<dyn InterfaceTypeMut> for DataState {}
impl Cast<dyn IntermediateCatchEventType> for DataState {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataState {}
impl Cast<dyn IntermediateThrowEventType> for DataState {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataState {}
impl Cast<dyn InputOutputBindingType> for DataState {}
impl Cast<dyn InputOutputBindingTypeMut> for DataState {}
impl Cast<dyn InputOutputSpecificationType> for DataState {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataState {}
impl Cast<dyn ItemDefinitionType> for DataState {}
impl Cast<dyn ItemDefinitionTypeMut> for DataState {}
impl Cast<dyn LaneType> for DataState {}
impl Cast<dyn LaneTypeMut> for DataState {}
impl Cast<dyn LaneSetType> for DataState {}
impl Cast<dyn LaneSetTypeMut> for DataState {}
impl Cast<dyn LinkEventDefinitionType> for DataState {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataState {}
impl Cast<dyn LoopCharacteristicsType> for DataState {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataState {}
impl Cast<dyn ManualTaskType> for DataState {}
impl Cast<dyn ManualTaskTypeMut> for DataState {}
impl Cast<dyn MessageType> for DataState {}
impl Cast<dyn MessageTypeMut> for DataState {}
impl Cast<dyn MessageEventDefinitionType> for DataState {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataState {}
impl Cast<dyn MessageFlowType> for DataState {}
impl Cast<dyn MessageFlowTypeMut> for DataState {}
impl Cast<dyn MessageFlowAssociationType> for DataState {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataState {}
impl Cast<dyn MonitoringType> for DataState {}
impl Cast<dyn MonitoringTypeMut> for DataState {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataState {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataState {}
impl Cast<dyn OperationType> for DataState {}
impl Cast<dyn OperationTypeMut> for DataState {}
impl Cast<dyn OutputSetType> for DataState {}
impl Cast<dyn OutputSetTypeMut> for DataState {}
impl Cast<dyn ParallelGatewayType> for DataState {}
impl Cast<dyn ParallelGatewayTypeMut> for DataState {}
impl Cast<dyn ParticipantType> for DataState {}
impl Cast<dyn ParticipantTypeMut> for DataState {}
impl Cast<dyn ParticipantAssociationType> for DataState {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataState {}
impl Cast<dyn ParticipantMultiplicityType> for DataState {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataState {}
impl Cast<dyn PartnerEntityType> for DataState {}
impl Cast<dyn PartnerEntityTypeMut> for DataState {}
impl Cast<dyn PartnerRoleType> for DataState {}
impl Cast<dyn PartnerRoleTypeMut> for DataState {}
impl Cast<dyn PerformerType> for DataState {}
impl Cast<dyn PerformerTypeMut> for DataState {}
impl Cast<dyn PotentialOwnerType> for DataState {}
impl Cast<dyn PotentialOwnerTypeMut> for DataState {}
impl Cast<dyn ProcessType> for DataState {}
impl Cast<dyn ProcessTypeMut> for DataState {}
impl Cast<dyn PropertyType> for DataState {}
impl Cast<dyn PropertyTypeMut> for DataState {}
impl Cast<dyn ReceiveTaskType> for DataState {}
impl Cast<dyn ReceiveTaskTypeMut> for DataState {}
impl Cast<dyn RelationshipType> for DataState {}
impl Cast<dyn RelationshipTypeMut> for DataState {}
impl Cast<dyn RenderingType> for DataState {}
impl Cast<dyn RenderingTypeMut> for DataState {}
impl Cast<dyn ResourceType> for DataState {}
impl Cast<dyn ResourceTypeMut> for DataState {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataState {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataState {}
impl Cast<dyn ResourceParameterType> for DataState {}
impl Cast<dyn ResourceParameterTypeMut> for DataState {}
impl Cast<dyn ResourceParameterBindingType> for DataState {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataState {}
impl Cast<dyn ResourceRoleType> for DataState {}
impl Cast<dyn ResourceRoleTypeMut> for DataState {}
impl Cast<dyn RootElementType> for DataState {}
impl Cast<dyn RootElementTypeMut> for DataState {}
impl Cast<dyn ScriptTaskType> for DataState {}
impl Cast<dyn ScriptTaskTypeMut> for DataState {}
impl Cast<dyn ScriptType> for DataState {}
impl Cast<dyn ScriptTypeMut> for DataState {}
impl Cast<dyn SendTaskType> for DataState {}
impl Cast<dyn SendTaskTypeMut> for DataState {}
impl Cast<dyn SequenceFlowType> for DataState {}
impl Cast<dyn SequenceFlowTypeMut> for DataState {}
impl Cast<dyn ServiceTaskType> for DataState {}
impl Cast<dyn ServiceTaskTypeMut> for DataState {}
impl Cast<dyn SignalType> for DataState {}
impl Cast<dyn SignalTypeMut> for DataState {}
impl Cast<dyn SignalEventDefinitionType> for DataState {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataState {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataState {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataState {}
impl Cast<dyn StartEventType> for DataState {}
impl Cast<dyn StartEventTypeMut> for DataState {}
impl Cast<dyn SubChoreographyType> for DataState {}
impl Cast<dyn SubChoreographyTypeMut> for DataState {}
impl Cast<dyn SubConversationType> for DataState {}
impl Cast<dyn SubConversationTypeMut> for DataState {}
impl Cast<dyn SubProcessType> for DataState {}
impl Cast<dyn SubProcessTypeMut> for DataState {}
impl Cast<dyn TaskType> for DataState {}
impl Cast<dyn TaskTypeMut> for DataState {}
impl Cast<dyn TerminateEventDefinitionType> for DataState {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataState {}
impl Cast<dyn TextAnnotationType> for DataState {}
impl Cast<dyn TextAnnotationTypeMut> for DataState {}
impl Cast<dyn TextType> for DataState {}
impl Cast<dyn TextTypeMut> for DataState {}
impl Cast<dyn ThrowEventType> for DataState {}
impl Cast<dyn ThrowEventTypeMut> for DataState {}
impl Cast<dyn TimerEventDefinitionType> for DataState {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataState {}
impl Cast<dyn TransactionType> for DataState {}
impl Cast<dyn TransactionTypeMut> for DataState {}
impl Cast<dyn UserTaskType> for DataState {}
impl Cast<dyn UserTaskTypeMut> for DataState {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataStore")]
pub struct DataStore {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("DataStoreType",rg*="name","DataStoreTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "capacity")]
    #[tia("DataStoreType",rg*="capacity","DataStoreTypeMut",s)]
    pub capacity: Option<Integer>,
    #[xml(attr = "isUnlimited")]
    #[tia("DataStoreType",rg*="is_unlimited","DataStoreTypeMut",s)]
    pub is_unlimited: Option<bool>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataStoreType",rg*="item_subject_ref","DataStoreTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataStoreType",rg*="data_state","DataStoreTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataStore {
    fn element(&self) -> Element {
        Element::DataStore
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataStore {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for DataStore {}
impl RootElementTypeMut for DataStore {}
//

/// Access to `dataStore`
pub trait DataStoreType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `capacity`
    fn capacity(&self) -> &Option<Integer>;
    /// Get value of attribute `isUnlimited`
    fn is_unlimited(&self) -> &Option<bool>;
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataStoreType);
impl_downcast!(DataStoreType);
/// Mutable access to `dataStore`
pub trait DataStoreTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + DataStoreType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `capacity`
    fn set_capacity(&mut self, value: Option<Integer>);
    /// Set value of attribute `isUnlimited`
    fn set_is_unlimited(&mut self, value: Option<bool>);
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataStoreTypeMut);
impl_downcast!(DataStoreTypeMut);
impl Cast<dyn DefinitionsType> for DataStore {}
impl Cast<dyn DefinitionsTypeMut> for DataStore {}
impl Cast<dyn ImportType> for DataStore {}
impl Cast<dyn ImportTypeMut> for DataStore {}
impl Cast<dyn ActivityType> for DataStore {}
impl Cast<dyn ActivityTypeMut> for DataStore {}
impl Cast<dyn AdHocSubProcessType> for DataStore {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataStore {}
impl Cast<dyn ArtifactType> for DataStore {}
impl Cast<dyn ArtifactTypeMut> for DataStore {}
impl Cast<dyn AssignmentType> for DataStore {}
impl Cast<dyn AssignmentTypeMut> for DataStore {}
impl Cast<dyn AssociationType> for DataStore {}
impl Cast<dyn AssociationTypeMut> for DataStore {}
impl Cast<dyn AuditingType> for DataStore {}
impl Cast<dyn AuditingTypeMut> for DataStore {}
impl Cast<dyn BaseElementType> for DataStore {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataStore {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataStore {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataStore {}
impl Cast<dyn BoundaryEventType> for DataStore {}
impl Cast<dyn BoundaryEventTypeMut> for DataStore {}
impl Cast<dyn BusinessRuleTaskType> for DataStore {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataStore {}
impl Cast<dyn CallableElementType> for DataStore {}
impl Cast<dyn CallableElementTypeMut> for DataStore {}
impl Cast<dyn CallActivityType> for DataStore {}
impl Cast<dyn CallActivityTypeMut> for DataStore {}
impl Cast<dyn CallChoreographyType> for DataStore {}
impl Cast<dyn CallChoreographyTypeMut> for DataStore {}
impl Cast<dyn CallConversationType> for DataStore {}
impl Cast<dyn CallConversationTypeMut> for DataStore {}
impl Cast<dyn CancelEventDefinitionType> for DataStore {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn CatchEventType> for DataStore {}
impl Cast<dyn CatchEventTypeMut> for DataStore {}
impl Cast<dyn CategoryType> for DataStore {}
impl Cast<dyn CategoryTypeMut> for DataStore {}
impl Cast<dyn CategoryValueType> for DataStore {}
impl Cast<dyn CategoryValueTypeMut> for DataStore {}
impl Cast<dyn ChoreographyType> for DataStore {}
impl Cast<dyn ChoreographyTypeMut> for DataStore {}
impl Cast<dyn ChoreographyActivityType> for DataStore {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataStore {}
impl Cast<dyn ChoreographyTaskType> for DataStore {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataStore {}
impl Cast<dyn CollaborationType> for DataStore {}
impl Cast<dyn CollaborationTypeMut> for DataStore {}
impl Cast<dyn CompensateEventDefinitionType> for DataStore {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataStore {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataStore {}
impl Cast<dyn ComplexGatewayType> for DataStore {}
impl Cast<dyn ComplexGatewayTypeMut> for DataStore {}
impl Cast<dyn ConditionalEventDefinitionType> for DataStore {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn ConversationType> for DataStore {}
impl Cast<dyn ConversationTypeMut> for DataStore {}
impl Cast<dyn ConversationAssociationType> for DataStore {}
impl Cast<dyn ConversationAssociationTypeMut> for DataStore {}
impl Cast<dyn ConversationLinkType> for DataStore {}
impl Cast<dyn ConversationLinkTypeMut> for DataStore {}
impl Cast<dyn ConversationNodeType> for DataStore {}
impl Cast<dyn ConversationNodeTypeMut> for DataStore {}
impl Cast<dyn CorrelationKeyType> for DataStore {}
impl Cast<dyn CorrelationKeyTypeMut> for DataStore {}
impl Cast<dyn CorrelationPropertyType> for DataStore {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataStore {}
impl Cast<dyn CorrelationPropertyBindingType> for DataStore {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataStore {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataStore {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataStore {}
impl Cast<dyn CorrelationSubscriptionType> for DataStore {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataStore {}
impl Cast<dyn DataAssociationType> for DataStore {}
impl Cast<dyn DataAssociationTypeMut> for DataStore {}
impl Cast<dyn DataInputType> for DataStore {}
impl Cast<dyn DataInputTypeMut> for DataStore {}
impl Cast<dyn DataInputAssociationType> for DataStore {}
impl Cast<dyn DataInputAssociationTypeMut> for DataStore {}
impl Cast<dyn DataObjectType> for DataStore {}
impl Cast<dyn DataObjectTypeMut> for DataStore {}
impl Cast<dyn DataObjectReferenceType> for DataStore {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataStore {}
impl Cast<dyn DataOutputType> for DataStore {}
impl Cast<dyn DataOutputTypeMut> for DataStore {}
impl Cast<dyn DataOutputAssociationType> for DataStore {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataStore {}
impl Cast<dyn DataStateType> for DataStore {}
impl Cast<dyn DataStateTypeMut> for DataStore {}
impl Cast<dyn DataStoreType> for DataStore {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStoreTypeMut> for DataStore {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStoreReferenceType> for DataStore {}
impl Cast<dyn DataStoreReferenceTypeMut> for DataStore {}
impl Cast<dyn DocumentationType> for DataStore {}
impl Cast<dyn DocumentationTypeMut> for DataStore {}
impl Cast<dyn EndEventType> for DataStore {}
impl Cast<dyn EndEventTypeMut> for DataStore {}
impl Cast<dyn EndPointType> for DataStore {}
impl Cast<dyn EndPointTypeMut> for DataStore {}
impl Cast<dyn ErrorType> for DataStore {}
impl Cast<dyn ErrorTypeMut> for DataStore {}
impl Cast<dyn ErrorEventDefinitionType> for DataStore {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn EscalationType> for DataStore {}
impl Cast<dyn EscalationTypeMut> for DataStore {}
impl Cast<dyn EscalationEventDefinitionType> for DataStore {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn EventType> for DataStore {}
impl Cast<dyn EventTypeMut> for DataStore {}
impl Cast<dyn EventBasedGatewayType> for DataStore {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataStore {}
impl Cast<dyn EventDefinitionType> for DataStore {}
impl Cast<dyn EventDefinitionTypeMut> for DataStore {}
impl Cast<dyn ExclusiveGatewayType> for DataStore {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataStore {}
impl Cast<dyn ExpressionType> for DataStore {}
impl Cast<dyn ExpressionTypeMut> for DataStore {}
impl Cast<dyn ExtensionType> for DataStore {}
impl Cast<dyn ExtensionTypeMut> for DataStore {}
impl Cast<dyn ExtensionElementsType> for DataStore {}
impl Cast<dyn ExtensionElementsTypeMut> for DataStore {}
impl Cast<dyn FlowElementType> for DataStore {}
impl Cast<dyn FlowElementTypeMut> for DataStore {}
impl Cast<dyn FlowNodeType> for DataStore {}
impl Cast<dyn FlowNodeTypeMut> for DataStore {}
impl Cast<dyn FormalExpressionType> for DataStore {}
impl Cast<dyn FormalExpressionTypeMut> for DataStore {}
impl Cast<dyn GatewayType> for DataStore {}
impl Cast<dyn GatewayTypeMut> for DataStore {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataStore {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataStore {}
impl Cast<dyn GlobalChoreographyTaskType> for DataStore {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataStore {}
impl Cast<dyn GlobalConversationType> for DataStore {}
impl Cast<dyn GlobalConversationTypeMut> for DataStore {}
impl Cast<dyn GlobalManualTaskType> for DataStore {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataStore {}
impl Cast<dyn GlobalScriptTaskType> for DataStore {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataStore {}
impl Cast<dyn GlobalTaskType> for DataStore {}
impl Cast<dyn GlobalTaskTypeMut> for DataStore {}
impl Cast<dyn GlobalUserTaskType> for DataStore {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataStore {}
impl Cast<dyn GroupType> for DataStore {}
impl Cast<dyn GroupTypeMut> for DataStore {}
impl Cast<dyn HumanPerformerType> for DataStore {}
impl Cast<dyn HumanPerformerTypeMut> for DataStore {}
impl Cast<dyn ImplicitThrowEventType> for DataStore {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataStore {}
impl Cast<dyn InclusiveGatewayType> for DataStore {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataStore {}
impl Cast<dyn InputSetType> for DataStore {}
impl Cast<dyn InputSetTypeMut> for DataStore {}
impl Cast<dyn InterfaceType> for DataStore {}
impl Cast<dyn InterfaceTypeMut> for DataStore {}
impl Cast<dyn IntermediateCatchEventType> for DataStore {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataStore {}
impl Cast<dyn IntermediateThrowEventType> for DataStore {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataStore {}
impl Cast<dyn InputOutputBindingType> for DataStore {}
impl Cast<dyn InputOutputBindingTypeMut> for DataStore {}
impl Cast<dyn InputOutputSpecificationType> for DataStore {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataStore {}
impl Cast<dyn ItemDefinitionType> for DataStore {}
impl Cast<dyn ItemDefinitionTypeMut> for DataStore {}
impl Cast<dyn LaneType> for DataStore {}
impl Cast<dyn LaneTypeMut> for DataStore {}
impl Cast<dyn LaneSetType> for DataStore {}
impl Cast<dyn LaneSetTypeMut> for DataStore {}
impl Cast<dyn LinkEventDefinitionType> for DataStore {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn LoopCharacteristicsType> for DataStore {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataStore {}
impl Cast<dyn ManualTaskType> for DataStore {}
impl Cast<dyn ManualTaskTypeMut> for DataStore {}
impl Cast<dyn MessageType> for DataStore {}
impl Cast<dyn MessageTypeMut> for DataStore {}
impl Cast<dyn MessageEventDefinitionType> for DataStore {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn MessageFlowType> for DataStore {}
impl Cast<dyn MessageFlowTypeMut> for DataStore {}
impl Cast<dyn MessageFlowAssociationType> for DataStore {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataStore {}
impl Cast<dyn MonitoringType> for DataStore {}
impl Cast<dyn MonitoringTypeMut> for DataStore {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataStore {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataStore {}
impl Cast<dyn OperationType> for DataStore {}
impl Cast<dyn OperationTypeMut> for DataStore {}
impl Cast<dyn OutputSetType> for DataStore {}
impl Cast<dyn OutputSetTypeMut> for DataStore {}
impl Cast<dyn ParallelGatewayType> for DataStore {}
impl Cast<dyn ParallelGatewayTypeMut> for DataStore {}
impl Cast<dyn ParticipantType> for DataStore {}
impl Cast<dyn ParticipantTypeMut> for DataStore {}
impl Cast<dyn ParticipantAssociationType> for DataStore {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataStore {}
impl Cast<dyn ParticipantMultiplicityType> for DataStore {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataStore {}
impl Cast<dyn PartnerEntityType> for DataStore {}
impl Cast<dyn PartnerEntityTypeMut> for DataStore {}
impl Cast<dyn PartnerRoleType> for DataStore {}
impl Cast<dyn PartnerRoleTypeMut> for DataStore {}
impl Cast<dyn PerformerType> for DataStore {}
impl Cast<dyn PerformerTypeMut> for DataStore {}
impl Cast<dyn PotentialOwnerType> for DataStore {}
impl Cast<dyn PotentialOwnerTypeMut> for DataStore {}
impl Cast<dyn ProcessType> for DataStore {}
impl Cast<dyn ProcessTypeMut> for DataStore {}
impl Cast<dyn PropertyType> for DataStore {}
impl Cast<dyn PropertyTypeMut> for DataStore {}
impl Cast<dyn ReceiveTaskType> for DataStore {}
impl Cast<dyn ReceiveTaskTypeMut> for DataStore {}
impl Cast<dyn RelationshipType> for DataStore {}
impl Cast<dyn RelationshipTypeMut> for DataStore {}
impl Cast<dyn RenderingType> for DataStore {}
impl Cast<dyn RenderingTypeMut> for DataStore {}
impl Cast<dyn ResourceType> for DataStore {}
impl Cast<dyn ResourceTypeMut> for DataStore {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataStore {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataStore {}
impl Cast<dyn ResourceParameterType> for DataStore {}
impl Cast<dyn ResourceParameterTypeMut> for DataStore {}
impl Cast<dyn ResourceParameterBindingType> for DataStore {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataStore {}
impl Cast<dyn ResourceRoleType> for DataStore {}
impl Cast<dyn ResourceRoleTypeMut> for DataStore {}
impl Cast<dyn RootElementType> for DataStore {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for DataStore {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for DataStore {}
impl Cast<dyn ScriptTaskTypeMut> for DataStore {}
impl Cast<dyn ScriptType> for DataStore {}
impl Cast<dyn ScriptTypeMut> for DataStore {}
impl Cast<dyn SendTaskType> for DataStore {}
impl Cast<dyn SendTaskTypeMut> for DataStore {}
impl Cast<dyn SequenceFlowType> for DataStore {}
impl Cast<dyn SequenceFlowTypeMut> for DataStore {}
impl Cast<dyn ServiceTaskType> for DataStore {}
impl Cast<dyn ServiceTaskTypeMut> for DataStore {}
impl Cast<dyn SignalType> for DataStore {}
impl Cast<dyn SignalTypeMut> for DataStore {}
impl Cast<dyn SignalEventDefinitionType> for DataStore {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataStore {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataStore {}
impl Cast<dyn StartEventType> for DataStore {}
impl Cast<dyn StartEventTypeMut> for DataStore {}
impl Cast<dyn SubChoreographyType> for DataStore {}
impl Cast<dyn SubChoreographyTypeMut> for DataStore {}
impl Cast<dyn SubConversationType> for DataStore {}
impl Cast<dyn SubConversationTypeMut> for DataStore {}
impl Cast<dyn SubProcessType> for DataStore {}
impl Cast<dyn SubProcessTypeMut> for DataStore {}
impl Cast<dyn TaskType> for DataStore {}
impl Cast<dyn TaskTypeMut> for DataStore {}
impl Cast<dyn TerminateEventDefinitionType> for DataStore {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn TextAnnotationType> for DataStore {}
impl Cast<dyn TextAnnotationTypeMut> for DataStore {}
impl Cast<dyn TextType> for DataStore {}
impl Cast<dyn TextTypeMut> for DataStore {}
impl Cast<dyn ThrowEventType> for DataStore {}
impl Cast<dyn ThrowEventTypeMut> for DataStore {}
impl Cast<dyn TimerEventDefinitionType> for DataStore {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataStore {}
impl Cast<dyn TransactionType> for DataStore {}
impl Cast<dyn TransactionTypeMut> for DataStore {}
impl Cast<dyn UserTaskType> for DataStore {}
impl Cast<dyn UserTaskTypeMut> for DataStore {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:dataStoreReference")]
pub struct DataStoreReference {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("DataStoreReferenceType",rg*="item_subject_ref","DataStoreReferenceTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(attr = "dataStoreRef")]
    #[tia("DataStoreReferenceType",rg*="data_store_ref","DataStoreReferenceTypeMut",s)]
    pub data_store_ref: Option<String>,
    #[xml(child = "bpmn:dataState")]
    #[tia("DataStoreReferenceType",rg*="data_state","DataStoreReferenceTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for DataStoreReference {
    fn element(&self) -> Element {
        Element::DataStoreReference
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for DataStoreReference {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `dataStoreReference`
pub trait DataStoreReferenceType: FlowElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of attribute `dataStoreRef`
    fn data_store_ref(&self) -> &Option<String>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(DataStoreReferenceType);
impl_downcast!(DataStoreReferenceType);
/// Mutable access to `dataStoreReference`
pub trait DataStoreReferenceTypeMut:
    FlowElementTypeMut + Downcast + Debug + Send + DynClone + DataStoreReferenceType
{
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Set value of attribute `dataStoreRef`
    fn set_data_store_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(DataStoreReferenceTypeMut);
impl_downcast!(DataStoreReferenceTypeMut);
impl Cast<dyn DefinitionsType> for DataStoreReference {}
impl Cast<dyn DefinitionsTypeMut> for DataStoreReference {}
impl Cast<dyn ImportType> for DataStoreReference {}
impl Cast<dyn ImportTypeMut> for DataStoreReference {}
impl Cast<dyn ActivityType> for DataStoreReference {}
impl Cast<dyn ActivityTypeMut> for DataStoreReference {}
impl Cast<dyn AdHocSubProcessType> for DataStoreReference {}
impl Cast<dyn AdHocSubProcessTypeMut> for DataStoreReference {}
impl Cast<dyn ArtifactType> for DataStoreReference {}
impl Cast<dyn ArtifactTypeMut> for DataStoreReference {}
impl Cast<dyn AssignmentType> for DataStoreReference {}
impl Cast<dyn AssignmentTypeMut> for DataStoreReference {}
impl Cast<dyn AssociationType> for DataStoreReference {}
impl Cast<dyn AssociationTypeMut> for DataStoreReference {}
impl Cast<dyn AuditingType> for DataStoreReference {}
impl Cast<dyn AuditingTypeMut> for DataStoreReference {}
impl Cast<dyn BaseElementType> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for DataStoreReference {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for DataStoreReference {}
impl Cast<dyn BoundaryEventType> for DataStoreReference {}
impl Cast<dyn BoundaryEventTypeMut> for DataStoreReference {}
impl Cast<dyn BusinessRuleTaskType> for DataStoreReference {}
impl Cast<dyn BusinessRuleTaskTypeMut> for DataStoreReference {}
impl Cast<dyn CallableElementType> for DataStoreReference {}
impl Cast<dyn CallableElementTypeMut> for DataStoreReference {}
impl Cast<dyn CallActivityType> for DataStoreReference {}
impl Cast<dyn CallActivityTypeMut> for DataStoreReference {}
impl Cast<dyn CallChoreographyType> for DataStoreReference {}
impl Cast<dyn CallChoreographyTypeMut> for DataStoreReference {}
impl Cast<dyn CallConversationType> for DataStoreReference {}
impl Cast<dyn CallConversationTypeMut> for DataStoreReference {}
impl Cast<dyn CancelEventDefinitionType> for DataStoreReference {}
impl Cast<dyn CancelEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn CatchEventType> for DataStoreReference {}
impl Cast<dyn CatchEventTypeMut> for DataStoreReference {}
impl Cast<dyn CategoryType> for DataStoreReference {}
impl Cast<dyn CategoryTypeMut> for DataStoreReference {}
impl Cast<dyn CategoryValueType> for DataStoreReference {}
impl Cast<dyn CategoryValueTypeMut> for DataStoreReference {}
impl Cast<dyn ChoreographyType> for DataStoreReference {}
impl Cast<dyn ChoreographyTypeMut> for DataStoreReference {}
impl Cast<dyn ChoreographyActivityType> for DataStoreReference {}
impl Cast<dyn ChoreographyActivityTypeMut> for DataStoreReference {}
impl Cast<dyn ChoreographyTaskType> for DataStoreReference {}
impl Cast<dyn ChoreographyTaskTypeMut> for DataStoreReference {}
impl Cast<dyn CollaborationType> for DataStoreReference {}
impl Cast<dyn CollaborationTypeMut> for DataStoreReference {}
impl Cast<dyn CompensateEventDefinitionType> for DataStoreReference {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn ComplexBehaviorDefinitionType> for DataStoreReference {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn ComplexGatewayType> for DataStoreReference {}
impl Cast<dyn ComplexGatewayTypeMut> for DataStoreReference {}
impl Cast<dyn ConditionalEventDefinitionType> for DataStoreReference {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn ConversationType> for DataStoreReference {}
impl Cast<dyn ConversationTypeMut> for DataStoreReference {}
impl Cast<dyn ConversationAssociationType> for DataStoreReference {}
impl Cast<dyn ConversationAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn ConversationLinkType> for DataStoreReference {}
impl Cast<dyn ConversationLinkTypeMut> for DataStoreReference {}
impl Cast<dyn ConversationNodeType> for DataStoreReference {}
impl Cast<dyn ConversationNodeTypeMut> for DataStoreReference {}
impl Cast<dyn CorrelationKeyType> for DataStoreReference {}
impl Cast<dyn CorrelationKeyTypeMut> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyType> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyTypeMut> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyBindingType> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for DataStoreReference {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for DataStoreReference {}
impl Cast<dyn CorrelationSubscriptionType> for DataStoreReference {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for DataStoreReference {}
impl Cast<dyn DataAssociationType> for DataStoreReference {}
impl Cast<dyn DataAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn DataInputType> for DataStoreReference {}
impl Cast<dyn DataInputTypeMut> for DataStoreReference {}
impl Cast<dyn DataInputAssociationType> for DataStoreReference {}
impl Cast<dyn DataInputAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn DataObjectType> for DataStoreReference {}
impl Cast<dyn DataObjectTypeMut> for DataStoreReference {}
impl Cast<dyn DataObjectReferenceType> for DataStoreReference {}
impl Cast<dyn DataObjectReferenceTypeMut> for DataStoreReference {}
impl Cast<dyn DataOutputType> for DataStoreReference {}
impl Cast<dyn DataOutputTypeMut> for DataStoreReference {}
impl Cast<dyn DataOutputAssociationType> for DataStoreReference {}
impl Cast<dyn DataOutputAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn DataStateType> for DataStoreReference {}
impl Cast<dyn DataStateTypeMut> for DataStoreReference {}
impl Cast<dyn DataStoreType> for DataStoreReference {}
impl Cast<dyn DataStoreTypeMut> for DataStoreReference {}
impl Cast<dyn DataStoreReferenceType> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DocumentationType> for DataStoreReference {}
impl Cast<dyn DocumentationTypeMut> for DataStoreReference {}
impl Cast<dyn EndEventType> for DataStoreReference {}
impl Cast<dyn EndEventTypeMut> for DataStoreReference {}
impl Cast<dyn EndPointType> for DataStoreReference {}
impl Cast<dyn EndPointTypeMut> for DataStoreReference {}
impl Cast<dyn ErrorType> for DataStoreReference {}
impl Cast<dyn ErrorTypeMut> for DataStoreReference {}
impl Cast<dyn ErrorEventDefinitionType> for DataStoreReference {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn EscalationType> for DataStoreReference {}
impl Cast<dyn EscalationTypeMut> for DataStoreReference {}
impl Cast<dyn EscalationEventDefinitionType> for DataStoreReference {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn EventType> for DataStoreReference {}
impl Cast<dyn EventTypeMut> for DataStoreReference {}
impl Cast<dyn EventBasedGatewayType> for DataStoreReference {}
impl Cast<dyn EventBasedGatewayTypeMut> for DataStoreReference {}
impl Cast<dyn EventDefinitionType> for DataStoreReference {}
impl Cast<dyn EventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn ExclusiveGatewayType> for DataStoreReference {}
impl Cast<dyn ExclusiveGatewayTypeMut> for DataStoreReference {}
impl Cast<dyn ExpressionType> for DataStoreReference {}
impl Cast<dyn ExpressionTypeMut> for DataStoreReference {}
impl Cast<dyn ExtensionType> for DataStoreReference {}
impl Cast<dyn ExtensionTypeMut> for DataStoreReference {}
impl Cast<dyn ExtensionElementsType> for DataStoreReference {}
impl Cast<dyn ExtensionElementsTypeMut> for DataStoreReference {}
impl Cast<dyn FlowElementType> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for DataStoreReference {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for DataStoreReference {}
impl Cast<dyn FlowNodeTypeMut> for DataStoreReference {}
impl Cast<dyn FormalExpressionType> for DataStoreReference {}
impl Cast<dyn FormalExpressionTypeMut> for DataStoreReference {}
impl Cast<dyn GatewayType> for DataStoreReference {}
impl Cast<dyn GatewayTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalBusinessRuleTaskType> for DataStoreReference {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalChoreographyTaskType> for DataStoreReference {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalConversationType> for DataStoreReference {}
impl Cast<dyn GlobalConversationTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalManualTaskType> for DataStoreReference {}
impl Cast<dyn GlobalManualTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalScriptTaskType> for DataStoreReference {}
impl Cast<dyn GlobalScriptTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalTaskType> for DataStoreReference {}
impl Cast<dyn GlobalTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GlobalUserTaskType> for DataStoreReference {}
impl Cast<dyn GlobalUserTaskTypeMut> for DataStoreReference {}
impl Cast<dyn GroupType> for DataStoreReference {}
impl Cast<dyn GroupTypeMut> for DataStoreReference {}
impl Cast<dyn HumanPerformerType> for DataStoreReference {}
impl Cast<dyn HumanPerformerTypeMut> for DataStoreReference {}
impl Cast<dyn ImplicitThrowEventType> for DataStoreReference {}
impl Cast<dyn ImplicitThrowEventTypeMut> for DataStoreReference {}
impl Cast<dyn InclusiveGatewayType> for DataStoreReference {}
impl Cast<dyn InclusiveGatewayTypeMut> for DataStoreReference {}
impl Cast<dyn InputSetType> for DataStoreReference {}
impl Cast<dyn InputSetTypeMut> for DataStoreReference {}
impl Cast<dyn InterfaceType> for DataStoreReference {}
impl Cast<dyn InterfaceTypeMut> for DataStoreReference {}
impl Cast<dyn IntermediateCatchEventType> for DataStoreReference {}
impl Cast<dyn IntermediateCatchEventTypeMut> for DataStoreReference {}
impl Cast<dyn IntermediateThrowEventType> for DataStoreReference {}
impl Cast<dyn IntermediateThrowEventTypeMut> for DataStoreReference {}
impl Cast<dyn InputOutputBindingType> for DataStoreReference {}
impl Cast<dyn InputOutputBindingTypeMut> for DataStoreReference {}
impl Cast<dyn InputOutputSpecificationType> for DataStoreReference {}
impl Cast<dyn InputOutputSpecificationTypeMut> for DataStoreReference {}
impl Cast<dyn ItemDefinitionType> for DataStoreReference {}
impl Cast<dyn ItemDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn LaneType> for DataStoreReference {}
impl Cast<dyn LaneTypeMut> for DataStoreReference {}
impl Cast<dyn LaneSetType> for DataStoreReference {}
impl Cast<dyn LaneSetTypeMut> for DataStoreReference {}
impl Cast<dyn LinkEventDefinitionType> for DataStoreReference {}
impl Cast<dyn LinkEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn LoopCharacteristicsType> for DataStoreReference {}
impl Cast<dyn LoopCharacteristicsTypeMut> for DataStoreReference {}
impl Cast<dyn ManualTaskType> for DataStoreReference {}
impl Cast<dyn ManualTaskTypeMut> for DataStoreReference {}
impl Cast<dyn MessageType> for DataStoreReference {}
impl Cast<dyn MessageTypeMut> for DataStoreReference {}
impl Cast<dyn MessageEventDefinitionType> for DataStoreReference {}
impl Cast<dyn MessageEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn MessageFlowType> for DataStoreReference {}
impl Cast<dyn MessageFlowTypeMut> for DataStoreReference {}
impl Cast<dyn MessageFlowAssociationType> for DataStoreReference {}
impl Cast<dyn MessageFlowAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn MonitoringType> for DataStoreReference {}
impl Cast<dyn MonitoringTypeMut> for DataStoreReference {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for DataStoreReference {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for DataStoreReference {}
impl Cast<dyn OperationType> for DataStoreReference {}
impl Cast<dyn OperationTypeMut> for DataStoreReference {}
impl Cast<dyn OutputSetType> for DataStoreReference {}
impl Cast<dyn OutputSetTypeMut> for DataStoreReference {}
impl Cast<dyn ParallelGatewayType> for DataStoreReference {}
impl Cast<dyn ParallelGatewayTypeMut> for DataStoreReference {}
impl Cast<dyn ParticipantType> for DataStoreReference {}
impl Cast<dyn ParticipantTypeMut> for DataStoreReference {}
impl Cast<dyn ParticipantAssociationType> for DataStoreReference {}
impl Cast<dyn ParticipantAssociationTypeMut> for DataStoreReference {}
impl Cast<dyn ParticipantMultiplicityType> for DataStoreReference {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for DataStoreReference {}
impl Cast<dyn PartnerEntityType> for DataStoreReference {}
impl Cast<dyn PartnerEntityTypeMut> for DataStoreReference {}
impl Cast<dyn PartnerRoleType> for DataStoreReference {}
impl Cast<dyn PartnerRoleTypeMut> for DataStoreReference {}
impl Cast<dyn PerformerType> for DataStoreReference {}
impl Cast<dyn PerformerTypeMut> for DataStoreReference {}
impl Cast<dyn PotentialOwnerType> for DataStoreReference {}
impl Cast<dyn PotentialOwnerTypeMut> for DataStoreReference {}
impl Cast<dyn ProcessType> for DataStoreReference {}
impl Cast<dyn ProcessTypeMut> for DataStoreReference {}
impl Cast<dyn PropertyType> for DataStoreReference {}
impl Cast<dyn PropertyTypeMut> for DataStoreReference {}
impl Cast<dyn ReceiveTaskType> for DataStoreReference {}
impl Cast<dyn ReceiveTaskTypeMut> for DataStoreReference {}
impl Cast<dyn RelationshipType> for DataStoreReference {}
impl Cast<dyn RelationshipTypeMut> for DataStoreReference {}
impl Cast<dyn RenderingType> for DataStoreReference {}
impl Cast<dyn RenderingTypeMut> for DataStoreReference {}
impl Cast<dyn ResourceType> for DataStoreReference {}
impl Cast<dyn ResourceTypeMut> for DataStoreReference {}
impl Cast<dyn ResourceAssignmentExpressionType> for DataStoreReference {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for DataStoreReference {}
impl Cast<dyn ResourceParameterType> for DataStoreReference {}
impl Cast<dyn ResourceParameterTypeMut> for DataStoreReference {}
impl Cast<dyn ResourceParameterBindingType> for DataStoreReference {}
impl Cast<dyn ResourceParameterBindingTypeMut> for DataStoreReference {}
impl Cast<dyn ResourceRoleType> for DataStoreReference {}
impl Cast<dyn ResourceRoleTypeMut> for DataStoreReference {}
impl Cast<dyn RootElementType> for DataStoreReference {}
impl Cast<dyn RootElementTypeMut> for DataStoreReference {}
impl Cast<dyn ScriptTaskType> for DataStoreReference {}
impl Cast<dyn ScriptTaskTypeMut> for DataStoreReference {}
impl Cast<dyn ScriptType> for DataStoreReference {}
impl Cast<dyn ScriptTypeMut> for DataStoreReference {}
impl Cast<dyn SendTaskType> for DataStoreReference {}
impl Cast<dyn SendTaskTypeMut> for DataStoreReference {}
impl Cast<dyn SequenceFlowType> for DataStoreReference {}
impl Cast<dyn SequenceFlowTypeMut> for DataStoreReference {}
impl Cast<dyn ServiceTaskType> for DataStoreReference {}
impl Cast<dyn ServiceTaskTypeMut> for DataStoreReference {}
impl Cast<dyn SignalType> for DataStoreReference {}
impl Cast<dyn SignalTypeMut> for DataStoreReference {}
impl Cast<dyn SignalEventDefinitionType> for DataStoreReference {}
impl Cast<dyn SignalEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn StandardLoopCharacteristicsType> for DataStoreReference {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for DataStoreReference {}
impl Cast<dyn StartEventType> for DataStoreReference {}
impl Cast<dyn StartEventTypeMut> for DataStoreReference {}
impl Cast<dyn SubChoreographyType> for DataStoreReference {}
impl Cast<dyn SubChoreographyTypeMut> for DataStoreReference {}
impl Cast<dyn SubConversationType> for DataStoreReference {}
impl Cast<dyn SubConversationTypeMut> for DataStoreReference {}
impl Cast<dyn SubProcessType> for DataStoreReference {}
impl Cast<dyn SubProcessTypeMut> for DataStoreReference {}
impl Cast<dyn TaskType> for DataStoreReference {}
impl Cast<dyn TaskTypeMut> for DataStoreReference {}
impl Cast<dyn TerminateEventDefinitionType> for DataStoreReference {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn TextAnnotationType> for DataStoreReference {}
impl Cast<dyn TextAnnotationTypeMut> for DataStoreReference {}
impl Cast<dyn TextType> for DataStoreReference {}
impl Cast<dyn TextTypeMut> for DataStoreReference {}
impl Cast<dyn ThrowEventType> for DataStoreReference {}
impl Cast<dyn ThrowEventTypeMut> for DataStoreReference {}
impl Cast<dyn TimerEventDefinitionType> for DataStoreReference {}
impl Cast<dyn TimerEventDefinitionTypeMut> for DataStoreReference {}
impl Cast<dyn TransactionType> for DataStoreReference {}
impl Cast<dyn TransactionTypeMut> for DataStoreReference {}
impl Cast<dyn UserTaskType> for DataStoreReference {}
impl Cast<dyn UserTaskTypeMut> for DataStoreReference {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:documentation")]
pub struct Documentation {
    #[xml(attr = "id")]
    #[tia("DocumentationType",rg*="id","DocumentationTypeMut",s)]
    pub id: Option<Id>,
    #[xml(attr = "textFormat")]
    #[tia("DocumentationType",rg*="text_format","DocumentationTypeMut",s)]
    pub text_format: Option<String>,
}
impl DocumentElement for Documentation {
    fn element(&self) -> Element {
        Element::Documentation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Documentation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `documentation`
pub trait DocumentationType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `id`
    fn id(&self) -> &Option<Id>;
    /// Get value of attribute `textFormat`
    fn text_format(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(DocumentationType);
impl_downcast!(DocumentationType);
/// Mutable access to `documentation`
pub trait DocumentationTypeMut: Downcast + Debug + Send + DynClone + DocumentationType {
    /// Set value of attribute `id`
    fn set_id(&mut self, value: Option<Id>);
    /// Set value of attribute `textFormat`
    fn set_text_format(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(DocumentationTypeMut);
impl_downcast!(DocumentationTypeMut);
impl Cast<dyn DefinitionsType> for Documentation {}
impl Cast<dyn DefinitionsTypeMut> for Documentation {}
impl Cast<dyn ImportType> for Documentation {}
impl Cast<dyn ImportTypeMut> for Documentation {}
impl Cast<dyn ActivityType> for Documentation {}
impl Cast<dyn ActivityTypeMut> for Documentation {}
impl Cast<dyn AdHocSubProcessType> for Documentation {}
impl Cast<dyn AdHocSubProcessTypeMut> for Documentation {}
impl Cast<dyn ArtifactType> for Documentation {}
impl Cast<dyn ArtifactTypeMut> for Documentation {}
impl Cast<dyn AssignmentType> for Documentation {}
impl Cast<dyn AssignmentTypeMut> for Documentation {}
impl Cast<dyn AssociationType> for Documentation {}
impl Cast<dyn AssociationTypeMut> for Documentation {}
impl Cast<dyn AuditingType> for Documentation {}
impl Cast<dyn AuditingTypeMut> for Documentation {}
impl Cast<dyn BaseElementType> for Documentation {}
impl Cast<dyn BaseElementTypeMut> for Documentation {}
impl Cast<dyn BaseElementWithMixedContentType> for Documentation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Documentation {}
impl Cast<dyn BoundaryEventType> for Documentation {}
impl Cast<dyn BoundaryEventTypeMut> for Documentation {}
impl Cast<dyn BusinessRuleTaskType> for Documentation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Documentation {}
impl Cast<dyn CallableElementType> for Documentation {}
impl Cast<dyn CallableElementTypeMut> for Documentation {}
impl Cast<dyn CallActivityType> for Documentation {}
impl Cast<dyn CallActivityTypeMut> for Documentation {}
impl Cast<dyn CallChoreographyType> for Documentation {}
impl Cast<dyn CallChoreographyTypeMut> for Documentation {}
impl Cast<dyn CallConversationType> for Documentation {}
impl Cast<dyn CallConversationTypeMut> for Documentation {}
impl Cast<dyn CancelEventDefinitionType> for Documentation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn CatchEventType> for Documentation {}
impl Cast<dyn CatchEventTypeMut> for Documentation {}
impl Cast<dyn CategoryType> for Documentation {}
impl Cast<dyn CategoryTypeMut> for Documentation {}
impl Cast<dyn CategoryValueType> for Documentation {}
impl Cast<dyn CategoryValueTypeMut> for Documentation {}
impl Cast<dyn ChoreographyType> for Documentation {}
impl Cast<dyn ChoreographyTypeMut> for Documentation {}
impl Cast<dyn ChoreographyActivityType> for Documentation {}
impl Cast<dyn ChoreographyActivityTypeMut> for Documentation {}
impl Cast<dyn ChoreographyTaskType> for Documentation {}
impl Cast<dyn ChoreographyTaskTypeMut> for Documentation {}
impl Cast<dyn CollaborationType> for Documentation {}
impl Cast<dyn CollaborationTypeMut> for Documentation {}
impl Cast<dyn CompensateEventDefinitionType> for Documentation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Documentation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Documentation {}
impl Cast<dyn ComplexGatewayType> for Documentation {}
impl Cast<dyn ComplexGatewayTypeMut> for Documentation {}
impl Cast<dyn ConditionalEventDefinitionType> for Documentation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn ConversationType> for Documentation {}
impl Cast<dyn ConversationTypeMut> for Documentation {}
impl Cast<dyn ConversationAssociationType> for Documentation {}
impl Cast<dyn ConversationAssociationTypeMut> for Documentation {}
impl Cast<dyn ConversationLinkType> for Documentation {}
impl Cast<dyn ConversationLinkTypeMut> for Documentation {}
impl Cast<dyn ConversationNodeType> for Documentation {}
impl Cast<dyn ConversationNodeTypeMut> for Documentation {}
impl Cast<dyn CorrelationKeyType> for Documentation {}
impl Cast<dyn CorrelationKeyTypeMut> for Documentation {}
impl Cast<dyn CorrelationPropertyType> for Documentation {}
impl Cast<dyn CorrelationPropertyTypeMut> for Documentation {}
impl Cast<dyn CorrelationPropertyBindingType> for Documentation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Documentation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Documentation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Documentation {}
impl Cast<dyn CorrelationSubscriptionType> for Documentation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Documentation {}
impl Cast<dyn DataAssociationType> for Documentation {}
impl Cast<dyn DataAssociationTypeMut> for Documentation {}
impl Cast<dyn DataInputType> for Documentation {}
impl Cast<dyn DataInputTypeMut> for Documentation {}
impl Cast<dyn DataInputAssociationType> for Documentation {}
impl Cast<dyn DataInputAssociationTypeMut> for Documentation {}
impl Cast<dyn DataObjectType> for Documentation {}
impl Cast<dyn DataObjectTypeMut> for Documentation {}
impl Cast<dyn DataObjectReferenceType> for Documentation {}
impl Cast<dyn DataObjectReferenceTypeMut> for Documentation {}
impl Cast<dyn DataOutputType> for Documentation {}
impl Cast<dyn DataOutputTypeMut> for Documentation {}
impl Cast<dyn DataOutputAssociationType> for Documentation {}
impl Cast<dyn DataOutputAssociationTypeMut> for Documentation {}
impl Cast<dyn DataStateType> for Documentation {}
impl Cast<dyn DataStateTypeMut> for Documentation {}
impl Cast<dyn DataStoreType> for Documentation {}
impl Cast<dyn DataStoreTypeMut> for Documentation {}
impl Cast<dyn DataStoreReferenceType> for Documentation {}
impl Cast<dyn DataStoreReferenceTypeMut> for Documentation {}
impl Cast<dyn DocumentationType> for Documentation {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DocumentationTypeMut> for Documentation {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EndEventType> for Documentation {}
impl Cast<dyn EndEventTypeMut> for Documentation {}
impl Cast<dyn EndPointType> for Documentation {}
impl Cast<dyn EndPointTypeMut> for Documentation {}
impl Cast<dyn ErrorType> for Documentation {}
impl Cast<dyn ErrorTypeMut> for Documentation {}
impl Cast<dyn ErrorEventDefinitionType> for Documentation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn EscalationType> for Documentation {}
impl Cast<dyn EscalationTypeMut> for Documentation {}
impl Cast<dyn EscalationEventDefinitionType> for Documentation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn EventType> for Documentation {}
impl Cast<dyn EventTypeMut> for Documentation {}
impl Cast<dyn EventBasedGatewayType> for Documentation {}
impl Cast<dyn EventBasedGatewayTypeMut> for Documentation {}
impl Cast<dyn EventDefinitionType> for Documentation {}
impl Cast<dyn EventDefinitionTypeMut> for Documentation {}
impl Cast<dyn ExclusiveGatewayType> for Documentation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Documentation {}
impl Cast<dyn ExpressionType> for Documentation {}
impl Cast<dyn ExpressionTypeMut> for Documentation {}
impl Cast<dyn ExtensionType> for Documentation {}
impl Cast<dyn ExtensionTypeMut> for Documentation {}
impl Cast<dyn ExtensionElementsType> for Documentation {}
impl Cast<dyn ExtensionElementsTypeMut> for Documentation {}
impl Cast<dyn FlowElementType> for Documentation {}
impl Cast<dyn FlowElementTypeMut> for Documentation {}
impl Cast<dyn FlowNodeType> for Documentation {}
impl Cast<dyn FlowNodeTypeMut> for Documentation {}
impl Cast<dyn FormalExpressionType> for Documentation {}
impl Cast<dyn FormalExpressionTypeMut> for Documentation {}
impl Cast<dyn GatewayType> for Documentation {}
impl Cast<dyn GatewayTypeMut> for Documentation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Documentation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Documentation {}
impl Cast<dyn GlobalChoreographyTaskType> for Documentation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Documentation {}
impl Cast<dyn GlobalConversationType> for Documentation {}
impl Cast<dyn GlobalConversationTypeMut> for Documentation {}
impl Cast<dyn GlobalManualTaskType> for Documentation {}
impl Cast<dyn GlobalManualTaskTypeMut> for Documentation {}
impl Cast<dyn GlobalScriptTaskType> for Documentation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Documentation {}
impl Cast<dyn GlobalTaskType> for Documentation {}
impl Cast<dyn GlobalTaskTypeMut> for Documentation {}
impl Cast<dyn GlobalUserTaskType> for Documentation {}
impl Cast<dyn GlobalUserTaskTypeMut> for Documentation {}
impl Cast<dyn GroupType> for Documentation {}
impl Cast<dyn GroupTypeMut> for Documentation {}
impl Cast<dyn HumanPerformerType> for Documentation {}
impl Cast<dyn HumanPerformerTypeMut> for Documentation {}
impl Cast<dyn ImplicitThrowEventType> for Documentation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Documentation {}
impl Cast<dyn InclusiveGatewayType> for Documentation {}
impl Cast<dyn InclusiveGatewayTypeMut> for Documentation {}
impl Cast<dyn InputSetType> for Documentation {}
impl Cast<dyn InputSetTypeMut> for Documentation {}
impl Cast<dyn InterfaceType> for Documentation {}
impl Cast<dyn InterfaceTypeMut> for Documentation {}
impl Cast<dyn IntermediateCatchEventType> for Documentation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Documentation {}
impl Cast<dyn IntermediateThrowEventType> for Documentation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Documentation {}
impl Cast<dyn InputOutputBindingType> for Documentation {}
impl Cast<dyn InputOutputBindingTypeMut> for Documentation {}
impl Cast<dyn InputOutputSpecificationType> for Documentation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Documentation {}
impl Cast<dyn ItemDefinitionType> for Documentation {}
impl Cast<dyn ItemDefinitionTypeMut> for Documentation {}
impl Cast<dyn LaneType> for Documentation {}
impl Cast<dyn LaneTypeMut> for Documentation {}
impl Cast<dyn LaneSetType> for Documentation {}
impl Cast<dyn LaneSetTypeMut> for Documentation {}
impl Cast<dyn LinkEventDefinitionType> for Documentation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn LoopCharacteristicsType> for Documentation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Documentation {}
impl Cast<dyn ManualTaskType> for Documentation {}
impl Cast<dyn ManualTaskTypeMut> for Documentation {}
impl Cast<dyn MessageType> for Documentation {}
impl Cast<dyn MessageTypeMut> for Documentation {}
impl Cast<dyn MessageEventDefinitionType> for Documentation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn MessageFlowType> for Documentation {}
impl Cast<dyn MessageFlowTypeMut> for Documentation {}
impl Cast<dyn MessageFlowAssociationType> for Documentation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Documentation {}
impl Cast<dyn MonitoringType> for Documentation {}
impl Cast<dyn MonitoringTypeMut> for Documentation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Documentation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Documentation {}
impl Cast<dyn OperationType> for Documentation {}
impl Cast<dyn OperationTypeMut> for Documentation {}
impl Cast<dyn OutputSetType> for Documentation {}
impl Cast<dyn OutputSetTypeMut> for Documentation {}
impl Cast<dyn ParallelGatewayType> for Documentation {}
impl Cast<dyn ParallelGatewayTypeMut> for Documentation {}
impl Cast<dyn ParticipantType> for Documentation {}
impl Cast<dyn ParticipantTypeMut> for Documentation {}
impl Cast<dyn ParticipantAssociationType> for Documentation {}
impl Cast<dyn ParticipantAssociationTypeMut> for Documentation {}
impl Cast<dyn ParticipantMultiplicityType> for Documentation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Documentation {}
impl Cast<dyn PartnerEntityType> for Documentation {}
impl Cast<dyn PartnerEntityTypeMut> for Documentation {}
impl Cast<dyn PartnerRoleType> for Documentation {}
impl Cast<dyn PartnerRoleTypeMut> for Documentation {}
impl Cast<dyn PerformerType> for Documentation {}
impl Cast<dyn PerformerTypeMut> for Documentation {}
impl Cast<dyn PotentialOwnerType> for Documentation {}
impl Cast<dyn PotentialOwnerTypeMut> for Documentation {}
impl Cast<dyn ProcessType> for Documentation {}
impl Cast<dyn ProcessTypeMut> for Documentation {}
impl Cast<dyn PropertyType> for Documentation {}
impl Cast<dyn PropertyTypeMut> for Documentation {}
impl Cast<dyn ReceiveTaskType> for Documentation {}
impl Cast<dyn ReceiveTaskTypeMut> for Documentation {}
impl Cast<dyn RelationshipType> for Documentation {}
impl Cast<dyn RelationshipTypeMut> for Documentation {}
impl Cast<dyn RenderingType> for Documentation {}
impl Cast<dyn RenderingTypeMut> for Documentation {}
impl Cast<dyn ResourceType> for Documentation {}
impl Cast<dyn ResourceTypeMut> for Documentation {}
impl Cast<dyn ResourceAssignmentExpressionType> for Documentation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Documentation {}
impl Cast<dyn ResourceParameterType> for Documentation {}
impl Cast<dyn ResourceParameterTypeMut> for Documentation {}
impl Cast<dyn ResourceParameterBindingType> for Documentation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Documentation {}
impl Cast<dyn ResourceRoleType> for Documentation {}
impl Cast<dyn ResourceRoleTypeMut> for Documentation {}
impl Cast<dyn RootElementType> for Documentation {}
impl Cast<dyn RootElementTypeMut> for Documentation {}
impl Cast<dyn ScriptTaskType> for Documentation {}
impl Cast<dyn ScriptTaskTypeMut> for Documentation {}
impl Cast<dyn ScriptType> for Documentation {}
impl Cast<dyn ScriptTypeMut> for Documentation {}
impl Cast<dyn SendTaskType> for Documentation {}
impl Cast<dyn SendTaskTypeMut> for Documentation {}
impl Cast<dyn SequenceFlowType> for Documentation {}
impl Cast<dyn SequenceFlowTypeMut> for Documentation {}
impl Cast<dyn ServiceTaskType> for Documentation {}
impl Cast<dyn ServiceTaskTypeMut> for Documentation {}
impl Cast<dyn SignalType> for Documentation {}
impl Cast<dyn SignalTypeMut> for Documentation {}
impl Cast<dyn SignalEventDefinitionType> for Documentation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn StandardLoopCharacteristicsType> for Documentation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Documentation {}
impl Cast<dyn StartEventType> for Documentation {}
impl Cast<dyn StartEventTypeMut> for Documentation {}
impl Cast<dyn SubChoreographyType> for Documentation {}
impl Cast<dyn SubChoreographyTypeMut> for Documentation {}
impl Cast<dyn SubConversationType> for Documentation {}
impl Cast<dyn SubConversationTypeMut> for Documentation {}
impl Cast<dyn SubProcessType> for Documentation {}
impl Cast<dyn SubProcessTypeMut> for Documentation {}
impl Cast<dyn TaskType> for Documentation {}
impl Cast<dyn TaskTypeMut> for Documentation {}
impl Cast<dyn TerminateEventDefinitionType> for Documentation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn TextAnnotationType> for Documentation {}
impl Cast<dyn TextAnnotationTypeMut> for Documentation {}
impl Cast<dyn TextType> for Documentation {}
impl Cast<dyn TextTypeMut> for Documentation {}
impl Cast<dyn ThrowEventType> for Documentation {}
impl Cast<dyn ThrowEventTypeMut> for Documentation {}
impl Cast<dyn TimerEventDefinitionType> for Documentation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Documentation {}
impl Cast<dyn TransactionType> for Documentation {}
impl Cast<dyn TransactionTypeMut> for Documentation {}
impl Cast<dyn UserTaskType> for Documentation {}
impl Cast<dyn UserTaskTypeMut> for Documentation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:endEvent")]
pub struct EndEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInput")]
    #[tia("ThrowEventType",rg*="data_inputs","ThrowEventTypeMut",s,rmg*="data_inputs_mut")]
    pub data_inputs: Vec<DataInput>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ThrowEventType",rg*="data_input_associations","ThrowEventTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:inputSet")]
    #[tia("ThrowEventType",rg*="input_set","ThrowEventTypeMut",s,rmg*="input_set_mut")]
    pub input_set: Option<InputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("ThrowEventType",rg*="event_definitions","ThrowEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("ThrowEventType",rg*="event_definition_refs","ThrowEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
}
impl DocumentElement for EndEvent {
    fn element(&self) -> Element {
        Element::EndEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for EndEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EndEventType for EndEvent {}
impl EndEventTypeMut for EndEvent {}
//

/// Access to `endEvent`
pub trait EndEventType: ThrowEventType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(EndEventType);
impl_downcast!(EndEventType);
/// Mutable access to `endEvent`
pub trait EndEventTypeMut:
    ThrowEventTypeMut + Downcast + Debug + Send + DynClone + EndEventType
{
}
dyn_clone::clone_trait_object!(EndEventTypeMut);
impl_downcast!(EndEventTypeMut);
impl Cast<dyn DefinitionsType> for EndEvent {}
impl Cast<dyn DefinitionsTypeMut> for EndEvent {}
impl Cast<dyn ImportType> for EndEvent {}
impl Cast<dyn ImportTypeMut> for EndEvent {}
impl Cast<dyn ActivityType> for EndEvent {}
impl Cast<dyn ActivityTypeMut> for EndEvent {}
impl Cast<dyn AdHocSubProcessType> for EndEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for EndEvent {}
impl Cast<dyn ArtifactType> for EndEvent {}
impl Cast<dyn ArtifactTypeMut> for EndEvent {}
impl Cast<dyn AssignmentType> for EndEvent {}
impl Cast<dyn AssignmentTypeMut> for EndEvent {}
impl Cast<dyn AssociationType> for EndEvent {}
impl Cast<dyn AssociationTypeMut> for EndEvent {}
impl Cast<dyn AuditingType> for EndEvent {}
impl Cast<dyn AuditingTypeMut> for EndEvent {}
impl Cast<dyn BaseElementType> for EndEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for EndEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for EndEvent {}
impl Cast<dyn BoundaryEventType> for EndEvent {}
impl Cast<dyn BoundaryEventTypeMut> for EndEvent {}
impl Cast<dyn BusinessRuleTaskType> for EndEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for EndEvent {}
impl Cast<dyn CallableElementType> for EndEvent {}
impl Cast<dyn CallableElementTypeMut> for EndEvent {}
impl Cast<dyn CallActivityType> for EndEvent {}
impl Cast<dyn CallActivityTypeMut> for EndEvent {}
impl Cast<dyn CallChoreographyType> for EndEvent {}
impl Cast<dyn CallChoreographyTypeMut> for EndEvent {}
impl Cast<dyn CallConversationType> for EndEvent {}
impl Cast<dyn CallConversationTypeMut> for EndEvent {}
impl Cast<dyn CancelEventDefinitionType> for EndEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn CatchEventType> for EndEvent {}
impl Cast<dyn CatchEventTypeMut> for EndEvent {}
impl Cast<dyn CategoryType> for EndEvent {}
impl Cast<dyn CategoryTypeMut> for EndEvent {}
impl Cast<dyn CategoryValueType> for EndEvent {}
impl Cast<dyn CategoryValueTypeMut> for EndEvent {}
impl Cast<dyn ChoreographyType> for EndEvent {}
impl Cast<dyn ChoreographyTypeMut> for EndEvent {}
impl Cast<dyn ChoreographyActivityType> for EndEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for EndEvent {}
impl Cast<dyn ChoreographyTaskType> for EndEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for EndEvent {}
impl Cast<dyn CollaborationType> for EndEvent {}
impl Cast<dyn CollaborationTypeMut> for EndEvent {}
impl Cast<dyn CompensateEventDefinitionType> for EndEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for EndEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for EndEvent {}
impl Cast<dyn ComplexGatewayType> for EndEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for EndEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for EndEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn ConversationType> for EndEvent {}
impl Cast<dyn ConversationTypeMut> for EndEvent {}
impl Cast<dyn ConversationAssociationType> for EndEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for EndEvent {}
impl Cast<dyn ConversationLinkType> for EndEvent {}
impl Cast<dyn ConversationLinkTypeMut> for EndEvent {}
impl Cast<dyn ConversationNodeType> for EndEvent {}
impl Cast<dyn ConversationNodeTypeMut> for EndEvent {}
impl Cast<dyn CorrelationKeyType> for EndEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for EndEvent {}
impl Cast<dyn CorrelationPropertyType> for EndEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for EndEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for EndEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for EndEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for EndEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for EndEvent {}
impl Cast<dyn CorrelationSubscriptionType> for EndEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for EndEvent {}
impl Cast<dyn DataAssociationType> for EndEvent {}
impl Cast<dyn DataAssociationTypeMut> for EndEvent {}
impl Cast<dyn DataInputType> for EndEvent {}
impl Cast<dyn DataInputTypeMut> for EndEvent {}
impl Cast<dyn DataInputAssociationType> for EndEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for EndEvent {}
impl Cast<dyn DataObjectType> for EndEvent {}
impl Cast<dyn DataObjectTypeMut> for EndEvent {}
impl Cast<dyn DataObjectReferenceType> for EndEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for EndEvent {}
impl Cast<dyn DataOutputType> for EndEvent {}
impl Cast<dyn DataOutputTypeMut> for EndEvent {}
impl Cast<dyn DataOutputAssociationType> for EndEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for EndEvent {}
impl Cast<dyn DataStateType> for EndEvent {}
impl Cast<dyn DataStateTypeMut> for EndEvent {}
impl Cast<dyn DataStoreType> for EndEvent {}
impl Cast<dyn DataStoreTypeMut> for EndEvent {}
impl Cast<dyn DataStoreReferenceType> for EndEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for EndEvent {}
impl Cast<dyn DocumentationType> for EndEvent {}
impl Cast<dyn DocumentationTypeMut> for EndEvent {}
impl Cast<dyn EndEventType> for EndEvent {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EndEventTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EndPointType> for EndEvent {}
impl Cast<dyn EndPointTypeMut> for EndEvent {}
impl Cast<dyn ErrorType> for EndEvent {}
impl Cast<dyn ErrorTypeMut> for EndEvent {}
impl Cast<dyn ErrorEventDefinitionType> for EndEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn EscalationType> for EndEvent {}
impl Cast<dyn EscalationTypeMut> for EndEvent {}
impl Cast<dyn EscalationEventDefinitionType> for EndEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn EventType> for EndEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for EndEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for EndEvent {}
impl Cast<dyn EventDefinitionType> for EndEvent {}
impl Cast<dyn EventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn ExclusiveGatewayType> for EndEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for EndEvent {}
impl Cast<dyn ExpressionType> for EndEvent {}
impl Cast<dyn ExpressionTypeMut> for EndEvent {}
impl Cast<dyn ExtensionType> for EndEvent {}
impl Cast<dyn ExtensionTypeMut> for EndEvent {}
impl Cast<dyn ExtensionElementsType> for EndEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for EndEvent {}
impl Cast<dyn FlowElementType> for EndEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for EndEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for EndEvent {}
impl Cast<dyn FormalExpressionTypeMut> for EndEvent {}
impl Cast<dyn GatewayType> for EndEvent {}
impl Cast<dyn GatewayTypeMut> for EndEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for EndEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for EndEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for EndEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for EndEvent {}
impl Cast<dyn GlobalConversationType> for EndEvent {}
impl Cast<dyn GlobalConversationTypeMut> for EndEvent {}
impl Cast<dyn GlobalManualTaskType> for EndEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for EndEvent {}
impl Cast<dyn GlobalScriptTaskType> for EndEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for EndEvent {}
impl Cast<dyn GlobalTaskType> for EndEvent {}
impl Cast<dyn GlobalTaskTypeMut> for EndEvent {}
impl Cast<dyn GlobalUserTaskType> for EndEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for EndEvent {}
impl Cast<dyn GroupType> for EndEvent {}
impl Cast<dyn GroupTypeMut> for EndEvent {}
impl Cast<dyn HumanPerformerType> for EndEvent {}
impl Cast<dyn HumanPerformerTypeMut> for EndEvent {}
impl Cast<dyn ImplicitThrowEventType> for EndEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for EndEvent {}
impl Cast<dyn InclusiveGatewayType> for EndEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for EndEvent {}
impl Cast<dyn InputSetType> for EndEvent {}
impl Cast<dyn InputSetTypeMut> for EndEvent {}
impl Cast<dyn InterfaceType> for EndEvent {}
impl Cast<dyn InterfaceTypeMut> for EndEvent {}
impl Cast<dyn IntermediateCatchEventType> for EndEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for EndEvent {}
impl Cast<dyn IntermediateThrowEventType> for EndEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for EndEvent {}
impl Cast<dyn InputOutputBindingType> for EndEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for EndEvent {}
impl Cast<dyn InputOutputSpecificationType> for EndEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for EndEvent {}
impl Cast<dyn ItemDefinitionType> for EndEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for EndEvent {}
impl Cast<dyn LaneType> for EndEvent {}
impl Cast<dyn LaneTypeMut> for EndEvent {}
impl Cast<dyn LaneSetType> for EndEvent {}
impl Cast<dyn LaneSetTypeMut> for EndEvent {}
impl Cast<dyn LinkEventDefinitionType> for EndEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn LoopCharacteristicsType> for EndEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for EndEvent {}
impl Cast<dyn ManualTaskType> for EndEvent {}
impl Cast<dyn ManualTaskTypeMut> for EndEvent {}
impl Cast<dyn MessageType> for EndEvent {}
impl Cast<dyn MessageTypeMut> for EndEvent {}
impl Cast<dyn MessageEventDefinitionType> for EndEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn MessageFlowType> for EndEvent {}
impl Cast<dyn MessageFlowTypeMut> for EndEvent {}
impl Cast<dyn MessageFlowAssociationType> for EndEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for EndEvent {}
impl Cast<dyn MonitoringType> for EndEvent {}
impl Cast<dyn MonitoringTypeMut> for EndEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for EndEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for EndEvent {}
impl Cast<dyn OperationType> for EndEvent {}
impl Cast<dyn OperationTypeMut> for EndEvent {}
impl Cast<dyn OutputSetType> for EndEvent {}
impl Cast<dyn OutputSetTypeMut> for EndEvent {}
impl Cast<dyn ParallelGatewayType> for EndEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for EndEvent {}
impl Cast<dyn ParticipantType> for EndEvent {}
impl Cast<dyn ParticipantTypeMut> for EndEvent {}
impl Cast<dyn ParticipantAssociationType> for EndEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for EndEvent {}
impl Cast<dyn ParticipantMultiplicityType> for EndEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for EndEvent {}
impl Cast<dyn PartnerEntityType> for EndEvent {}
impl Cast<dyn PartnerEntityTypeMut> for EndEvent {}
impl Cast<dyn PartnerRoleType> for EndEvent {}
impl Cast<dyn PartnerRoleTypeMut> for EndEvent {}
impl Cast<dyn PerformerType> for EndEvent {}
impl Cast<dyn PerformerTypeMut> for EndEvent {}
impl Cast<dyn PotentialOwnerType> for EndEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for EndEvent {}
impl Cast<dyn ProcessType> for EndEvent {}
impl Cast<dyn ProcessTypeMut> for EndEvent {}
impl Cast<dyn PropertyType> for EndEvent {}
impl Cast<dyn PropertyTypeMut> for EndEvent {}
impl Cast<dyn ReceiveTaskType> for EndEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for EndEvent {}
impl Cast<dyn RelationshipType> for EndEvent {}
impl Cast<dyn RelationshipTypeMut> for EndEvent {}
impl Cast<dyn RenderingType> for EndEvent {}
impl Cast<dyn RenderingTypeMut> for EndEvent {}
impl Cast<dyn ResourceType> for EndEvent {}
impl Cast<dyn ResourceTypeMut> for EndEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for EndEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for EndEvent {}
impl Cast<dyn ResourceParameterType> for EndEvent {}
impl Cast<dyn ResourceParameterTypeMut> for EndEvent {}
impl Cast<dyn ResourceParameterBindingType> for EndEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for EndEvent {}
impl Cast<dyn ResourceRoleType> for EndEvent {}
impl Cast<dyn ResourceRoleTypeMut> for EndEvent {}
impl Cast<dyn RootElementType> for EndEvent {}
impl Cast<dyn RootElementTypeMut> for EndEvent {}
impl Cast<dyn ScriptTaskType> for EndEvent {}
impl Cast<dyn ScriptTaskTypeMut> for EndEvent {}
impl Cast<dyn ScriptType> for EndEvent {}
impl Cast<dyn ScriptTypeMut> for EndEvent {}
impl Cast<dyn SendTaskType> for EndEvent {}
impl Cast<dyn SendTaskTypeMut> for EndEvent {}
impl Cast<dyn SequenceFlowType> for EndEvent {}
impl Cast<dyn SequenceFlowTypeMut> for EndEvent {}
impl Cast<dyn ServiceTaskType> for EndEvent {}
impl Cast<dyn ServiceTaskTypeMut> for EndEvent {}
impl Cast<dyn SignalType> for EndEvent {}
impl Cast<dyn SignalTypeMut> for EndEvent {}
impl Cast<dyn SignalEventDefinitionType> for EndEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for EndEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for EndEvent {}
impl Cast<dyn StartEventType> for EndEvent {}
impl Cast<dyn StartEventTypeMut> for EndEvent {}
impl Cast<dyn SubChoreographyType> for EndEvent {}
impl Cast<dyn SubChoreographyTypeMut> for EndEvent {}
impl Cast<dyn SubConversationType> for EndEvent {}
impl Cast<dyn SubConversationTypeMut> for EndEvent {}
impl Cast<dyn SubProcessType> for EndEvent {}
impl Cast<dyn SubProcessTypeMut> for EndEvent {}
impl Cast<dyn TaskType> for EndEvent {}
impl Cast<dyn TaskTypeMut> for EndEvent {}
impl Cast<dyn TerminateEventDefinitionType> for EndEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn TextAnnotationType> for EndEvent {}
impl Cast<dyn TextAnnotationTypeMut> for EndEvent {}
impl Cast<dyn TextType> for EndEvent {}
impl Cast<dyn TextTypeMut> for EndEvent {}
impl Cast<dyn ThrowEventType> for EndEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ThrowEventTypeMut> for EndEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TimerEventDefinitionType> for EndEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for EndEvent {}
impl Cast<dyn TransactionType> for EndEvent {}
impl Cast<dyn TransactionTypeMut> for EndEvent {}
impl Cast<dyn UserTaskType> for EndEvent {}
impl Cast<dyn UserTaskTypeMut> for EndEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:endPoint")]
pub struct EndPoint {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for EndPoint {
    fn element(&self) -> Element {
        Element::EndPoint
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for EndPoint {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EndPointType for EndPoint {}
impl EndPointTypeMut for EndPoint {}
impl RootElementType for EndPoint {}
impl RootElementTypeMut for EndPoint {}
//

/// Access to `endPoint`
pub trait EndPointType: RootElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(EndPointType);
impl_downcast!(EndPointType);
/// Mutable access to `endPoint`
pub trait EndPointTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + EndPointType
{
}
dyn_clone::clone_trait_object!(EndPointTypeMut);
impl_downcast!(EndPointTypeMut);
impl Cast<dyn DefinitionsType> for EndPoint {}
impl Cast<dyn DefinitionsTypeMut> for EndPoint {}
impl Cast<dyn ImportType> for EndPoint {}
impl Cast<dyn ImportTypeMut> for EndPoint {}
impl Cast<dyn ActivityType> for EndPoint {}
impl Cast<dyn ActivityTypeMut> for EndPoint {}
impl Cast<dyn AdHocSubProcessType> for EndPoint {}
impl Cast<dyn AdHocSubProcessTypeMut> for EndPoint {}
impl Cast<dyn ArtifactType> for EndPoint {}
impl Cast<dyn ArtifactTypeMut> for EndPoint {}
impl Cast<dyn AssignmentType> for EndPoint {}
impl Cast<dyn AssignmentTypeMut> for EndPoint {}
impl Cast<dyn AssociationType> for EndPoint {}
impl Cast<dyn AssociationTypeMut> for EndPoint {}
impl Cast<dyn AuditingType> for EndPoint {}
impl Cast<dyn AuditingTypeMut> for EndPoint {}
impl Cast<dyn BaseElementType> for EndPoint {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for EndPoint {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for EndPoint {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for EndPoint {}
impl Cast<dyn BoundaryEventType> for EndPoint {}
impl Cast<dyn BoundaryEventTypeMut> for EndPoint {}
impl Cast<dyn BusinessRuleTaskType> for EndPoint {}
impl Cast<dyn BusinessRuleTaskTypeMut> for EndPoint {}
impl Cast<dyn CallableElementType> for EndPoint {}
impl Cast<dyn CallableElementTypeMut> for EndPoint {}
impl Cast<dyn CallActivityType> for EndPoint {}
impl Cast<dyn CallActivityTypeMut> for EndPoint {}
impl Cast<dyn CallChoreographyType> for EndPoint {}
impl Cast<dyn CallChoreographyTypeMut> for EndPoint {}
impl Cast<dyn CallConversationType> for EndPoint {}
impl Cast<dyn CallConversationTypeMut> for EndPoint {}
impl Cast<dyn CancelEventDefinitionType> for EndPoint {}
impl Cast<dyn CancelEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn CatchEventType> for EndPoint {}
impl Cast<dyn CatchEventTypeMut> for EndPoint {}
impl Cast<dyn CategoryType> for EndPoint {}
impl Cast<dyn CategoryTypeMut> for EndPoint {}
impl Cast<dyn CategoryValueType> for EndPoint {}
impl Cast<dyn CategoryValueTypeMut> for EndPoint {}
impl Cast<dyn ChoreographyType> for EndPoint {}
impl Cast<dyn ChoreographyTypeMut> for EndPoint {}
impl Cast<dyn ChoreographyActivityType> for EndPoint {}
impl Cast<dyn ChoreographyActivityTypeMut> for EndPoint {}
impl Cast<dyn ChoreographyTaskType> for EndPoint {}
impl Cast<dyn ChoreographyTaskTypeMut> for EndPoint {}
impl Cast<dyn CollaborationType> for EndPoint {}
impl Cast<dyn CollaborationTypeMut> for EndPoint {}
impl Cast<dyn CompensateEventDefinitionType> for EndPoint {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn ComplexBehaviorDefinitionType> for EndPoint {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for EndPoint {}
impl Cast<dyn ComplexGatewayType> for EndPoint {}
impl Cast<dyn ComplexGatewayTypeMut> for EndPoint {}
impl Cast<dyn ConditionalEventDefinitionType> for EndPoint {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn ConversationType> for EndPoint {}
impl Cast<dyn ConversationTypeMut> for EndPoint {}
impl Cast<dyn ConversationAssociationType> for EndPoint {}
impl Cast<dyn ConversationAssociationTypeMut> for EndPoint {}
impl Cast<dyn ConversationLinkType> for EndPoint {}
impl Cast<dyn ConversationLinkTypeMut> for EndPoint {}
impl Cast<dyn ConversationNodeType> for EndPoint {}
impl Cast<dyn ConversationNodeTypeMut> for EndPoint {}
impl Cast<dyn CorrelationKeyType> for EndPoint {}
impl Cast<dyn CorrelationKeyTypeMut> for EndPoint {}
impl Cast<dyn CorrelationPropertyType> for EndPoint {}
impl Cast<dyn CorrelationPropertyTypeMut> for EndPoint {}
impl Cast<dyn CorrelationPropertyBindingType> for EndPoint {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for EndPoint {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for EndPoint {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for EndPoint {}
impl Cast<dyn CorrelationSubscriptionType> for EndPoint {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for EndPoint {}
impl Cast<dyn DataAssociationType> for EndPoint {}
impl Cast<dyn DataAssociationTypeMut> for EndPoint {}
impl Cast<dyn DataInputType> for EndPoint {}
impl Cast<dyn DataInputTypeMut> for EndPoint {}
impl Cast<dyn DataInputAssociationType> for EndPoint {}
impl Cast<dyn DataInputAssociationTypeMut> for EndPoint {}
impl Cast<dyn DataObjectType> for EndPoint {}
impl Cast<dyn DataObjectTypeMut> for EndPoint {}
impl Cast<dyn DataObjectReferenceType> for EndPoint {}
impl Cast<dyn DataObjectReferenceTypeMut> for EndPoint {}
impl Cast<dyn DataOutputType> for EndPoint {}
impl Cast<dyn DataOutputTypeMut> for EndPoint {}
impl Cast<dyn DataOutputAssociationType> for EndPoint {}
impl Cast<dyn DataOutputAssociationTypeMut> for EndPoint {}
impl Cast<dyn DataStateType> for EndPoint {}
impl Cast<dyn DataStateTypeMut> for EndPoint {}
impl Cast<dyn DataStoreType> for EndPoint {}
impl Cast<dyn DataStoreTypeMut> for EndPoint {}
impl Cast<dyn DataStoreReferenceType> for EndPoint {}
impl Cast<dyn DataStoreReferenceTypeMut> for EndPoint {}
impl Cast<dyn DocumentationType> for EndPoint {}
impl Cast<dyn DocumentationTypeMut> for EndPoint {}
impl Cast<dyn EndEventType> for EndPoint {}
impl Cast<dyn EndEventTypeMut> for EndPoint {}
impl Cast<dyn EndPointType> for EndPoint {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EndPointTypeMut> for EndPoint {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ErrorType> for EndPoint {}
impl Cast<dyn ErrorTypeMut> for EndPoint {}
impl Cast<dyn ErrorEventDefinitionType> for EndPoint {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn EscalationType> for EndPoint {}
impl Cast<dyn EscalationTypeMut> for EndPoint {}
impl Cast<dyn EscalationEventDefinitionType> for EndPoint {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn EventType> for EndPoint {}
impl Cast<dyn EventTypeMut> for EndPoint {}
impl Cast<dyn EventBasedGatewayType> for EndPoint {}
impl Cast<dyn EventBasedGatewayTypeMut> for EndPoint {}
impl Cast<dyn EventDefinitionType> for EndPoint {}
impl Cast<dyn EventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn ExclusiveGatewayType> for EndPoint {}
impl Cast<dyn ExclusiveGatewayTypeMut> for EndPoint {}
impl Cast<dyn ExpressionType> for EndPoint {}
impl Cast<dyn ExpressionTypeMut> for EndPoint {}
impl Cast<dyn ExtensionType> for EndPoint {}
impl Cast<dyn ExtensionTypeMut> for EndPoint {}
impl Cast<dyn ExtensionElementsType> for EndPoint {}
impl Cast<dyn ExtensionElementsTypeMut> for EndPoint {}
impl Cast<dyn FlowElementType> for EndPoint {}
impl Cast<dyn FlowElementTypeMut> for EndPoint {}
impl Cast<dyn FlowNodeType> for EndPoint {}
impl Cast<dyn FlowNodeTypeMut> for EndPoint {}
impl Cast<dyn FormalExpressionType> for EndPoint {}
impl Cast<dyn FormalExpressionTypeMut> for EndPoint {}
impl Cast<dyn GatewayType> for EndPoint {}
impl Cast<dyn GatewayTypeMut> for EndPoint {}
impl Cast<dyn GlobalBusinessRuleTaskType> for EndPoint {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for EndPoint {}
impl Cast<dyn GlobalChoreographyTaskType> for EndPoint {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for EndPoint {}
impl Cast<dyn GlobalConversationType> for EndPoint {}
impl Cast<dyn GlobalConversationTypeMut> for EndPoint {}
impl Cast<dyn GlobalManualTaskType> for EndPoint {}
impl Cast<dyn GlobalManualTaskTypeMut> for EndPoint {}
impl Cast<dyn GlobalScriptTaskType> for EndPoint {}
impl Cast<dyn GlobalScriptTaskTypeMut> for EndPoint {}
impl Cast<dyn GlobalTaskType> for EndPoint {}
impl Cast<dyn GlobalTaskTypeMut> for EndPoint {}
impl Cast<dyn GlobalUserTaskType> for EndPoint {}
impl Cast<dyn GlobalUserTaskTypeMut> for EndPoint {}
impl Cast<dyn GroupType> for EndPoint {}
impl Cast<dyn GroupTypeMut> for EndPoint {}
impl Cast<dyn HumanPerformerType> for EndPoint {}
impl Cast<dyn HumanPerformerTypeMut> for EndPoint {}
impl Cast<dyn ImplicitThrowEventType> for EndPoint {}
impl Cast<dyn ImplicitThrowEventTypeMut> for EndPoint {}
impl Cast<dyn InclusiveGatewayType> for EndPoint {}
impl Cast<dyn InclusiveGatewayTypeMut> for EndPoint {}
impl Cast<dyn InputSetType> for EndPoint {}
impl Cast<dyn InputSetTypeMut> for EndPoint {}
impl Cast<dyn InterfaceType> for EndPoint {}
impl Cast<dyn InterfaceTypeMut> for EndPoint {}
impl Cast<dyn IntermediateCatchEventType> for EndPoint {}
impl Cast<dyn IntermediateCatchEventTypeMut> for EndPoint {}
impl Cast<dyn IntermediateThrowEventType> for EndPoint {}
impl Cast<dyn IntermediateThrowEventTypeMut> for EndPoint {}
impl Cast<dyn InputOutputBindingType> for EndPoint {}
impl Cast<dyn InputOutputBindingTypeMut> for EndPoint {}
impl Cast<dyn InputOutputSpecificationType> for EndPoint {}
impl Cast<dyn InputOutputSpecificationTypeMut> for EndPoint {}
impl Cast<dyn ItemDefinitionType> for EndPoint {}
impl Cast<dyn ItemDefinitionTypeMut> for EndPoint {}
impl Cast<dyn LaneType> for EndPoint {}
impl Cast<dyn LaneTypeMut> for EndPoint {}
impl Cast<dyn LaneSetType> for EndPoint {}
impl Cast<dyn LaneSetTypeMut> for EndPoint {}
impl Cast<dyn LinkEventDefinitionType> for EndPoint {}
impl Cast<dyn LinkEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn LoopCharacteristicsType> for EndPoint {}
impl Cast<dyn LoopCharacteristicsTypeMut> for EndPoint {}
impl Cast<dyn ManualTaskType> for EndPoint {}
impl Cast<dyn ManualTaskTypeMut> for EndPoint {}
impl Cast<dyn MessageType> for EndPoint {}
impl Cast<dyn MessageTypeMut> for EndPoint {}
impl Cast<dyn MessageEventDefinitionType> for EndPoint {}
impl Cast<dyn MessageEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn MessageFlowType> for EndPoint {}
impl Cast<dyn MessageFlowTypeMut> for EndPoint {}
impl Cast<dyn MessageFlowAssociationType> for EndPoint {}
impl Cast<dyn MessageFlowAssociationTypeMut> for EndPoint {}
impl Cast<dyn MonitoringType> for EndPoint {}
impl Cast<dyn MonitoringTypeMut> for EndPoint {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for EndPoint {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for EndPoint {}
impl Cast<dyn OperationType> for EndPoint {}
impl Cast<dyn OperationTypeMut> for EndPoint {}
impl Cast<dyn OutputSetType> for EndPoint {}
impl Cast<dyn OutputSetTypeMut> for EndPoint {}
impl Cast<dyn ParallelGatewayType> for EndPoint {}
impl Cast<dyn ParallelGatewayTypeMut> for EndPoint {}
impl Cast<dyn ParticipantType> for EndPoint {}
impl Cast<dyn ParticipantTypeMut> for EndPoint {}
impl Cast<dyn ParticipantAssociationType> for EndPoint {}
impl Cast<dyn ParticipantAssociationTypeMut> for EndPoint {}
impl Cast<dyn ParticipantMultiplicityType> for EndPoint {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for EndPoint {}
impl Cast<dyn PartnerEntityType> for EndPoint {}
impl Cast<dyn PartnerEntityTypeMut> for EndPoint {}
impl Cast<dyn PartnerRoleType> for EndPoint {}
impl Cast<dyn PartnerRoleTypeMut> for EndPoint {}
impl Cast<dyn PerformerType> for EndPoint {}
impl Cast<dyn PerformerTypeMut> for EndPoint {}
impl Cast<dyn PotentialOwnerType> for EndPoint {}
impl Cast<dyn PotentialOwnerTypeMut> for EndPoint {}
impl Cast<dyn ProcessType> for EndPoint {}
impl Cast<dyn ProcessTypeMut> for EndPoint {}
impl Cast<dyn PropertyType> for EndPoint {}
impl Cast<dyn PropertyTypeMut> for EndPoint {}
impl Cast<dyn ReceiveTaskType> for EndPoint {}
impl Cast<dyn ReceiveTaskTypeMut> for EndPoint {}
impl Cast<dyn RelationshipType> for EndPoint {}
impl Cast<dyn RelationshipTypeMut> for EndPoint {}
impl Cast<dyn RenderingType> for EndPoint {}
impl Cast<dyn RenderingTypeMut> for EndPoint {}
impl Cast<dyn ResourceType> for EndPoint {}
impl Cast<dyn ResourceTypeMut> for EndPoint {}
impl Cast<dyn ResourceAssignmentExpressionType> for EndPoint {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for EndPoint {}
impl Cast<dyn ResourceParameterType> for EndPoint {}
impl Cast<dyn ResourceParameterTypeMut> for EndPoint {}
impl Cast<dyn ResourceParameterBindingType> for EndPoint {}
impl Cast<dyn ResourceParameterBindingTypeMut> for EndPoint {}
impl Cast<dyn ResourceRoleType> for EndPoint {}
impl Cast<dyn ResourceRoleTypeMut> for EndPoint {}
impl Cast<dyn RootElementType> for EndPoint {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for EndPoint {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for EndPoint {}
impl Cast<dyn ScriptTaskTypeMut> for EndPoint {}
impl Cast<dyn ScriptType> for EndPoint {}
impl Cast<dyn ScriptTypeMut> for EndPoint {}
impl Cast<dyn SendTaskType> for EndPoint {}
impl Cast<dyn SendTaskTypeMut> for EndPoint {}
impl Cast<dyn SequenceFlowType> for EndPoint {}
impl Cast<dyn SequenceFlowTypeMut> for EndPoint {}
impl Cast<dyn ServiceTaskType> for EndPoint {}
impl Cast<dyn ServiceTaskTypeMut> for EndPoint {}
impl Cast<dyn SignalType> for EndPoint {}
impl Cast<dyn SignalTypeMut> for EndPoint {}
impl Cast<dyn SignalEventDefinitionType> for EndPoint {}
impl Cast<dyn SignalEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn StandardLoopCharacteristicsType> for EndPoint {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for EndPoint {}
impl Cast<dyn StartEventType> for EndPoint {}
impl Cast<dyn StartEventTypeMut> for EndPoint {}
impl Cast<dyn SubChoreographyType> for EndPoint {}
impl Cast<dyn SubChoreographyTypeMut> for EndPoint {}
impl Cast<dyn SubConversationType> for EndPoint {}
impl Cast<dyn SubConversationTypeMut> for EndPoint {}
impl Cast<dyn SubProcessType> for EndPoint {}
impl Cast<dyn SubProcessTypeMut> for EndPoint {}
impl Cast<dyn TaskType> for EndPoint {}
impl Cast<dyn TaskTypeMut> for EndPoint {}
impl Cast<dyn TerminateEventDefinitionType> for EndPoint {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn TextAnnotationType> for EndPoint {}
impl Cast<dyn TextAnnotationTypeMut> for EndPoint {}
impl Cast<dyn TextType> for EndPoint {}
impl Cast<dyn TextTypeMut> for EndPoint {}
impl Cast<dyn ThrowEventType> for EndPoint {}
impl Cast<dyn ThrowEventTypeMut> for EndPoint {}
impl Cast<dyn TimerEventDefinitionType> for EndPoint {}
impl Cast<dyn TimerEventDefinitionTypeMut> for EndPoint {}
impl Cast<dyn TransactionType> for EndPoint {}
impl Cast<dyn TransactionTypeMut> for EndPoint {}
impl Cast<dyn UserTaskType> for EndPoint {}
impl Cast<dyn UserTaskTypeMut> for EndPoint {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:error")]
pub struct Error {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ErrorType",rg*="name","ErrorTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "errorCode")]
    #[tia("ErrorType",rg*="error_code","ErrorTypeMut",s)]
    pub error_code: Option<String>,
    #[xml(attr = "structureRef")]
    #[tia("ErrorType",rg*="structure_ref","ErrorTypeMut",s)]
    pub structure_ref: Option<String>,
}
impl DocumentElement for Error {
    fn element(&self) -> Element {
        Element::Error
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Error {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for Error {}
impl RootElementTypeMut for Error {}
//

/// Access to `error`
pub trait ErrorType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `errorCode`
    fn error_code(&self) -> &Option<String>;
    /// Get value of attribute `structureRef`
    fn structure_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ErrorType);
impl_downcast!(ErrorType);
/// Mutable access to `error`
pub trait ErrorTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + ErrorType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `errorCode`
    fn set_error_code(&mut self, value: Option<String>);
    /// Set value of attribute `structureRef`
    fn set_structure_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ErrorTypeMut);
impl_downcast!(ErrorTypeMut);
impl Cast<dyn DefinitionsType> for Error {}
impl Cast<dyn DefinitionsTypeMut> for Error {}
impl Cast<dyn ImportType> for Error {}
impl Cast<dyn ImportTypeMut> for Error {}
impl Cast<dyn ActivityType> for Error {}
impl Cast<dyn ActivityTypeMut> for Error {}
impl Cast<dyn AdHocSubProcessType> for Error {}
impl Cast<dyn AdHocSubProcessTypeMut> for Error {}
impl Cast<dyn ArtifactType> for Error {}
impl Cast<dyn ArtifactTypeMut> for Error {}
impl Cast<dyn AssignmentType> for Error {}
impl Cast<dyn AssignmentTypeMut> for Error {}
impl Cast<dyn AssociationType> for Error {}
impl Cast<dyn AssociationTypeMut> for Error {}
impl Cast<dyn AuditingType> for Error {}
impl Cast<dyn AuditingTypeMut> for Error {}
impl Cast<dyn BaseElementType> for Error {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Error {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Error {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Error {}
impl Cast<dyn BoundaryEventType> for Error {}
impl Cast<dyn BoundaryEventTypeMut> for Error {}
impl Cast<dyn BusinessRuleTaskType> for Error {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Error {}
impl Cast<dyn CallableElementType> for Error {}
impl Cast<dyn CallableElementTypeMut> for Error {}
impl Cast<dyn CallActivityType> for Error {}
impl Cast<dyn CallActivityTypeMut> for Error {}
impl Cast<dyn CallChoreographyType> for Error {}
impl Cast<dyn CallChoreographyTypeMut> for Error {}
impl Cast<dyn CallConversationType> for Error {}
impl Cast<dyn CallConversationTypeMut> for Error {}
impl Cast<dyn CancelEventDefinitionType> for Error {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Error {}
impl Cast<dyn CatchEventType> for Error {}
impl Cast<dyn CatchEventTypeMut> for Error {}
impl Cast<dyn CategoryType> for Error {}
impl Cast<dyn CategoryTypeMut> for Error {}
impl Cast<dyn CategoryValueType> for Error {}
impl Cast<dyn CategoryValueTypeMut> for Error {}
impl Cast<dyn ChoreographyType> for Error {}
impl Cast<dyn ChoreographyTypeMut> for Error {}
impl Cast<dyn ChoreographyActivityType> for Error {}
impl Cast<dyn ChoreographyActivityTypeMut> for Error {}
impl Cast<dyn ChoreographyTaskType> for Error {}
impl Cast<dyn ChoreographyTaskTypeMut> for Error {}
impl Cast<dyn CollaborationType> for Error {}
impl Cast<dyn CollaborationTypeMut> for Error {}
impl Cast<dyn CompensateEventDefinitionType> for Error {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Error {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Error {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Error {}
impl Cast<dyn ComplexGatewayType> for Error {}
impl Cast<dyn ComplexGatewayTypeMut> for Error {}
impl Cast<dyn ConditionalEventDefinitionType> for Error {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Error {}
impl Cast<dyn ConversationType> for Error {}
impl Cast<dyn ConversationTypeMut> for Error {}
impl Cast<dyn ConversationAssociationType> for Error {}
impl Cast<dyn ConversationAssociationTypeMut> for Error {}
impl Cast<dyn ConversationLinkType> for Error {}
impl Cast<dyn ConversationLinkTypeMut> for Error {}
impl Cast<dyn ConversationNodeType> for Error {}
impl Cast<dyn ConversationNodeTypeMut> for Error {}
impl Cast<dyn CorrelationKeyType> for Error {}
impl Cast<dyn CorrelationKeyTypeMut> for Error {}
impl Cast<dyn CorrelationPropertyType> for Error {}
impl Cast<dyn CorrelationPropertyTypeMut> for Error {}
impl Cast<dyn CorrelationPropertyBindingType> for Error {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Error {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Error {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Error {}
impl Cast<dyn CorrelationSubscriptionType> for Error {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Error {}
impl Cast<dyn DataAssociationType> for Error {}
impl Cast<dyn DataAssociationTypeMut> for Error {}
impl Cast<dyn DataInputType> for Error {}
impl Cast<dyn DataInputTypeMut> for Error {}
impl Cast<dyn DataInputAssociationType> for Error {}
impl Cast<dyn DataInputAssociationTypeMut> for Error {}
impl Cast<dyn DataObjectType> for Error {}
impl Cast<dyn DataObjectTypeMut> for Error {}
impl Cast<dyn DataObjectReferenceType> for Error {}
impl Cast<dyn DataObjectReferenceTypeMut> for Error {}
impl Cast<dyn DataOutputType> for Error {}
impl Cast<dyn DataOutputTypeMut> for Error {}
impl Cast<dyn DataOutputAssociationType> for Error {}
impl Cast<dyn DataOutputAssociationTypeMut> for Error {}
impl Cast<dyn DataStateType> for Error {}
impl Cast<dyn DataStateTypeMut> for Error {}
impl Cast<dyn DataStoreType> for Error {}
impl Cast<dyn DataStoreTypeMut> for Error {}
impl Cast<dyn DataStoreReferenceType> for Error {}
impl Cast<dyn DataStoreReferenceTypeMut> for Error {}
impl Cast<dyn DocumentationType> for Error {}
impl Cast<dyn DocumentationTypeMut> for Error {}
impl Cast<dyn EndEventType> for Error {}
impl Cast<dyn EndEventTypeMut> for Error {}
impl Cast<dyn EndPointType> for Error {}
impl Cast<dyn EndPointTypeMut> for Error {}
impl Cast<dyn ErrorType> for Error {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ErrorTypeMut> for Error {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ErrorEventDefinitionType> for Error {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Error {}
impl Cast<dyn EscalationType> for Error {}
impl Cast<dyn EscalationTypeMut> for Error {}
impl Cast<dyn EscalationEventDefinitionType> for Error {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Error {}
impl Cast<dyn EventType> for Error {}
impl Cast<dyn EventTypeMut> for Error {}
impl Cast<dyn EventBasedGatewayType> for Error {}
impl Cast<dyn EventBasedGatewayTypeMut> for Error {}
impl Cast<dyn EventDefinitionType> for Error {}
impl Cast<dyn EventDefinitionTypeMut> for Error {}
impl Cast<dyn ExclusiveGatewayType> for Error {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Error {}
impl Cast<dyn ExpressionType> for Error {}
impl Cast<dyn ExpressionTypeMut> for Error {}
impl Cast<dyn ExtensionType> for Error {}
impl Cast<dyn ExtensionTypeMut> for Error {}
impl Cast<dyn ExtensionElementsType> for Error {}
impl Cast<dyn ExtensionElementsTypeMut> for Error {}
impl Cast<dyn FlowElementType> for Error {}
impl Cast<dyn FlowElementTypeMut> for Error {}
impl Cast<dyn FlowNodeType> for Error {}
impl Cast<dyn FlowNodeTypeMut> for Error {}
impl Cast<dyn FormalExpressionType> for Error {}
impl Cast<dyn FormalExpressionTypeMut> for Error {}
impl Cast<dyn GatewayType> for Error {}
impl Cast<dyn GatewayTypeMut> for Error {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Error {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Error {}
impl Cast<dyn GlobalChoreographyTaskType> for Error {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Error {}
impl Cast<dyn GlobalConversationType> for Error {}
impl Cast<dyn GlobalConversationTypeMut> for Error {}
impl Cast<dyn GlobalManualTaskType> for Error {}
impl Cast<dyn GlobalManualTaskTypeMut> for Error {}
impl Cast<dyn GlobalScriptTaskType> for Error {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Error {}
impl Cast<dyn GlobalTaskType> for Error {}
impl Cast<dyn GlobalTaskTypeMut> for Error {}
impl Cast<dyn GlobalUserTaskType> for Error {}
impl Cast<dyn GlobalUserTaskTypeMut> for Error {}
impl Cast<dyn GroupType> for Error {}
impl Cast<dyn GroupTypeMut> for Error {}
impl Cast<dyn HumanPerformerType> for Error {}
impl Cast<dyn HumanPerformerTypeMut> for Error {}
impl Cast<dyn ImplicitThrowEventType> for Error {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Error {}
impl Cast<dyn InclusiveGatewayType> for Error {}
impl Cast<dyn InclusiveGatewayTypeMut> for Error {}
impl Cast<dyn InputSetType> for Error {}
impl Cast<dyn InputSetTypeMut> for Error {}
impl Cast<dyn InterfaceType> for Error {}
impl Cast<dyn InterfaceTypeMut> for Error {}
impl Cast<dyn IntermediateCatchEventType> for Error {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Error {}
impl Cast<dyn IntermediateThrowEventType> for Error {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Error {}
impl Cast<dyn InputOutputBindingType> for Error {}
impl Cast<dyn InputOutputBindingTypeMut> for Error {}
impl Cast<dyn InputOutputSpecificationType> for Error {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Error {}
impl Cast<dyn ItemDefinitionType> for Error {}
impl Cast<dyn ItemDefinitionTypeMut> for Error {}
impl Cast<dyn LaneType> for Error {}
impl Cast<dyn LaneTypeMut> for Error {}
impl Cast<dyn LaneSetType> for Error {}
impl Cast<dyn LaneSetTypeMut> for Error {}
impl Cast<dyn LinkEventDefinitionType> for Error {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Error {}
impl Cast<dyn LoopCharacteristicsType> for Error {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Error {}
impl Cast<dyn ManualTaskType> for Error {}
impl Cast<dyn ManualTaskTypeMut> for Error {}
impl Cast<dyn MessageType> for Error {}
impl Cast<dyn MessageTypeMut> for Error {}
impl Cast<dyn MessageEventDefinitionType> for Error {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Error {}
impl Cast<dyn MessageFlowType> for Error {}
impl Cast<dyn MessageFlowTypeMut> for Error {}
impl Cast<dyn MessageFlowAssociationType> for Error {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Error {}
impl Cast<dyn MonitoringType> for Error {}
impl Cast<dyn MonitoringTypeMut> for Error {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Error {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Error {}
impl Cast<dyn OperationType> for Error {}
impl Cast<dyn OperationTypeMut> for Error {}
impl Cast<dyn OutputSetType> for Error {}
impl Cast<dyn OutputSetTypeMut> for Error {}
impl Cast<dyn ParallelGatewayType> for Error {}
impl Cast<dyn ParallelGatewayTypeMut> for Error {}
impl Cast<dyn ParticipantType> for Error {}
impl Cast<dyn ParticipantTypeMut> for Error {}
impl Cast<dyn ParticipantAssociationType> for Error {}
impl Cast<dyn ParticipantAssociationTypeMut> for Error {}
impl Cast<dyn ParticipantMultiplicityType> for Error {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Error {}
impl Cast<dyn PartnerEntityType> for Error {}
impl Cast<dyn PartnerEntityTypeMut> for Error {}
impl Cast<dyn PartnerRoleType> for Error {}
impl Cast<dyn PartnerRoleTypeMut> for Error {}
impl Cast<dyn PerformerType> for Error {}
impl Cast<dyn PerformerTypeMut> for Error {}
impl Cast<dyn PotentialOwnerType> for Error {}
impl Cast<dyn PotentialOwnerTypeMut> for Error {}
impl Cast<dyn ProcessType> for Error {}
impl Cast<dyn ProcessTypeMut> for Error {}
impl Cast<dyn PropertyType> for Error {}
impl Cast<dyn PropertyTypeMut> for Error {}
impl Cast<dyn ReceiveTaskType> for Error {}
impl Cast<dyn ReceiveTaskTypeMut> for Error {}
impl Cast<dyn RelationshipType> for Error {}
impl Cast<dyn RelationshipTypeMut> for Error {}
impl Cast<dyn RenderingType> for Error {}
impl Cast<dyn RenderingTypeMut> for Error {}
impl Cast<dyn ResourceType> for Error {}
impl Cast<dyn ResourceTypeMut> for Error {}
impl Cast<dyn ResourceAssignmentExpressionType> for Error {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Error {}
impl Cast<dyn ResourceParameterType> for Error {}
impl Cast<dyn ResourceParameterTypeMut> for Error {}
impl Cast<dyn ResourceParameterBindingType> for Error {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Error {}
impl Cast<dyn ResourceRoleType> for Error {}
impl Cast<dyn ResourceRoleTypeMut> for Error {}
impl Cast<dyn RootElementType> for Error {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Error {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Error {}
impl Cast<dyn ScriptTaskTypeMut> for Error {}
impl Cast<dyn ScriptType> for Error {}
impl Cast<dyn ScriptTypeMut> for Error {}
impl Cast<dyn SendTaskType> for Error {}
impl Cast<dyn SendTaskTypeMut> for Error {}
impl Cast<dyn SequenceFlowType> for Error {}
impl Cast<dyn SequenceFlowTypeMut> for Error {}
impl Cast<dyn ServiceTaskType> for Error {}
impl Cast<dyn ServiceTaskTypeMut> for Error {}
impl Cast<dyn SignalType> for Error {}
impl Cast<dyn SignalTypeMut> for Error {}
impl Cast<dyn SignalEventDefinitionType> for Error {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Error {}
impl Cast<dyn StandardLoopCharacteristicsType> for Error {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Error {}
impl Cast<dyn StartEventType> for Error {}
impl Cast<dyn StartEventTypeMut> for Error {}
impl Cast<dyn SubChoreographyType> for Error {}
impl Cast<dyn SubChoreographyTypeMut> for Error {}
impl Cast<dyn SubConversationType> for Error {}
impl Cast<dyn SubConversationTypeMut> for Error {}
impl Cast<dyn SubProcessType> for Error {}
impl Cast<dyn SubProcessTypeMut> for Error {}
impl Cast<dyn TaskType> for Error {}
impl Cast<dyn TaskTypeMut> for Error {}
impl Cast<dyn TerminateEventDefinitionType> for Error {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Error {}
impl Cast<dyn TextAnnotationType> for Error {}
impl Cast<dyn TextAnnotationTypeMut> for Error {}
impl Cast<dyn TextType> for Error {}
impl Cast<dyn TextTypeMut> for Error {}
impl Cast<dyn ThrowEventType> for Error {}
impl Cast<dyn ThrowEventTypeMut> for Error {}
impl Cast<dyn TimerEventDefinitionType> for Error {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Error {}
impl Cast<dyn TransactionType> for Error {}
impl Cast<dyn TransactionTypeMut> for Error {}
impl Cast<dyn UserTaskType> for Error {}
impl Cast<dyn UserTaskTypeMut> for Error {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:errorEventDefinition")]
pub struct ErrorEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "errorRef")]
    #[tia("ErrorEventDefinitionType",rg*="error_ref","ErrorEventDefinitionTypeMut",s)]
    pub error_ref: Option<String>,
}
impl DocumentElement for ErrorEventDefinition {
    fn element(&self) -> Element {
        Element::ErrorEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ErrorEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for ErrorEventDefinition {}
impl EventDefinitionTypeMut for ErrorEventDefinition {}
impl RootElementType for ErrorEventDefinition {}
impl RootElementTypeMut for ErrorEventDefinition {}
//

/// Access to `errorEventDefinition`
pub trait ErrorEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `errorRef`
    fn error_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ErrorEventDefinitionType);
impl_downcast!(ErrorEventDefinitionType);
/// Mutable access to `errorEventDefinition`
pub trait ErrorEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + ErrorEventDefinitionType
{
    /// Set value of attribute `errorRef`
    fn set_error_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ErrorEventDefinitionTypeMut);
impl_downcast!(ErrorEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for ErrorEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ImportType> for ErrorEventDefinition {}
impl Cast<dyn ImportTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ActivityType> for ErrorEventDefinition {}
impl Cast<dyn ActivityTypeMut> for ErrorEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for ErrorEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ArtifactType> for ErrorEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for ErrorEventDefinition {}
impl Cast<dyn AssignmentType> for ErrorEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for ErrorEventDefinition {}
impl Cast<dyn AssociationType> for ErrorEventDefinition {}
impl Cast<dyn AssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn AuditingType> for ErrorEventDefinition {}
impl Cast<dyn AuditingTypeMut> for ErrorEventDefinition {}
impl Cast<dyn BaseElementType> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ErrorEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ErrorEventDefinition {}
impl Cast<dyn BoundaryEventType> for ErrorEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for ErrorEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CallableElementType> for ErrorEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CallActivityType> for ErrorEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CallChoreographyType> for ErrorEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CallConversationType> for ErrorEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CatchEventType> for ErrorEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CategoryType> for ErrorEventDefinition {}
impl Cast<dyn CategoryTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CategoryValueType> for ErrorEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyType> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for ErrorEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CollaborationType> for ErrorEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ComplexGatewayType> for ErrorEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ConversationType> for ErrorEventDefinition {}
impl Cast<dyn ConversationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ConversationAssociationType> for ErrorEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ConversationLinkType> for ErrorEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ConversationNodeType> for ErrorEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CorrelationKeyType> for ErrorEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ErrorEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for ErrorEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataAssociationType> for ErrorEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataInputType> for ErrorEventDefinition {}
impl Cast<dyn DataInputTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataInputAssociationType> for ErrorEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataObjectType> for ErrorEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for ErrorEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataOutputType> for ErrorEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for ErrorEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataStateType> for ErrorEventDefinition {}
impl Cast<dyn DataStateTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataStoreType> for ErrorEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for ErrorEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for ErrorEventDefinition {}
impl Cast<dyn DocumentationType> for ErrorEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EndEventType> for ErrorEventDefinition {}
impl Cast<dyn EndEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EndPointType> for ErrorEventDefinition {}
impl Cast<dyn EndPointTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ErrorType> for ErrorEventDefinition {}
impl Cast<dyn ErrorTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EscalationType> for ErrorEventDefinition {}
impl Cast<dyn EscalationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EventType> for ErrorEventDefinition {}
impl Cast<dyn EventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for ErrorEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn EventDefinitionType> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for ErrorEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ExpressionType> for ErrorEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ExtensionType> for ErrorEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ExtensionElementsType> for ErrorEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for ErrorEventDefinition {}
impl Cast<dyn FlowElementType> for ErrorEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for ErrorEventDefinition {}
impl Cast<dyn FlowNodeType> for ErrorEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for ErrorEventDefinition {}
impl Cast<dyn FormalExpressionType> for ErrorEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GatewayType> for ErrorEventDefinition {}
impl Cast<dyn GatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalConversationType> for ErrorEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for ErrorEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn GroupType> for ErrorEventDefinition {}
impl Cast<dyn GroupTypeMut> for ErrorEventDefinition {}
impl Cast<dyn HumanPerformerType> for ErrorEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for ErrorEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for ErrorEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn InputSetType> for ErrorEventDefinition {}
impl Cast<dyn InputSetTypeMut> for ErrorEventDefinition {}
impl Cast<dyn InterfaceType> for ErrorEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for ErrorEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for ErrorEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for ErrorEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn InputOutputBindingType> for ErrorEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for ErrorEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for ErrorEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ItemDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn LaneType> for ErrorEventDefinition {}
impl Cast<dyn LaneTypeMut> for ErrorEventDefinition {}
impl Cast<dyn LaneSetType> for ErrorEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for ErrorEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for ErrorEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ManualTaskType> for ErrorEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MessageType> for ErrorEventDefinition {}
impl Cast<dyn MessageTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MessageFlowType> for ErrorEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for ErrorEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MonitoringType> for ErrorEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for ErrorEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ErrorEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ErrorEventDefinition {}
impl Cast<dyn OperationType> for ErrorEventDefinition {}
impl Cast<dyn OperationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn OutputSetType> for ErrorEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ParallelGatewayType> for ErrorEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ParticipantType> for ErrorEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for ErrorEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for ErrorEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ErrorEventDefinition {}
impl Cast<dyn PartnerEntityType> for ErrorEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for ErrorEventDefinition {}
impl Cast<dyn PartnerRoleType> for ErrorEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for ErrorEventDefinition {}
impl Cast<dyn PerformerType> for ErrorEventDefinition {}
impl Cast<dyn PerformerTypeMut> for ErrorEventDefinition {}
impl Cast<dyn PotentialOwnerType> for ErrorEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ProcessType> for ErrorEventDefinition {}
impl Cast<dyn ProcessTypeMut> for ErrorEventDefinition {}
impl Cast<dyn PropertyType> for ErrorEventDefinition {}
impl Cast<dyn PropertyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ReceiveTaskType> for ErrorEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn RelationshipType> for ErrorEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for ErrorEventDefinition {}
impl Cast<dyn RenderingType> for ErrorEventDefinition {}
impl Cast<dyn RenderingTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ResourceType> for ErrorEventDefinition {}
impl Cast<dyn ResourceTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for ErrorEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ResourceParameterType> for ErrorEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for ErrorEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ResourceRoleType> for ErrorEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for ErrorEventDefinition {}
impl Cast<dyn RootElementType> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for ErrorEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for ErrorEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ScriptType> for ErrorEventDefinition {}
impl Cast<dyn ScriptTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SendTaskType> for ErrorEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SequenceFlowType> for ErrorEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ServiceTaskType> for ErrorEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SignalType> for ErrorEventDefinition {}
impl Cast<dyn SignalTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for ErrorEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ErrorEventDefinition {}
impl Cast<dyn StartEventType> for ErrorEventDefinition {}
impl Cast<dyn StartEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SubChoreographyType> for ErrorEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SubConversationType> for ErrorEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn SubProcessType> for ErrorEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TaskType> for ErrorEventDefinition {}
impl Cast<dyn TaskTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TextAnnotationType> for ErrorEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TextType> for ErrorEventDefinition {}
impl Cast<dyn TextTypeMut> for ErrorEventDefinition {}
impl Cast<dyn ThrowEventType> for ErrorEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for ErrorEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn TransactionType> for ErrorEventDefinition {}
impl Cast<dyn TransactionTypeMut> for ErrorEventDefinition {}
impl Cast<dyn UserTaskType> for ErrorEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for ErrorEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:escalation")]
pub struct Escalation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("EscalationType",rg*="name","EscalationTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "escalationCode")]
    #[tia("EscalationType",rg*="escalation_code","EscalationTypeMut",s)]
    pub escalation_code: Option<String>,
    #[xml(attr = "structureRef")]
    #[tia("EscalationType",rg*="structure_ref","EscalationTypeMut",s)]
    pub structure_ref: Option<String>,
}
impl DocumentElement for Escalation {
    fn element(&self) -> Element {
        Element::Escalation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Escalation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for Escalation {}
impl RootElementTypeMut for Escalation {}
//

/// Access to `escalation`
pub trait EscalationType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `escalationCode`
    fn escalation_code(&self) -> &Option<String>;
    /// Get value of attribute `structureRef`
    fn structure_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(EscalationType);
impl_downcast!(EscalationType);
/// Mutable access to `escalation`
pub trait EscalationTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + EscalationType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `escalationCode`
    fn set_escalation_code(&mut self, value: Option<String>);
    /// Set value of attribute `structureRef`
    fn set_structure_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(EscalationTypeMut);
impl_downcast!(EscalationTypeMut);
impl Cast<dyn DefinitionsType> for Escalation {}
impl Cast<dyn DefinitionsTypeMut> for Escalation {}
impl Cast<dyn ImportType> for Escalation {}
impl Cast<dyn ImportTypeMut> for Escalation {}
impl Cast<dyn ActivityType> for Escalation {}
impl Cast<dyn ActivityTypeMut> for Escalation {}
impl Cast<dyn AdHocSubProcessType> for Escalation {}
impl Cast<dyn AdHocSubProcessTypeMut> for Escalation {}
impl Cast<dyn ArtifactType> for Escalation {}
impl Cast<dyn ArtifactTypeMut> for Escalation {}
impl Cast<dyn AssignmentType> for Escalation {}
impl Cast<dyn AssignmentTypeMut> for Escalation {}
impl Cast<dyn AssociationType> for Escalation {}
impl Cast<dyn AssociationTypeMut> for Escalation {}
impl Cast<dyn AuditingType> for Escalation {}
impl Cast<dyn AuditingTypeMut> for Escalation {}
impl Cast<dyn BaseElementType> for Escalation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Escalation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Escalation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Escalation {}
impl Cast<dyn BoundaryEventType> for Escalation {}
impl Cast<dyn BoundaryEventTypeMut> for Escalation {}
impl Cast<dyn BusinessRuleTaskType> for Escalation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Escalation {}
impl Cast<dyn CallableElementType> for Escalation {}
impl Cast<dyn CallableElementTypeMut> for Escalation {}
impl Cast<dyn CallActivityType> for Escalation {}
impl Cast<dyn CallActivityTypeMut> for Escalation {}
impl Cast<dyn CallChoreographyType> for Escalation {}
impl Cast<dyn CallChoreographyTypeMut> for Escalation {}
impl Cast<dyn CallConversationType> for Escalation {}
impl Cast<dyn CallConversationTypeMut> for Escalation {}
impl Cast<dyn CancelEventDefinitionType> for Escalation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn CatchEventType> for Escalation {}
impl Cast<dyn CatchEventTypeMut> for Escalation {}
impl Cast<dyn CategoryType> for Escalation {}
impl Cast<dyn CategoryTypeMut> for Escalation {}
impl Cast<dyn CategoryValueType> for Escalation {}
impl Cast<dyn CategoryValueTypeMut> for Escalation {}
impl Cast<dyn ChoreographyType> for Escalation {}
impl Cast<dyn ChoreographyTypeMut> for Escalation {}
impl Cast<dyn ChoreographyActivityType> for Escalation {}
impl Cast<dyn ChoreographyActivityTypeMut> for Escalation {}
impl Cast<dyn ChoreographyTaskType> for Escalation {}
impl Cast<dyn ChoreographyTaskTypeMut> for Escalation {}
impl Cast<dyn CollaborationType> for Escalation {}
impl Cast<dyn CollaborationTypeMut> for Escalation {}
impl Cast<dyn CompensateEventDefinitionType> for Escalation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Escalation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Escalation {}
impl Cast<dyn ComplexGatewayType> for Escalation {}
impl Cast<dyn ComplexGatewayTypeMut> for Escalation {}
impl Cast<dyn ConditionalEventDefinitionType> for Escalation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn ConversationType> for Escalation {}
impl Cast<dyn ConversationTypeMut> for Escalation {}
impl Cast<dyn ConversationAssociationType> for Escalation {}
impl Cast<dyn ConversationAssociationTypeMut> for Escalation {}
impl Cast<dyn ConversationLinkType> for Escalation {}
impl Cast<dyn ConversationLinkTypeMut> for Escalation {}
impl Cast<dyn ConversationNodeType> for Escalation {}
impl Cast<dyn ConversationNodeTypeMut> for Escalation {}
impl Cast<dyn CorrelationKeyType> for Escalation {}
impl Cast<dyn CorrelationKeyTypeMut> for Escalation {}
impl Cast<dyn CorrelationPropertyType> for Escalation {}
impl Cast<dyn CorrelationPropertyTypeMut> for Escalation {}
impl Cast<dyn CorrelationPropertyBindingType> for Escalation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Escalation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Escalation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Escalation {}
impl Cast<dyn CorrelationSubscriptionType> for Escalation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Escalation {}
impl Cast<dyn DataAssociationType> for Escalation {}
impl Cast<dyn DataAssociationTypeMut> for Escalation {}
impl Cast<dyn DataInputType> for Escalation {}
impl Cast<dyn DataInputTypeMut> for Escalation {}
impl Cast<dyn DataInputAssociationType> for Escalation {}
impl Cast<dyn DataInputAssociationTypeMut> for Escalation {}
impl Cast<dyn DataObjectType> for Escalation {}
impl Cast<dyn DataObjectTypeMut> for Escalation {}
impl Cast<dyn DataObjectReferenceType> for Escalation {}
impl Cast<dyn DataObjectReferenceTypeMut> for Escalation {}
impl Cast<dyn DataOutputType> for Escalation {}
impl Cast<dyn DataOutputTypeMut> for Escalation {}
impl Cast<dyn DataOutputAssociationType> for Escalation {}
impl Cast<dyn DataOutputAssociationTypeMut> for Escalation {}
impl Cast<dyn DataStateType> for Escalation {}
impl Cast<dyn DataStateTypeMut> for Escalation {}
impl Cast<dyn DataStoreType> for Escalation {}
impl Cast<dyn DataStoreTypeMut> for Escalation {}
impl Cast<dyn DataStoreReferenceType> for Escalation {}
impl Cast<dyn DataStoreReferenceTypeMut> for Escalation {}
impl Cast<dyn DocumentationType> for Escalation {}
impl Cast<dyn DocumentationTypeMut> for Escalation {}
impl Cast<dyn EndEventType> for Escalation {}
impl Cast<dyn EndEventTypeMut> for Escalation {}
impl Cast<dyn EndPointType> for Escalation {}
impl Cast<dyn EndPointTypeMut> for Escalation {}
impl Cast<dyn ErrorType> for Escalation {}
impl Cast<dyn ErrorTypeMut> for Escalation {}
impl Cast<dyn ErrorEventDefinitionType> for Escalation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn EscalationType> for Escalation {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EscalationTypeMut> for Escalation {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EscalationEventDefinitionType> for Escalation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn EventType> for Escalation {}
impl Cast<dyn EventTypeMut> for Escalation {}
impl Cast<dyn EventBasedGatewayType> for Escalation {}
impl Cast<dyn EventBasedGatewayTypeMut> for Escalation {}
impl Cast<dyn EventDefinitionType> for Escalation {}
impl Cast<dyn EventDefinitionTypeMut> for Escalation {}
impl Cast<dyn ExclusiveGatewayType> for Escalation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Escalation {}
impl Cast<dyn ExpressionType> for Escalation {}
impl Cast<dyn ExpressionTypeMut> for Escalation {}
impl Cast<dyn ExtensionType> for Escalation {}
impl Cast<dyn ExtensionTypeMut> for Escalation {}
impl Cast<dyn ExtensionElementsType> for Escalation {}
impl Cast<dyn ExtensionElementsTypeMut> for Escalation {}
impl Cast<dyn FlowElementType> for Escalation {}
impl Cast<dyn FlowElementTypeMut> for Escalation {}
impl Cast<dyn FlowNodeType> for Escalation {}
impl Cast<dyn FlowNodeTypeMut> for Escalation {}
impl Cast<dyn FormalExpressionType> for Escalation {}
impl Cast<dyn FormalExpressionTypeMut> for Escalation {}
impl Cast<dyn GatewayType> for Escalation {}
impl Cast<dyn GatewayTypeMut> for Escalation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Escalation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Escalation {}
impl Cast<dyn GlobalChoreographyTaskType> for Escalation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Escalation {}
impl Cast<dyn GlobalConversationType> for Escalation {}
impl Cast<dyn GlobalConversationTypeMut> for Escalation {}
impl Cast<dyn GlobalManualTaskType> for Escalation {}
impl Cast<dyn GlobalManualTaskTypeMut> for Escalation {}
impl Cast<dyn GlobalScriptTaskType> for Escalation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Escalation {}
impl Cast<dyn GlobalTaskType> for Escalation {}
impl Cast<dyn GlobalTaskTypeMut> for Escalation {}
impl Cast<dyn GlobalUserTaskType> for Escalation {}
impl Cast<dyn GlobalUserTaskTypeMut> for Escalation {}
impl Cast<dyn GroupType> for Escalation {}
impl Cast<dyn GroupTypeMut> for Escalation {}
impl Cast<dyn HumanPerformerType> for Escalation {}
impl Cast<dyn HumanPerformerTypeMut> for Escalation {}
impl Cast<dyn ImplicitThrowEventType> for Escalation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Escalation {}
impl Cast<dyn InclusiveGatewayType> for Escalation {}
impl Cast<dyn InclusiveGatewayTypeMut> for Escalation {}
impl Cast<dyn InputSetType> for Escalation {}
impl Cast<dyn InputSetTypeMut> for Escalation {}
impl Cast<dyn InterfaceType> for Escalation {}
impl Cast<dyn InterfaceTypeMut> for Escalation {}
impl Cast<dyn IntermediateCatchEventType> for Escalation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Escalation {}
impl Cast<dyn IntermediateThrowEventType> for Escalation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Escalation {}
impl Cast<dyn InputOutputBindingType> for Escalation {}
impl Cast<dyn InputOutputBindingTypeMut> for Escalation {}
impl Cast<dyn InputOutputSpecificationType> for Escalation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Escalation {}
impl Cast<dyn ItemDefinitionType> for Escalation {}
impl Cast<dyn ItemDefinitionTypeMut> for Escalation {}
impl Cast<dyn LaneType> for Escalation {}
impl Cast<dyn LaneTypeMut> for Escalation {}
impl Cast<dyn LaneSetType> for Escalation {}
impl Cast<dyn LaneSetTypeMut> for Escalation {}
impl Cast<dyn LinkEventDefinitionType> for Escalation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn LoopCharacteristicsType> for Escalation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Escalation {}
impl Cast<dyn ManualTaskType> for Escalation {}
impl Cast<dyn ManualTaskTypeMut> for Escalation {}
impl Cast<dyn MessageType> for Escalation {}
impl Cast<dyn MessageTypeMut> for Escalation {}
impl Cast<dyn MessageEventDefinitionType> for Escalation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn MessageFlowType> for Escalation {}
impl Cast<dyn MessageFlowTypeMut> for Escalation {}
impl Cast<dyn MessageFlowAssociationType> for Escalation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Escalation {}
impl Cast<dyn MonitoringType> for Escalation {}
impl Cast<dyn MonitoringTypeMut> for Escalation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Escalation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Escalation {}
impl Cast<dyn OperationType> for Escalation {}
impl Cast<dyn OperationTypeMut> for Escalation {}
impl Cast<dyn OutputSetType> for Escalation {}
impl Cast<dyn OutputSetTypeMut> for Escalation {}
impl Cast<dyn ParallelGatewayType> for Escalation {}
impl Cast<dyn ParallelGatewayTypeMut> for Escalation {}
impl Cast<dyn ParticipantType> for Escalation {}
impl Cast<dyn ParticipantTypeMut> for Escalation {}
impl Cast<dyn ParticipantAssociationType> for Escalation {}
impl Cast<dyn ParticipantAssociationTypeMut> for Escalation {}
impl Cast<dyn ParticipantMultiplicityType> for Escalation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Escalation {}
impl Cast<dyn PartnerEntityType> for Escalation {}
impl Cast<dyn PartnerEntityTypeMut> for Escalation {}
impl Cast<dyn PartnerRoleType> for Escalation {}
impl Cast<dyn PartnerRoleTypeMut> for Escalation {}
impl Cast<dyn PerformerType> for Escalation {}
impl Cast<dyn PerformerTypeMut> for Escalation {}
impl Cast<dyn PotentialOwnerType> for Escalation {}
impl Cast<dyn PotentialOwnerTypeMut> for Escalation {}
impl Cast<dyn ProcessType> for Escalation {}
impl Cast<dyn ProcessTypeMut> for Escalation {}
impl Cast<dyn PropertyType> for Escalation {}
impl Cast<dyn PropertyTypeMut> for Escalation {}
impl Cast<dyn ReceiveTaskType> for Escalation {}
impl Cast<dyn ReceiveTaskTypeMut> for Escalation {}
impl Cast<dyn RelationshipType> for Escalation {}
impl Cast<dyn RelationshipTypeMut> for Escalation {}
impl Cast<dyn RenderingType> for Escalation {}
impl Cast<dyn RenderingTypeMut> for Escalation {}
impl Cast<dyn ResourceType> for Escalation {}
impl Cast<dyn ResourceTypeMut> for Escalation {}
impl Cast<dyn ResourceAssignmentExpressionType> for Escalation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Escalation {}
impl Cast<dyn ResourceParameterType> for Escalation {}
impl Cast<dyn ResourceParameterTypeMut> for Escalation {}
impl Cast<dyn ResourceParameterBindingType> for Escalation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Escalation {}
impl Cast<dyn ResourceRoleType> for Escalation {}
impl Cast<dyn ResourceRoleTypeMut> for Escalation {}
impl Cast<dyn RootElementType> for Escalation {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Escalation {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Escalation {}
impl Cast<dyn ScriptTaskTypeMut> for Escalation {}
impl Cast<dyn ScriptType> for Escalation {}
impl Cast<dyn ScriptTypeMut> for Escalation {}
impl Cast<dyn SendTaskType> for Escalation {}
impl Cast<dyn SendTaskTypeMut> for Escalation {}
impl Cast<dyn SequenceFlowType> for Escalation {}
impl Cast<dyn SequenceFlowTypeMut> for Escalation {}
impl Cast<dyn ServiceTaskType> for Escalation {}
impl Cast<dyn ServiceTaskTypeMut> for Escalation {}
impl Cast<dyn SignalType> for Escalation {}
impl Cast<dyn SignalTypeMut> for Escalation {}
impl Cast<dyn SignalEventDefinitionType> for Escalation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn StandardLoopCharacteristicsType> for Escalation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Escalation {}
impl Cast<dyn StartEventType> for Escalation {}
impl Cast<dyn StartEventTypeMut> for Escalation {}
impl Cast<dyn SubChoreographyType> for Escalation {}
impl Cast<dyn SubChoreographyTypeMut> for Escalation {}
impl Cast<dyn SubConversationType> for Escalation {}
impl Cast<dyn SubConversationTypeMut> for Escalation {}
impl Cast<dyn SubProcessType> for Escalation {}
impl Cast<dyn SubProcessTypeMut> for Escalation {}
impl Cast<dyn TaskType> for Escalation {}
impl Cast<dyn TaskTypeMut> for Escalation {}
impl Cast<dyn TerminateEventDefinitionType> for Escalation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn TextAnnotationType> for Escalation {}
impl Cast<dyn TextAnnotationTypeMut> for Escalation {}
impl Cast<dyn TextType> for Escalation {}
impl Cast<dyn TextTypeMut> for Escalation {}
impl Cast<dyn ThrowEventType> for Escalation {}
impl Cast<dyn ThrowEventTypeMut> for Escalation {}
impl Cast<dyn TimerEventDefinitionType> for Escalation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Escalation {}
impl Cast<dyn TransactionType> for Escalation {}
impl Cast<dyn TransactionTypeMut> for Escalation {}
impl Cast<dyn UserTaskType> for Escalation {}
impl Cast<dyn UserTaskTypeMut> for Escalation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:escalationEventDefinition")]
pub struct EscalationEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "escalationRef")]
    #[tia("EscalationEventDefinitionType",rg*="escalation_ref","EscalationEventDefinitionTypeMut",s)]
    pub escalation_ref: Option<String>,
}
impl DocumentElement for EscalationEventDefinition {
    fn element(&self) -> Element {
        Element::EscalationEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for EscalationEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for EscalationEventDefinition {}
impl EventDefinitionTypeMut for EscalationEventDefinition {}
impl RootElementType for EscalationEventDefinition {}
impl RootElementTypeMut for EscalationEventDefinition {}
//

/// Access to `escalationEventDefinition`
pub trait EscalationEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `escalationRef`
    fn escalation_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(EscalationEventDefinitionType);
impl_downcast!(EscalationEventDefinitionType);
/// Mutable access to `escalationEventDefinition`
pub trait EscalationEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + EscalationEventDefinitionType
{
    /// Set value of attribute `escalationRef`
    fn set_escalation_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(EscalationEventDefinitionTypeMut);
impl_downcast!(EscalationEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for EscalationEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ImportType> for EscalationEventDefinition {}
impl Cast<dyn ImportTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ActivityType> for EscalationEventDefinition {}
impl Cast<dyn ActivityTypeMut> for EscalationEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for EscalationEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ArtifactType> for EscalationEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for EscalationEventDefinition {}
impl Cast<dyn AssignmentType> for EscalationEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for EscalationEventDefinition {}
impl Cast<dyn AssociationType> for EscalationEventDefinition {}
impl Cast<dyn AssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn AuditingType> for EscalationEventDefinition {}
impl Cast<dyn AuditingTypeMut> for EscalationEventDefinition {}
impl Cast<dyn BaseElementType> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for EscalationEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for EscalationEventDefinition {}
impl Cast<dyn BoundaryEventType> for EscalationEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for EscalationEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CallableElementType> for EscalationEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CallActivityType> for EscalationEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CallChoreographyType> for EscalationEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CallConversationType> for EscalationEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CatchEventType> for EscalationEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CategoryType> for EscalationEventDefinition {}
impl Cast<dyn CategoryTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CategoryValueType> for EscalationEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyType> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for EscalationEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CollaborationType> for EscalationEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ComplexGatewayType> for EscalationEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ConversationType> for EscalationEventDefinition {}
impl Cast<dyn ConversationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ConversationAssociationType> for EscalationEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ConversationLinkType> for EscalationEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ConversationNodeType> for EscalationEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CorrelationKeyType> for EscalationEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for EscalationEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for EscalationEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataAssociationType> for EscalationEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataInputType> for EscalationEventDefinition {}
impl Cast<dyn DataInputTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataInputAssociationType> for EscalationEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataObjectType> for EscalationEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for EscalationEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataOutputType> for EscalationEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for EscalationEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataStateType> for EscalationEventDefinition {}
impl Cast<dyn DataStateTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataStoreType> for EscalationEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for EscalationEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for EscalationEventDefinition {}
impl Cast<dyn DocumentationType> for EscalationEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EndEventType> for EscalationEventDefinition {}
impl Cast<dyn EndEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EndPointType> for EscalationEventDefinition {}
impl Cast<dyn EndPointTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ErrorType> for EscalationEventDefinition {}
impl Cast<dyn ErrorTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EscalationType> for EscalationEventDefinition {}
impl Cast<dyn EscalationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventType> for EscalationEventDefinition {}
impl Cast<dyn EventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for EscalationEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn EventDefinitionType> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for EscalationEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ExpressionType> for EscalationEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ExtensionType> for EscalationEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ExtensionElementsType> for EscalationEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for EscalationEventDefinition {}
impl Cast<dyn FlowElementType> for EscalationEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for EscalationEventDefinition {}
impl Cast<dyn FlowNodeType> for EscalationEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for EscalationEventDefinition {}
impl Cast<dyn FormalExpressionType> for EscalationEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GatewayType> for EscalationEventDefinition {}
impl Cast<dyn GatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalConversationType> for EscalationEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for EscalationEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn GroupType> for EscalationEventDefinition {}
impl Cast<dyn GroupTypeMut> for EscalationEventDefinition {}
impl Cast<dyn HumanPerformerType> for EscalationEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for EscalationEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for EscalationEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn InputSetType> for EscalationEventDefinition {}
impl Cast<dyn InputSetTypeMut> for EscalationEventDefinition {}
impl Cast<dyn InterfaceType> for EscalationEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for EscalationEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for EscalationEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for EscalationEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn InputOutputBindingType> for EscalationEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for EscalationEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for EscalationEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ItemDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn LaneType> for EscalationEventDefinition {}
impl Cast<dyn LaneTypeMut> for EscalationEventDefinition {}
impl Cast<dyn LaneSetType> for EscalationEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for EscalationEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for EscalationEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ManualTaskType> for EscalationEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MessageType> for EscalationEventDefinition {}
impl Cast<dyn MessageTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MessageFlowType> for EscalationEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for EscalationEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MonitoringType> for EscalationEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for EscalationEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for EscalationEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for EscalationEventDefinition {}
impl Cast<dyn OperationType> for EscalationEventDefinition {}
impl Cast<dyn OperationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn OutputSetType> for EscalationEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ParallelGatewayType> for EscalationEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ParticipantType> for EscalationEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for EscalationEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for EscalationEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for EscalationEventDefinition {}
impl Cast<dyn PartnerEntityType> for EscalationEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for EscalationEventDefinition {}
impl Cast<dyn PartnerRoleType> for EscalationEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for EscalationEventDefinition {}
impl Cast<dyn PerformerType> for EscalationEventDefinition {}
impl Cast<dyn PerformerTypeMut> for EscalationEventDefinition {}
impl Cast<dyn PotentialOwnerType> for EscalationEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ProcessType> for EscalationEventDefinition {}
impl Cast<dyn ProcessTypeMut> for EscalationEventDefinition {}
impl Cast<dyn PropertyType> for EscalationEventDefinition {}
impl Cast<dyn PropertyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ReceiveTaskType> for EscalationEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn RelationshipType> for EscalationEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for EscalationEventDefinition {}
impl Cast<dyn RenderingType> for EscalationEventDefinition {}
impl Cast<dyn RenderingTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ResourceType> for EscalationEventDefinition {}
impl Cast<dyn ResourceTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for EscalationEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ResourceParameterType> for EscalationEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for EscalationEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ResourceRoleType> for EscalationEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for EscalationEventDefinition {}
impl Cast<dyn RootElementType> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for EscalationEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for EscalationEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ScriptType> for EscalationEventDefinition {}
impl Cast<dyn ScriptTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SendTaskType> for EscalationEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SequenceFlowType> for EscalationEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ServiceTaskType> for EscalationEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SignalType> for EscalationEventDefinition {}
impl Cast<dyn SignalTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for EscalationEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for EscalationEventDefinition {}
impl Cast<dyn StartEventType> for EscalationEventDefinition {}
impl Cast<dyn StartEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SubChoreographyType> for EscalationEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SubConversationType> for EscalationEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn SubProcessType> for EscalationEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TaskType> for EscalationEventDefinition {}
impl Cast<dyn TaskTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TextAnnotationType> for EscalationEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TextType> for EscalationEventDefinition {}
impl Cast<dyn TextTypeMut> for EscalationEventDefinition {}
impl Cast<dyn ThrowEventType> for EscalationEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for EscalationEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn TransactionType> for EscalationEventDefinition {}
impl Cast<dyn TransactionTypeMut> for EscalationEventDefinition {}
impl Cast<dyn UserTaskType> for EscalationEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for EscalationEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:event")]
#[serde(tag = "type")]
pub enum Event {}
impl Event {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for Event {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for Event {
    fn element(&self) -> Element {
        Element::Event
    }
}
/// Access to `event`
pub trait EventType: FlowNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of `property` child
    fn properties(&self) -> &Vec<Property>;
}
dyn_clone::clone_trait_object!(EventType);
impl_downcast!(EventType);
/// Mutable access to `event`
pub trait EventTypeMut: FlowNodeTypeMut + Downcast + Debug + Send + DynClone + EventType {
    /// Get a mutable value of `property` child
    fn properties_mut(&mut self) -> &mut Vec<Property>;
    /// Set value of `property` child
    fn set_properties(&mut self, value: Vec<Property>);
}
dyn_clone::clone_trait_object!(EventTypeMut);
impl_downcast!(EventTypeMut);
impl Cast<dyn DefinitionsType> for Event {}
impl Cast<dyn DefinitionsTypeMut> for Event {}
impl Cast<dyn ImportType> for Event {}
impl Cast<dyn ImportTypeMut> for Event {}
impl Cast<dyn ActivityType> for Event {}
impl Cast<dyn ActivityTypeMut> for Event {}
impl Cast<dyn AdHocSubProcessType> for Event {}
impl Cast<dyn AdHocSubProcessTypeMut> for Event {}
impl Cast<dyn ArtifactType> for Event {}
impl Cast<dyn ArtifactTypeMut> for Event {}
impl Cast<dyn AssignmentType> for Event {}
impl Cast<dyn AssignmentTypeMut> for Event {}
impl Cast<dyn AssociationType> for Event {}
impl Cast<dyn AssociationTypeMut> for Event {}
impl Cast<dyn AuditingType> for Event {}
impl Cast<dyn AuditingTypeMut> for Event {}
impl Cast<dyn BaseElementType> for Event {}
impl Cast<dyn BaseElementTypeMut> for Event {}
impl Cast<dyn BaseElementWithMixedContentType> for Event {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Event {}
impl Cast<dyn BoundaryEventType> for Event {}
impl Cast<dyn BoundaryEventTypeMut> for Event {}
impl Cast<dyn BusinessRuleTaskType> for Event {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Event {}
impl Cast<dyn CallableElementType> for Event {}
impl Cast<dyn CallableElementTypeMut> for Event {}
impl Cast<dyn CallActivityType> for Event {}
impl Cast<dyn CallActivityTypeMut> for Event {}
impl Cast<dyn CallChoreographyType> for Event {}
impl Cast<dyn CallChoreographyTypeMut> for Event {}
impl Cast<dyn CallConversationType> for Event {}
impl Cast<dyn CallConversationTypeMut> for Event {}
impl Cast<dyn CancelEventDefinitionType> for Event {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Event {}
impl Cast<dyn CatchEventType> for Event {}
impl Cast<dyn CatchEventTypeMut> for Event {}
impl Cast<dyn CategoryType> for Event {}
impl Cast<dyn CategoryTypeMut> for Event {}
impl Cast<dyn CategoryValueType> for Event {}
impl Cast<dyn CategoryValueTypeMut> for Event {}
impl Cast<dyn ChoreographyType> for Event {}
impl Cast<dyn ChoreographyTypeMut> for Event {}
impl Cast<dyn ChoreographyActivityType> for Event {}
impl Cast<dyn ChoreographyActivityTypeMut> for Event {}
impl Cast<dyn ChoreographyTaskType> for Event {}
impl Cast<dyn ChoreographyTaskTypeMut> for Event {}
impl Cast<dyn CollaborationType> for Event {}
impl Cast<dyn CollaborationTypeMut> for Event {}
impl Cast<dyn CompensateEventDefinitionType> for Event {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Event {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Event {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Event {}
impl Cast<dyn ComplexGatewayType> for Event {}
impl Cast<dyn ComplexGatewayTypeMut> for Event {}
impl Cast<dyn ConditionalEventDefinitionType> for Event {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Event {}
impl Cast<dyn ConversationType> for Event {}
impl Cast<dyn ConversationTypeMut> for Event {}
impl Cast<dyn ConversationAssociationType> for Event {}
impl Cast<dyn ConversationAssociationTypeMut> for Event {}
impl Cast<dyn ConversationLinkType> for Event {}
impl Cast<dyn ConversationLinkTypeMut> for Event {}
impl Cast<dyn ConversationNodeType> for Event {}
impl Cast<dyn ConversationNodeTypeMut> for Event {}
impl Cast<dyn CorrelationKeyType> for Event {}
impl Cast<dyn CorrelationKeyTypeMut> for Event {}
impl Cast<dyn CorrelationPropertyType> for Event {}
impl Cast<dyn CorrelationPropertyTypeMut> for Event {}
impl Cast<dyn CorrelationPropertyBindingType> for Event {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Event {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Event {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Event {}
impl Cast<dyn CorrelationSubscriptionType> for Event {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Event {}
impl Cast<dyn DataAssociationType> for Event {}
impl Cast<dyn DataAssociationTypeMut> for Event {}
impl Cast<dyn DataInputType> for Event {}
impl Cast<dyn DataInputTypeMut> for Event {}
impl Cast<dyn DataInputAssociationType> for Event {}
impl Cast<dyn DataInputAssociationTypeMut> for Event {}
impl Cast<dyn DataObjectType> for Event {}
impl Cast<dyn DataObjectTypeMut> for Event {}
impl Cast<dyn DataObjectReferenceType> for Event {}
impl Cast<dyn DataObjectReferenceTypeMut> for Event {}
impl Cast<dyn DataOutputType> for Event {}
impl Cast<dyn DataOutputTypeMut> for Event {}
impl Cast<dyn DataOutputAssociationType> for Event {}
impl Cast<dyn DataOutputAssociationTypeMut> for Event {}
impl Cast<dyn DataStateType> for Event {}
impl Cast<dyn DataStateTypeMut> for Event {}
impl Cast<dyn DataStoreType> for Event {}
impl Cast<dyn DataStoreTypeMut> for Event {}
impl Cast<dyn DataStoreReferenceType> for Event {}
impl Cast<dyn DataStoreReferenceTypeMut> for Event {}
impl Cast<dyn DocumentationType> for Event {}
impl Cast<dyn DocumentationTypeMut> for Event {}
impl Cast<dyn EndEventType> for Event {}
impl Cast<dyn EndEventTypeMut> for Event {}
impl Cast<dyn EndPointType> for Event {}
impl Cast<dyn EndPointTypeMut> for Event {}
impl Cast<dyn ErrorType> for Event {}
impl Cast<dyn ErrorTypeMut> for Event {}
impl Cast<dyn ErrorEventDefinitionType> for Event {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Event {}
impl Cast<dyn EscalationType> for Event {}
impl Cast<dyn EscalationTypeMut> for Event {}
impl Cast<dyn EscalationEventDefinitionType> for Event {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Event {}
impl Cast<dyn EventType> for Event {}
impl Cast<dyn EventTypeMut> for Event {}
impl Cast<dyn EventBasedGatewayType> for Event {}
impl Cast<dyn EventBasedGatewayTypeMut> for Event {}
impl Cast<dyn EventDefinitionType> for Event {}
impl Cast<dyn EventDefinitionTypeMut> for Event {}
impl Cast<dyn ExclusiveGatewayType> for Event {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Event {}
impl Cast<dyn ExpressionType> for Event {}
impl Cast<dyn ExpressionTypeMut> for Event {}
impl Cast<dyn ExtensionType> for Event {}
impl Cast<dyn ExtensionTypeMut> for Event {}
impl Cast<dyn ExtensionElementsType> for Event {}
impl Cast<dyn ExtensionElementsTypeMut> for Event {}
impl Cast<dyn FlowElementType> for Event {}
impl Cast<dyn FlowElementTypeMut> for Event {}
impl Cast<dyn FlowNodeType> for Event {}
impl Cast<dyn FlowNodeTypeMut> for Event {}
impl Cast<dyn FormalExpressionType> for Event {}
impl Cast<dyn FormalExpressionTypeMut> for Event {}
impl Cast<dyn GatewayType> for Event {}
impl Cast<dyn GatewayTypeMut> for Event {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Event {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Event {}
impl Cast<dyn GlobalChoreographyTaskType> for Event {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Event {}
impl Cast<dyn GlobalConversationType> for Event {}
impl Cast<dyn GlobalConversationTypeMut> for Event {}
impl Cast<dyn GlobalManualTaskType> for Event {}
impl Cast<dyn GlobalManualTaskTypeMut> for Event {}
impl Cast<dyn GlobalScriptTaskType> for Event {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Event {}
impl Cast<dyn GlobalTaskType> for Event {}
impl Cast<dyn GlobalTaskTypeMut> for Event {}
impl Cast<dyn GlobalUserTaskType> for Event {}
impl Cast<dyn GlobalUserTaskTypeMut> for Event {}
impl Cast<dyn GroupType> for Event {}
impl Cast<dyn GroupTypeMut> for Event {}
impl Cast<dyn HumanPerformerType> for Event {}
impl Cast<dyn HumanPerformerTypeMut> for Event {}
impl Cast<dyn ImplicitThrowEventType> for Event {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Event {}
impl Cast<dyn InclusiveGatewayType> for Event {}
impl Cast<dyn InclusiveGatewayTypeMut> for Event {}
impl Cast<dyn InputSetType> for Event {}
impl Cast<dyn InputSetTypeMut> for Event {}
impl Cast<dyn InterfaceType> for Event {}
impl Cast<dyn InterfaceTypeMut> for Event {}
impl Cast<dyn IntermediateCatchEventType> for Event {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Event {}
impl Cast<dyn IntermediateThrowEventType> for Event {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Event {}
impl Cast<dyn InputOutputBindingType> for Event {}
impl Cast<dyn InputOutputBindingTypeMut> for Event {}
impl Cast<dyn InputOutputSpecificationType> for Event {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Event {}
impl Cast<dyn ItemDefinitionType> for Event {}
impl Cast<dyn ItemDefinitionTypeMut> for Event {}
impl Cast<dyn LaneType> for Event {}
impl Cast<dyn LaneTypeMut> for Event {}
impl Cast<dyn LaneSetType> for Event {}
impl Cast<dyn LaneSetTypeMut> for Event {}
impl Cast<dyn LinkEventDefinitionType> for Event {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Event {}
impl Cast<dyn LoopCharacteristicsType> for Event {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Event {}
impl Cast<dyn ManualTaskType> for Event {}
impl Cast<dyn ManualTaskTypeMut> for Event {}
impl Cast<dyn MessageType> for Event {}
impl Cast<dyn MessageTypeMut> for Event {}
impl Cast<dyn MessageEventDefinitionType> for Event {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Event {}
impl Cast<dyn MessageFlowType> for Event {}
impl Cast<dyn MessageFlowTypeMut> for Event {}
impl Cast<dyn MessageFlowAssociationType> for Event {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Event {}
impl Cast<dyn MonitoringType> for Event {}
impl Cast<dyn MonitoringTypeMut> for Event {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Event {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Event {}
impl Cast<dyn OperationType> for Event {}
impl Cast<dyn OperationTypeMut> for Event {}
impl Cast<dyn OutputSetType> for Event {}
impl Cast<dyn OutputSetTypeMut> for Event {}
impl Cast<dyn ParallelGatewayType> for Event {}
impl Cast<dyn ParallelGatewayTypeMut> for Event {}
impl Cast<dyn ParticipantType> for Event {}
impl Cast<dyn ParticipantTypeMut> for Event {}
impl Cast<dyn ParticipantAssociationType> for Event {}
impl Cast<dyn ParticipantAssociationTypeMut> for Event {}
impl Cast<dyn ParticipantMultiplicityType> for Event {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Event {}
impl Cast<dyn PartnerEntityType> for Event {}
impl Cast<dyn PartnerEntityTypeMut> for Event {}
impl Cast<dyn PartnerRoleType> for Event {}
impl Cast<dyn PartnerRoleTypeMut> for Event {}
impl Cast<dyn PerformerType> for Event {}
impl Cast<dyn PerformerTypeMut> for Event {}
impl Cast<dyn PotentialOwnerType> for Event {}
impl Cast<dyn PotentialOwnerTypeMut> for Event {}
impl Cast<dyn ProcessType> for Event {}
impl Cast<dyn ProcessTypeMut> for Event {}
impl Cast<dyn PropertyType> for Event {}
impl Cast<dyn PropertyTypeMut> for Event {}
impl Cast<dyn ReceiveTaskType> for Event {}
impl Cast<dyn ReceiveTaskTypeMut> for Event {}
impl Cast<dyn RelationshipType> for Event {}
impl Cast<dyn RelationshipTypeMut> for Event {}
impl Cast<dyn RenderingType> for Event {}
impl Cast<dyn RenderingTypeMut> for Event {}
impl Cast<dyn ResourceType> for Event {}
impl Cast<dyn ResourceTypeMut> for Event {}
impl Cast<dyn ResourceAssignmentExpressionType> for Event {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Event {}
impl Cast<dyn ResourceParameterType> for Event {}
impl Cast<dyn ResourceParameterTypeMut> for Event {}
impl Cast<dyn ResourceParameterBindingType> for Event {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Event {}
impl Cast<dyn ResourceRoleType> for Event {}
impl Cast<dyn ResourceRoleTypeMut> for Event {}
impl Cast<dyn RootElementType> for Event {}
impl Cast<dyn RootElementTypeMut> for Event {}
impl Cast<dyn ScriptTaskType> for Event {}
impl Cast<dyn ScriptTaskTypeMut> for Event {}
impl Cast<dyn ScriptType> for Event {}
impl Cast<dyn ScriptTypeMut> for Event {}
impl Cast<dyn SendTaskType> for Event {}
impl Cast<dyn SendTaskTypeMut> for Event {}
impl Cast<dyn SequenceFlowType> for Event {}
impl Cast<dyn SequenceFlowTypeMut> for Event {}
impl Cast<dyn ServiceTaskType> for Event {}
impl Cast<dyn ServiceTaskTypeMut> for Event {}
impl Cast<dyn SignalType> for Event {}
impl Cast<dyn SignalTypeMut> for Event {}
impl Cast<dyn SignalEventDefinitionType> for Event {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Event {}
impl Cast<dyn StandardLoopCharacteristicsType> for Event {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Event {}
impl Cast<dyn StartEventType> for Event {}
impl Cast<dyn StartEventTypeMut> for Event {}
impl Cast<dyn SubChoreographyType> for Event {}
impl Cast<dyn SubChoreographyTypeMut> for Event {}
impl Cast<dyn SubConversationType> for Event {}
impl Cast<dyn SubConversationTypeMut> for Event {}
impl Cast<dyn SubProcessType> for Event {}
impl Cast<dyn SubProcessTypeMut> for Event {}
impl Cast<dyn TaskType> for Event {}
impl Cast<dyn TaskTypeMut> for Event {}
impl Cast<dyn TerminateEventDefinitionType> for Event {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Event {}
impl Cast<dyn TextAnnotationType> for Event {}
impl Cast<dyn TextAnnotationTypeMut> for Event {}
impl Cast<dyn TextType> for Event {}
impl Cast<dyn TextTypeMut> for Event {}
impl Cast<dyn ThrowEventType> for Event {}
impl Cast<dyn ThrowEventTypeMut> for Event {}
impl Cast<dyn TimerEventDefinitionType> for Event {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Event {}
impl Cast<dyn TransactionType> for Event {}
impl Cast<dyn TransactionTypeMut> for Event {}
impl Cast<dyn UserTaskType> for Event {}
impl Cast<dyn UserTaskTypeMut> for Event {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:eventBasedGateway")]
pub struct EventBasedGateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
    #[xml(attr = "instantiate")]
    #[tia("EventBasedGatewayType",rg*="instantiate","EventBasedGatewayTypeMut",s)]
    pub instantiate: Option<bool>,
    #[xml(attr = "eventGatewayType")]
    #[tia("EventBasedGatewayType",rg*="event_gateway_type","EventBasedGatewayTypeMut",s)]
    pub event_gateway_type: Option<String>,
}
impl DocumentElement for EventBasedGateway {
    fn element(&self) -> Element {
        Element::EventBasedGateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for EventBasedGateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `eventBasedGateway`
pub trait EventBasedGatewayType: GatewayType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `instantiate`
    fn instantiate(&self) -> &Option<bool>;
    /// Get value of attribute `eventGatewayType`
    fn event_gateway_type(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(EventBasedGatewayType);
impl_downcast!(EventBasedGatewayType);
/// Mutable access to `eventBasedGateway`
pub trait EventBasedGatewayTypeMut:
    GatewayTypeMut + Downcast + Debug + Send + DynClone + EventBasedGatewayType
{
    /// Set value of attribute `instantiate`
    fn set_instantiate(&mut self, value: Option<bool>);
    /// Set value of attribute `eventGatewayType`
    fn set_event_gateway_type(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(EventBasedGatewayTypeMut);
impl_downcast!(EventBasedGatewayTypeMut);
impl Cast<dyn DefinitionsType> for EventBasedGateway {}
impl Cast<dyn DefinitionsTypeMut> for EventBasedGateway {}
impl Cast<dyn ImportType> for EventBasedGateway {}
impl Cast<dyn ImportTypeMut> for EventBasedGateway {}
impl Cast<dyn ActivityType> for EventBasedGateway {}
impl Cast<dyn ActivityTypeMut> for EventBasedGateway {}
impl Cast<dyn AdHocSubProcessType> for EventBasedGateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for EventBasedGateway {}
impl Cast<dyn ArtifactType> for EventBasedGateway {}
impl Cast<dyn ArtifactTypeMut> for EventBasedGateway {}
impl Cast<dyn AssignmentType> for EventBasedGateway {}
impl Cast<dyn AssignmentTypeMut> for EventBasedGateway {}
impl Cast<dyn AssociationType> for EventBasedGateway {}
impl Cast<dyn AssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn AuditingType> for EventBasedGateway {}
impl Cast<dyn AuditingTypeMut> for EventBasedGateway {}
impl Cast<dyn BaseElementType> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for EventBasedGateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for EventBasedGateway {}
impl Cast<dyn BoundaryEventType> for EventBasedGateway {}
impl Cast<dyn BoundaryEventTypeMut> for EventBasedGateway {}
impl Cast<dyn BusinessRuleTaskType> for EventBasedGateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn CallableElementType> for EventBasedGateway {}
impl Cast<dyn CallableElementTypeMut> for EventBasedGateway {}
impl Cast<dyn CallActivityType> for EventBasedGateway {}
impl Cast<dyn CallActivityTypeMut> for EventBasedGateway {}
impl Cast<dyn CallChoreographyType> for EventBasedGateway {}
impl Cast<dyn CallChoreographyTypeMut> for EventBasedGateway {}
impl Cast<dyn CallConversationType> for EventBasedGateway {}
impl Cast<dyn CallConversationTypeMut> for EventBasedGateway {}
impl Cast<dyn CancelEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn CatchEventType> for EventBasedGateway {}
impl Cast<dyn CatchEventTypeMut> for EventBasedGateway {}
impl Cast<dyn CategoryType> for EventBasedGateway {}
impl Cast<dyn CategoryTypeMut> for EventBasedGateway {}
impl Cast<dyn CategoryValueType> for EventBasedGateway {}
impl Cast<dyn CategoryValueTypeMut> for EventBasedGateway {}
impl Cast<dyn ChoreographyType> for EventBasedGateway {}
impl Cast<dyn ChoreographyTypeMut> for EventBasedGateway {}
impl Cast<dyn ChoreographyActivityType> for EventBasedGateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for EventBasedGateway {}
impl Cast<dyn ChoreographyTaskType> for EventBasedGateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn CollaborationType> for EventBasedGateway {}
impl Cast<dyn CollaborationTypeMut> for EventBasedGateway {}
impl Cast<dyn CompensateEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for EventBasedGateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn ComplexGatewayType> for EventBasedGateway {}
impl Cast<dyn ComplexGatewayTypeMut> for EventBasedGateway {}
impl Cast<dyn ConditionalEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn ConversationType> for EventBasedGateway {}
impl Cast<dyn ConversationTypeMut> for EventBasedGateway {}
impl Cast<dyn ConversationAssociationType> for EventBasedGateway {}
impl Cast<dyn ConversationAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn ConversationLinkType> for EventBasedGateway {}
impl Cast<dyn ConversationLinkTypeMut> for EventBasedGateway {}
impl Cast<dyn ConversationNodeType> for EventBasedGateway {}
impl Cast<dyn ConversationNodeTypeMut> for EventBasedGateway {}
impl Cast<dyn CorrelationKeyType> for EventBasedGateway {}
impl Cast<dyn CorrelationKeyTypeMut> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyType> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyBindingType> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for EventBasedGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for EventBasedGateway {}
impl Cast<dyn CorrelationSubscriptionType> for EventBasedGateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for EventBasedGateway {}
impl Cast<dyn DataAssociationType> for EventBasedGateway {}
impl Cast<dyn DataAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn DataInputType> for EventBasedGateway {}
impl Cast<dyn DataInputTypeMut> for EventBasedGateway {}
impl Cast<dyn DataInputAssociationType> for EventBasedGateway {}
impl Cast<dyn DataInputAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn DataObjectType> for EventBasedGateway {}
impl Cast<dyn DataObjectTypeMut> for EventBasedGateway {}
impl Cast<dyn DataObjectReferenceType> for EventBasedGateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for EventBasedGateway {}
impl Cast<dyn DataOutputType> for EventBasedGateway {}
impl Cast<dyn DataOutputTypeMut> for EventBasedGateway {}
impl Cast<dyn DataOutputAssociationType> for EventBasedGateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn DataStateType> for EventBasedGateway {}
impl Cast<dyn DataStateTypeMut> for EventBasedGateway {}
impl Cast<dyn DataStoreType> for EventBasedGateway {}
impl Cast<dyn DataStoreTypeMut> for EventBasedGateway {}
impl Cast<dyn DataStoreReferenceType> for EventBasedGateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for EventBasedGateway {}
impl Cast<dyn DocumentationType> for EventBasedGateway {}
impl Cast<dyn DocumentationTypeMut> for EventBasedGateway {}
impl Cast<dyn EndEventType> for EventBasedGateway {}
impl Cast<dyn EndEventTypeMut> for EventBasedGateway {}
impl Cast<dyn EndPointType> for EventBasedGateway {}
impl Cast<dyn EndPointTypeMut> for EventBasedGateway {}
impl Cast<dyn ErrorType> for EventBasedGateway {}
impl Cast<dyn ErrorTypeMut> for EventBasedGateway {}
impl Cast<dyn ErrorEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn EscalationType> for EventBasedGateway {}
impl Cast<dyn EscalationTypeMut> for EventBasedGateway {}
impl Cast<dyn EscalationEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn EventType> for EventBasedGateway {}
impl Cast<dyn EventTypeMut> for EventBasedGateway {}
impl Cast<dyn EventBasedGatewayType> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionType> for EventBasedGateway {}
impl Cast<dyn EventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn ExclusiveGatewayType> for EventBasedGateway {}
impl Cast<dyn ExclusiveGatewayTypeMut> for EventBasedGateway {}
impl Cast<dyn ExpressionType> for EventBasedGateway {}
impl Cast<dyn ExpressionTypeMut> for EventBasedGateway {}
impl Cast<dyn ExtensionType> for EventBasedGateway {}
impl Cast<dyn ExtensionTypeMut> for EventBasedGateway {}
impl Cast<dyn ExtensionElementsType> for EventBasedGateway {}
impl Cast<dyn ExtensionElementsTypeMut> for EventBasedGateway {}
impl Cast<dyn FlowElementType> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for EventBasedGateway {}
impl Cast<dyn FormalExpressionTypeMut> for EventBasedGateway {}
impl Cast<dyn GatewayType> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for EventBasedGateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalChoreographyTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalConversationType> for EventBasedGateway {}
impl Cast<dyn GlobalConversationTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalManualTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalScriptTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GlobalUserTaskType> for EventBasedGateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn GroupType> for EventBasedGateway {}
impl Cast<dyn GroupTypeMut> for EventBasedGateway {}
impl Cast<dyn HumanPerformerType> for EventBasedGateway {}
impl Cast<dyn HumanPerformerTypeMut> for EventBasedGateway {}
impl Cast<dyn ImplicitThrowEventType> for EventBasedGateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for EventBasedGateway {}
impl Cast<dyn InclusiveGatewayType> for EventBasedGateway {}
impl Cast<dyn InclusiveGatewayTypeMut> for EventBasedGateway {}
impl Cast<dyn InputSetType> for EventBasedGateway {}
impl Cast<dyn InputSetTypeMut> for EventBasedGateway {}
impl Cast<dyn InterfaceType> for EventBasedGateway {}
impl Cast<dyn InterfaceTypeMut> for EventBasedGateway {}
impl Cast<dyn IntermediateCatchEventType> for EventBasedGateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for EventBasedGateway {}
impl Cast<dyn IntermediateThrowEventType> for EventBasedGateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for EventBasedGateway {}
impl Cast<dyn InputOutputBindingType> for EventBasedGateway {}
impl Cast<dyn InputOutputBindingTypeMut> for EventBasedGateway {}
impl Cast<dyn InputOutputSpecificationType> for EventBasedGateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for EventBasedGateway {}
impl Cast<dyn ItemDefinitionType> for EventBasedGateway {}
impl Cast<dyn ItemDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn LaneType> for EventBasedGateway {}
impl Cast<dyn LaneTypeMut> for EventBasedGateway {}
impl Cast<dyn LaneSetType> for EventBasedGateway {}
impl Cast<dyn LaneSetTypeMut> for EventBasedGateway {}
impl Cast<dyn LinkEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn LoopCharacteristicsType> for EventBasedGateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for EventBasedGateway {}
impl Cast<dyn ManualTaskType> for EventBasedGateway {}
impl Cast<dyn ManualTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn MessageType> for EventBasedGateway {}
impl Cast<dyn MessageTypeMut> for EventBasedGateway {}
impl Cast<dyn MessageEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn MessageFlowType> for EventBasedGateway {}
impl Cast<dyn MessageFlowTypeMut> for EventBasedGateway {}
impl Cast<dyn MessageFlowAssociationType> for EventBasedGateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn MonitoringType> for EventBasedGateway {}
impl Cast<dyn MonitoringTypeMut> for EventBasedGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for EventBasedGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for EventBasedGateway {}
impl Cast<dyn OperationType> for EventBasedGateway {}
impl Cast<dyn OperationTypeMut> for EventBasedGateway {}
impl Cast<dyn OutputSetType> for EventBasedGateway {}
impl Cast<dyn OutputSetTypeMut> for EventBasedGateway {}
impl Cast<dyn ParallelGatewayType> for EventBasedGateway {}
impl Cast<dyn ParallelGatewayTypeMut> for EventBasedGateway {}
impl Cast<dyn ParticipantType> for EventBasedGateway {}
impl Cast<dyn ParticipantTypeMut> for EventBasedGateway {}
impl Cast<dyn ParticipantAssociationType> for EventBasedGateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for EventBasedGateway {}
impl Cast<dyn ParticipantMultiplicityType> for EventBasedGateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for EventBasedGateway {}
impl Cast<dyn PartnerEntityType> for EventBasedGateway {}
impl Cast<dyn PartnerEntityTypeMut> for EventBasedGateway {}
impl Cast<dyn PartnerRoleType> for EventBasedGateway {}
impl Cast<dyn PartnerRoleTypeMut> for EventBasedGateway {}
impl Cast<dyn PerformerType> for EventBasedGateway {}
impl Cast<dyn PerformerTypeMut> for EventBasedGateway {}
impl Cast<dyn PotentialOwnerType> for EventBasedGateway {}
impl Cast<dyn PotentialOwnerTypeMut> for EventBasedGateway {}
impl Cast<dyn ProcessType> for EventBasedGateway {}
impl Cast<dyn ProcessTypeMut> for EventBasedGateway {}
impl Cast<dyn PropertyType> for EventBasedGateway {}
impl Cast<dyn PropertyTypeMut> for EventBasedGateway {}
impl Cast<dyn ReceiveTaskType> for EventBasedGateway {}
impl Cast<dyn ReceiveTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn RelationshipType> for EventBasedGateway {}
impl Cast<dyn RelationshipTypeMut> for EventBasedGateway {}
impl Cast<dyn RenderingType> for EventBasedGateway {}
impl Cast<dyn RenderingTypeMut> for EventBasedGateway {}
impl Cast<dyn ResourceType> for EventBasedGateway {}
impl Cast<dyn ResourceTypeMut> for EventBasedGateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for EventBasedGateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for EventBasedGateway {}
impl Cast<dyn ResourceParameterType> for EventBasedGateway {}
impl Cast<dyn ResourceParameterTypeMut> for EventBasedGateway {}
impl Cast<dyn ResourceParameterBindingType> for EventBasedGateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for EventBasedGateway {}
impl Cast<dyn ResourceRoleType> for EventBasedGateway {}
impl Cast<dyn ResourceRoleTypeMut> for EventBasedGateway {}
impl Cast<dyn RootElementType> for EventBasedGateway {}
impl Cast<dyn RootElementTypeMut> for EventBasedGateway {}
impl Cast<dyn ScriptTaskType> for EventBasedGateway {}
impl Cast<dyn ScriptTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn ScriptType> for EventBasedGateway {}
impl Cast<dyn ScriptTypeMut> for EventBasedGateway {}
impl Cast<dyn SendTaskType> for EventBasedGateway {}
impl Cast<dyn SendTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn SequenceFlowType> for EventBasedGateway {}
impl Cast<dyn SequenceFlowTypeMut> for EventBasedGateway {}
impl Cast<dyn ServiceTaskType> for EventBasedGateway {}
impl Cast<dyn ServiceTaskTypeMut> for EventBasedGateway {}
impl Cast<dyn SignalType> for EventBasedGateway {}
impl Cast<dyn SignalTypeMut> for EventBasedGateway {}
impl Cast<dyn SignalEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for EventBasedGateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for EventBasedGateway {}
impl Cast<dyn StartEventType> for EventBasedGateway {}
impl Cast<dyn StartEventTypeMut> for EventBasedGateway {}
impl Cast<dyn SubChoreographyType> for EventBasedGateway {}
impl Cast<dyn SubChoreographyTypeMut> for EventBasedGateway {}
impl Cast<dyn SubConversationType> for EventBasedGateway {}
impl Cast<dyn SubConversationTypeMut> for EventBasedGateway {}
impl Cast<dyn SubProcessType> for EventBasedGateway {}
impl Cast<dyn SubProcessTypeMut> for EventBasedGateway {}
impl Cast<dyn TaskType> for EventBasedGateway {}
impl Cast<dyn TaskTypeMut> for EventBasedGateway {}
impl Cast<dyn TerminateEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn TextAnnotationType> for EventBasedGateway {}
impl Cast<dyn TextAnnotationTypeMut> for EventBasedGateway {}
impl Cast<dyn TextType> for EventBasedGateway {}
impl Cast<dyn TextTypeMut> for EventBasedGateway {}
impl Cast<dyn ThrowEventType> for EventBasedGateway {}
impl Cast<dyn ThrowEventTypeMut> for EventBasedGateway {}
impl Cast<dyn TimerEventDefinitionType> for EventBasedGateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for EventBasedGateway {}
impl Cast<dyn TransactionType> for EventBasedGateway {}
impl Cast<dyn TransactionTypeMut> for EventBasedGateway {}
impl Cast<dyn UserTaskType> for EventBasedGateway {}
impl Cast<dyn UserTaskTypeMut> for EventBasedGateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:eventDefinition")]
#[serde(tag = "type")]
pub enum EventDefinition {
    #[xml(tag = "bpmn:cancelEventDefinition")]
    CancelEventDefinition(CancelEventDefinition),
    #[xml(tag = "bpmn:compensateEventDefinition")]
    CompensateEventDefinition(CompensateEventDefinition),
    #[xml(tag = "bpmn:conditionalEventDefinition")]
    ConditionalEventDefinition(ConditionalEventDefinition),
    #[xml(tag = "bpmn:errorEventDefinition")]
    ErrorEventDefinition(ErrorEventDefinition),
    #[xml(tag = "bpmn:escalationEventDefinition")]
    EscalationEventDefinition(EscalationEventDefinition),
    #[xml(tag = "bpmn:linkEventDefinition")]
    LinkEventDefinition(LinkEventDefinition),
    #[xml(tag = "bpmn:messageEventDefinition")]
    MessageEventDefinition(MessageEventDefinition),
    #[xml(tag = "bpmn:signalEventDefinition")]
    SignalEventDefinition(SignalEventDefinition),
    #[xml(tag = "bpmn:terminateEventDefinition")]
    TerminateEventDefinition(TerminateEventDefinition),
    #[xml(tag = "bpmn:timerEventDefinition")]
    TimerEventDefinition(TimerEventDefinition),
}
impl EventDefinition {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::CompensateEventDefinition(e) => {
                Box::new(e) as Box<dyn DocumentElement>
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Box::new(e) as Box<dyn DocumentElement>
            }
            EventDefinition::ErrorEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::EscalationEventDefinition(e) => {
                Box::new(e) as Box<dyn DocumentElement>
            }
            EventDefinition::LinkEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::MessageEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::SignalEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::TerminateEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            EventDefinition::TimerEventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
        }
    }
}
impl DocumentElementContainer for EventDefinition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            EventDefinition::CancelEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::CompensateEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::ConditionalEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::ErrorEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::EscalationEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::LinkEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::MessageEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::SignalEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::TerminateEventDefinition(e) => e.find_by_id_mut(id),
            EventDefinition::TimerEventDefinition(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            EventDefinition::CancelEventDefinition(e) => e.find_by_id(id),
            EventDefinition::CompensateEventDefinition(e) => e.find_by_id(id),
            EventDefinition::ConditionalEventDefinition(e) => e.find_by_id(id),
            EventDefinition::ErrorEventDefinition(e) => e.find_by_id(id),
            EventDefinition::EscalationEventDefinition(e) => e.find_by_id(id),
            EventDefinition::LinkEventDefinition(e) => e.find_by_id(id),
            EventDefinition::MessageEventDefinition(e) => e.find_by_id(id),
            EventDefinition::SignalEventDefinition(e) => e.find_by_id(id),
            EventDefinition::TerminateEventDefinition(e) => e.find_by_id(id),
            EventDefinition::TimerEventDefinition(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for EventDefinition {
    fn element(&self) -> Element {
        Element::EventDefinition
    }
}
/// Access to `eventDefinition`
pub trait EventDefinitionType: RootElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(EventDefinitionType);
impl_downcast!(EventDefinitionType);
/// Mutable access to `eventDefinition`
pub trait EventDefinitionTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + EventDefinitionType
{
}
dyn_clone::clone_trait_object!(EventDefinitionTypeMut);
impl_downcast!(EventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ImportTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ArtifactType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AssignmentType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssignmentType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AssignmentType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallableElementType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallActivityType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallChoreographyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallConversationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CatchEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CatchEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CatchEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CatchEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CollaborationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexGatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationLinkType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationNodeType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationKeyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStateType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStateType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DocumentationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EndEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExpressionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExpressionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExpressionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExpressionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowElementType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalConversationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalConversationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalConversationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GroupType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputSetType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InterfaceType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputBindingType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ItemDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LaneType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LaneSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LaneSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LaneSetTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ManualTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ManualTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ManualTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ManualTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MonitoringType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MonitoringType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MonitoringType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MonitoringType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn OperationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn OutputSetType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerEntityType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerRoleType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PerformerType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ProcessType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RenderingType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RenderingType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceRoleType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RootElementType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ScriptTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ScriptTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ScriptTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ScriptTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ServiceTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SignalTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StartEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StartEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StartEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubConversationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubProcessType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubProcessType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubProcessType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubProcessType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextAnnotationType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TextType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ThrowEventType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ThrowEventType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ThrowEventType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TransactionType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::SignalEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for EventDefinition {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for EventDefinition {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::CompensateEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::ConditionalEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::EscalationEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::TerminateEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            EventDefinition::CancelEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            EventDefinition::CompensateEventDefinition(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ConditionalEventDefinition(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::ErrorEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            EventDefinition::EscalationEventDefinition(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::LinkEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            EventDefinition::MessageEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            EventDefinition::SignalEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            EventDefinition::TerminateEventDefinition(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
            EventDefinition::TimerEventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:exclusiveGateway")]
pub struct ExclusiveGateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
    #[xml(attr = "default")]
    #[tia("ExclusiveGatewayType",rg*="default","ExclusiveGatewayTypeMut",s)]
    pub default: Option<String>,
}
impl DocumentElement for ExclusiveGateway {
    fn element(&self) -> Element {
        Element::ExclusiveGateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ExclusiveGateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `exclusiveGateway`
pub trait ExclusiveGatewayType: GatewayType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `default`
    fn default(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ExclusiveGatewayType);
impl_downcast!(ExclusiveGatewayType);
/// Mutable access to `exclusiveGateway`
pub trait ExclusiveGatewayTypeMut:
    GatewayTypeMut + Downcast + Debug + Send + DynClone + ExclusiveGatewayType
{
    /// Set value of attribute `default`
    fn set_default(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ExclusiveGatewayTypeMut);
impl_downcast!(ExclusiveGatewayTypeMut);
impl Cast<dyn DefinitionsType> for ExclusiveGateway {}
impl Cast<dyn DefinitionsTypeMut> for ExclusiveGateway {}
impl Cast<dyn ImportType> for ExclusiveGateway {}
impl Cast<dyn ImportTypeMut> for ExclusiveGateway {}
impl Cast<dyn ActivityType> for ExclusiveGateway {}
impl Cast<dyn ActivityTypeMut> for ExclusiveGateway {}
impl Cast<dyn AdHocSubProcessType> for ExclusiveGateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for ExclusiveGateway {}
impl Cast<dyn ArtifactType> for ExclusiveGateway {}
impl Cast<dyn ArtifactTypeMut> for ExclusiveGateway {}
impl Cast<dyn AssignmentType> for ExclusiveGateway {}
impl Cast<dyn AssignmentTypeMut> for ExclusiveGateway {}
impl Cast<dyn AssociationType> for ExclusiveGateway {}
impl Cast<dyn AssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn AuditingType> for ExclusiveGateway {}
impl Cast<dyn AuditingTypeMut> for ExclusiveGateway {}
impl Cast<dyn BaseElementType> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ExclusiveGateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ExclusiveGateway {}
impl Cast<dyn BoundaryEventType> for ExclusiveGateway {}
impl Cast<dyn BoundaryEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn BusinessRuleTaskType> for ExclusiveGateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn CallableElementType> for ExclusiveGateway {}
impl Cast<dyn CallableElementTypeMut> for ExclusiveGateway {}
impl Cast<dyn CallActivityType> for ExclusiveGateway {}
impl Cast<dyn CallActivityTypeMut> for ExclusiveGateway {}
impl Cast<dyn CallChoreographyType> for ExclusiveGateway {}
impl Cast<dyn CallChoreographyTypeMut> for ExclusiveGateway {}
impl Cast<dyn CallConversationType> for ExclusiveGateway {}
impl Cast<dyn CallConversationTypeMut> for ExclusiveGateway {}
impl Cast<dyn CancelEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn CatchEventType> for ExclusiveGateway {}
impl Cast<dyn CatchEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn CategoryType> for ExclusiveGateway {}
impl Cast<dyn CategoryTypeMut> for ExclusiveGateway {}
impl Cast<dyn CategoryValueType> for ExclusiveGateway {}
impl Cast<dyn CategoryValueTypeMut> for ExclusiveGateway {}
impl Cast<dyn ChoreographyType> for ExclusiveGateway {}
impl Cast<dyn ChoreographyTypeMut> for ExclusiveGateway {}
impl Cast<dyn ChoreographyActivityType> for ExclusiveGateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for ExclusiveGateway {}
impl Cast<dyn ChoreographyTaskType> for ExclusiveGateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn CollaborationType> for ExclusiveGateway {}
impl Cast<dyn CollaborationTypeMut> for ExclusiveGateway {}
impl Cast<dyn CompensateEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ExclusiveGateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ComplexGatewayType> for ExclusiveGateway {}
impl Cast<dyn ComplexGatewayTypeMut> for ExclusiveGateway {}
impl Cast<dyn ConditionalEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ConversationType> for ExclusiveGateway {}
impl Cast<dyn ConversationTypeMut> for ExclusiveGateway {}
impl Cast<dyn ConversationAssociationType> for ExclusiveGateway {}
impl Cast<dyn ConversationAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn ConversationLinkType> for ExclusiveGateway {}
impl Cast<dyn ConversationLinkTypeMut> for ExclusiveGateway {}
impl Cast<dyn ConversationNodeType> for ExclusiveGateway {}
impl Cast<dyn ConversationNodeTypeMut> for ExclusiveGateway {}
impl Cast<dyn CorrelationKeyType> for ExclusiveGateway {}
impl Cast<dyn CorrelationKeyTypeMut> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyType> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyBindingType> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ExclusiveGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ExclusiveGateway {}
impl Cast<dyn CorrelationSubscriptionType> for ExclusiveGateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataAssociationType> for ExclusiveGateway {}
impl Cast<dyn DataAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataInputType> for ExclusiveGateway {}
impl Cast<dyn DataInputTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataInputAssociationType> for ExclusiveGateway {}
impl Cast<dyn DataInputAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataObjectType> for ExclusiveGateway {}
impl Cast<dyn DataObjectTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataObjectReferenceType> for ExclusiveGateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataOutputType> for ExclusiveGateway {}
impl Cast<dyn DataOutputTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataOutputAssociationType> for ExclusiveGateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataStateType> for ExclusiveGateway {}
impl Cast<dyn DataStateTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataStoreType> for ExclusiveGateway {}
impl Cast<dyn DataStoreTypeMut> for ExclusiveGateway {}
impl Cast<dyn DataStoreReferenceType> for ExclusiveGateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for ExclusiveGateway {}
impl Cast<dyn DocumentationType> for ExclusiveGateway {}
impl Cast<dyn DocumentationTypeMut> for ExclusiveGateway {}
impl Cast<dyn EndEventType> for ExclusiveGateway {}
impl Cast<dyn EndEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn EndPointType> for ExclusiveGateway {}
impl Cast<dyn EndPointTypeMut> for ExclusiveGateway {}
impl Cast<dyn ErrorType> for ExclusiveGateway {}
impl Cast<dyn ErrorTypeMut> for ExclusiveGateway {}
impl Cast<dyn ErrorEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn EscalationType> for ExclusiveGateway {}
impl Cast<dyn EscalationTypeMut> for ExclusiveGateway {}
impl Cast<dyn EscalationEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn EventType> for ExclusiveGateway {}
impl Cast<dyn EventTypeMut> for ExclusiveGateway {}
impl Cast<dyn EventBasedGatewayType> for ExclusiveGateway {}
impl Cast<dyn EventBasedGatewayTypeMut> for ExclusiveGateway {}
impl Cast<dyn EventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn EventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ExclusiveGatewayType> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExpressionType> for ExclusiveGateway {}
impl Cast<dyn ExpressionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ExtensionType> for ExclusiveGateway {}
impl Cast<dyn ExtensionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ExtensionElementsType> for ExclusiveGateway {}
impl Cast<dyn ExtensionElementsTypeMut> for ExclusiveGateway {}
impl Cast<dyn FlowElementType> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ExclusiveGateway {}
impl Cast<dyn FormalExpressionTypeMut> for ExclusiveGateway {}
impl Cast<dyn GatewayType> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for ExclusiveGateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalChoreographyTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalConversationType> for ExclusiveGateway {}
impl Cast<dyn GlobalConversationTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalManualTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalScriptTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GlobalUserTaskType> for ExclusiveGateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn GroupType> for ExclusiveGateway {}
impl Cast<dyn GroupTypeMut> for ExclusiveGateway {}
impl Cast<dyn HumanPerformerType> for ExclusiveGateway {}
impl Cast<dyn HumanPerformerTypeMut> for ExclusiveGateway {}
impl Cast<dyn ImplicitThrowEventType> for ExclusiveGateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn InclusiveGatewayType> for ExclusiveGateway {}
impl Cast<dyn InclusiveGatewayTypeMut> for ExclusiveGateway {}
impl Cast<dyn InputSetType> for ExclusiveGateway {}
impl Cast<dyn InputSetTypeMut> for ExclusiveGateway {}
impl Cast<dyn InterfaceType> for ExclusiveGateway {}
impl Cast<dyn InterfaceTypeMut> for ExclusiveGateway {}
impl Cast<dyn IntermediateCatchEventType> for ExclusiveGateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn IntermediateThrowEventType> for ExclusiveGateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn InputOutputBindingType> for ExclusiveGateway {}
impl Cast<dyn InputOutputBindingTypeMut> for ExclusiveGateway {}
impl Cast<dyn InputOutputSpecificationType> for ExclusiveGateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ExclusiveGateway {}
impl Cast<dyn ItemDefinitionType> for ExclusiveGateway {}
impl Cast<dyn ItemDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn LaneType> for ExclusiveGateway {}
impl Cast<dyn LaneTypeMut> for ExclusiveGateway {}
impl Cast<dyn LaneSetType> for ExclusiveGateway {}
impl Cast<dyn LaneSetTypeMut> for ExclusiveGateway {}
impl Cast<dyn LinkEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn LoopCharacteristicsType> for ExclusiveGateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ExclusiveGateway {}
impl Cast<dyn ManualTaskType> for ExclusiveGateway {}
impl Cast<dyn ManualTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn MessageType> for ExclusiveGateway {}
impl Cast<dyn MessageTypeMut> for ExclusiveGateway {}
impl Cast<dyn MessageEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn MessageFlowType> for ExclusiveGateway {}
impl Cast<dyn MessageFlowTypeMut> for ExclusiveGateway {}
impl Cast<dyn MessageFlowAssociationType> for ExclusiveGateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn MonitoringType> for ExclusiveGateway {}
impl Cast<dyn MonitoringTypeMut> for ExclusiveGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ExclusiveGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ExclusiveGateway {}
impl Cast<dyn OperationType> for ExclusiveGateway {}
impl Cast<dyn OperationTypeMut> for ExclusiveGateway {}
impl Cast<dyn OutputSetType> for ExclusiveGateway {}
impl Cast<dyn OutputSetTypeMut> for ExclusiveGateway {}
impl Cast<dyn ParallelGatewayType> for ExclusiveGateway {}
impl Cast<dyn ParallelGatewayTypeMut> for ExclusiveGateway {}
impl Cast<dyn ParticipantType> for ExclusiveGateway {}
impl Cast<dyn ParticipantTypeMut> for ExclusiveGateway {}
impl Cast<dyn ParticipantAssociationType> for ExclusiveGateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for ExclusiveGateway {}
impl Cast<dyn ParticipantMultiplicityType> for ExclusiveGateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ExclusiveGateway {}
impl Cast<dyn PartnerEntityType> for ExclusiveGateway {}
impl Cast<dyn PartnerEntityTypeMut> for ExclusiveGateway {}
impl Cast<dyn PartnerRoleType> for ExclusiveGateway {}
impl Cast<dyn PartnerRoleTypeMut> for ExclusiveGateway {}
impl Cast<dyn PerformerType> for ExclusiveGateway {}
impl Cast<dyn PerformerTypeMut> for ExclusiveGateway {}
impl Cast<dyn PotentialOwnerType> for ExclusiveGateway {}
impl Cast<dyn PotentialOwnerTypeMut> for ExclusiveGateway {}
impl Cast<dyn ProcessType> for ExclusiveGateway {}
impl Cast<dyn ProcessTypeMut> for ExclusiveGateway {}
impl Cast<dyn PropertyType> for ExclusiveGateway {}
impl Cast<dyn PropertyTypeMut> for ExclusiveGateway {}
impl Cast<dyn ReceiveTaskType> for ExclusiveGateway {}
impl Cast<dyn ReceiveTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn RelationshipType> for ExclusiveGateway {}
impl Cast<dyn RelationshipTypeMut> for ExclusiveGateway {}
impl Cast<dyn RenderingType> for ExclusiveGateway {}
impl Cast<dyn RenderingTypeMut> for ExclusiveGateway {}
impl Cast<dyn ResourceType> for ExclusiveGateway {}
impl Cast<dyn ResourceTypeMut> for ExclusiveGateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for ExclusiveGateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ExclusiveGateway {}
impl Cast<dyn ResourceParameterType> for ExclusiveGateway {}
impl Cast<dyn ResourceParameterTypeMut> for ExclusiveGateway {}
impl Cast<dyn ResourceParameterBindingType> for ExclusiveGateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ExclusiveGateway {}
impl Cast<dyn ResourceRoleType> for ExclusiveGateway {}
impl Cast<dyn ResourceRoleTypeMut> for ExclusiveGateway {}
impl Cast<dyn RootElementType> for ExclusiveGateway {}
impl Cast<dyn RootElementTypeMut> for ExclusiveGateway {}
impl Cast<dyn ScriptTaskType> for ExclusiveGateway {}
impl Cast<dyn ScriptTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn ScriptType> for ExclusiveGateway {}
impl Cast<dyn ScriptTypeMut> for ExclusiveGateway {}
impl Cast<dyn SendTaskType> for ExclusiveGateway {}
impl Cast<dyn SendTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn SequenceFlowType> for ExclusiveGateway {}
impl Cast<dyn SequenceFlowTypeMut> for ExclusiveGateway {}
impl Cast<dyn ServiceTaskType> for ExclusiveGateway {}
impl Cast<dyn ServiceTaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn SignalType> for ExclusiveGateway {}
impl Cast<dyn SignalTypeMut> for ExclusiveGateway {}
impl Cast<dyn SignalEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for ExclusiveGateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ExclusiveGateway {}
impl Cast<dyn StartEventType> for ExclusiveGateway {}
impl Cast<dyn StartEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn SubChoreographyType> for ExclusiveGateway {}
impl Cast<dyn SubChoreographyTypeMut> for ExclusiveGateway {}
impl Cast<dyn SubConversationType> for ExclusiveGateway {}
impl Cast<dyn SubConversationTypeMut> for ExclusiveGateway {}
impl Cast<dyn SubProcessType> for ExclusiveGateway {}
impl Cast<dyn SubProcessTypeMut> for ExclusiveGateway {}
impl Cast<dyn TaskType> for ExclusiveGateway {}
impl Cast<dyn TaskTypeMut> for ExclusiveGateway {}
impl Cast<dyn TerminateEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn TextAnnotationType> for ExclusiveGateway {}
impl Cast<dyn TextAnnotationTypeMut> for ExclusiveGateway {}
impl Cast<dyn TextType> for ExclusiveGateway {}
impl Cast<dyn TextTypeMut> for ExclusiveGateway {}
impl Cast<dyn ThrowEventType> for ExclusiveGateway {}
impl Cast<dyn ThrowEventTypeMut> for ExclusiveGateway {}
impl Cast<dyn TimerEventDefinitionType> for ExclusiveGateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ExclusiveGateway {}
impl Cast<dyn TransactionType> for ExclusiveGateway {}
impl Cast<dyn TransactionTypeMut> for ExclusiveGateway {}
impl Cast<dyn UserTaskType> for ExclusiveGateway {}
impl Cast<dyn UserTaskTypeMut> for ExclusiveGateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:expression")]
pub struct Expression {
    #[xml(attr = "id")]
    #[tia("BaseElementWithMixedContentType",rg*="id","BaseElementWithMixedContentTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementWithMixedContentType",rg*="documentations","BaseElementWithMixedContentTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementWithMixedContentType",rg*="extension_elements","BaseElementWithMixedContentTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for Expression {
    fn element(&self) -> Element {
        Element::Expression
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Expression {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ExpressionType for Expression {}
impl ExpressionTypeMut for Expression {}
//

/// Access to `expression`
pub trait ExpressionType:
    BaseElementWithMixedContentType + Downcast + Debug + Send + DynClone
{
}
dyn_clone::clone_trait_object!(ExpressionType);
impl_downcast!(ExpressionType);
/// Mutable access to `expression`
pub trait ExpressionTypeMut:
    BaseElementWithMixedContentTypeMut + Downcast + Debug + Send + DynClone + ExpressionType
{
}
dyn_clone::clone_trait_object!(ExpressionTypeMut);
impl_downcast!(ExpressionTypeMut);
impl Cast<dyn DefinitionsType> for Expression {}
impl Cast<dyn DefinitionsTypeMut> for Expression {}
impl Cast<dyn ImportType> for Expression {}
impl Cast<dyn ImportTypeMut> for Expression {}
impl Cast<dyn ActivityType> for Expression {}
impl Cast<dyn ActivityTypeMut> for Expression {}
impl Cast<dyn AdHocSubProcessType> for Expression {}
impl Cast<dyn AdHocSubProcessTypeMut> for Expression {}
impl Cast<dyn ArtifactType> for Expression {}
impl Cast<dyn ArtifactTypeMut> for Expression {}
impl Cast<dyn AssignmentType> for Expression {}
impl Cast<dyn AssignmentTypeMut> for Expression {}
impl Cast<dyn AssociationType> for Expression {}
impl Cast<dyn AssociationTypeMut> for Expression {}
impl Cast<dyn AuditingType> for Expression {}
impl Cast<dyn AuditingTypeMut> for Expression {}
impl Cast<dyn BaseElementType> for Expression {}
impl Cast<dyn BaseElementTypeMut> for Expression {}
impl Cast<dyn BaseElementWithMixedContentType> for Expression {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Expression {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BoundaryEventType> for Expression {}
impl Cast<dyn BoundaryEventTypeMut> for Expression {}
impl Cast<dyn BusinessRuleTaskType> for Expression {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Expression {}
impl Cast<dyn CallableElementType> for Expression {}
impl Cast<dyn CallableElementTypeMut> for Expression {}
impl Cast<dyn CallActivityType> for Expression {}
impl Cast<dyn CallActivityTypeMut> for Expression {}
impl Cast<dyn CallChoreographyType> for Expression {}
impl Cast<dyn CallChoreographyTypeMut> for Expression {}
impl Cast<dyn CallConversationType> for Expression {}
impl Cast<dyn CallConversationTypeMut> for Expression {}
impl Cast<dyn CancelEventDefinitionType> for Expression {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Expression {}
impl Cast<dyn CatchEventType> for Expression {}
impl Cast<dyn CatchEventTypeMut> for Expression {}
impl Cast<dyn CategoryType> for Expression {}
impl Cast<dyn CategoryTypeMut> for Expression {}
impl Cast<dyn CategoryValueType> for Expression {}
impl Cast<dyn CategoryValueTypeMut> for Expression {}
impl Cast<dyn ChoreographyType> for Expression {}
impl Cast<dyn ChoreographyTypeMut> for Expression {}
impl Cast<dyn ChoreographyActivityType> for Expression {}
impl Cast<dyn ChoreographyActivityTypeMut> for Expression {}
impl Cast<dyn ChoreographyTaskType> for Expression {}
impl Cast<dyn ChoreographyTaskTypeMut> for Expression {}
impl Cast<dyn CollaborationType> for Expression {}
impl Cast<dyn CollaborationTypeMut> for Expression {}
impl Cast<dyn CompensateEventDefinitionType> for Expression {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Expression {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Expression {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Expression {}
impl Cast<dyn ComplexGatewayType> for Expression {}
impl Cast<dyn ComplexGatewayTypeMut> for Expression {}
impl Cast<dyn ConditionalEventDefinitionType> for Expression {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Expression {}
impl Cast<dyn ConversationType> for Expression {}
impl Cast<dyn ConversationTypeMut> for Expression {}
impl Cast<dyn ConversationAssociationType> for Expression {}
impl Cast<dyn ConversationAssociationTypeMut> for Expression {}
impl Cast<dyn ConversationLinkType> for Expression {}
impl Cast<dyn ConversationLinkTypeMut> for Expression {}
impl Cast<dyn ConversationNodeType> for Expression {}
impl Cast<dyn ConversationNodeTypeMut> for Expression {}
impl Cast<dyn CorrelationKeyType> for Expression {}
impl Cast<dyn CorrelationKeyTypeMut> for Expression {}
impl Cast<dyn CorrelationPropertyType> for Expression {}
impl Cast<dyn CorrelationPropertyTypeMut> for Expression {}
impl Cast<dyn CorrelationPropertyBindingType> for Expression {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Expression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Expression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Expression {}
impl Cast<dyn CorrelationSubscriptionType> for Expression {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Expression {}
impl Cast<dyn DataAssociationType> for Expression {}
impl Cast<dyn DataAssociationTypeMut> for Expression {}
impl Cast<dyn DataInputType> for Expression {}
impl Cast<dyn DataInputTypeMut> for Expression {}
impl Cast<dyn DataInputAssociationType> for Expression {}
impl Cast<dyn DataInputAssociationTypeMut> for Expression {}
impl Cast<dyn DataObjectType> for Expression {}
impl Cast<dyn DataObjectTypeMut> for Expression {}
impl Cast<dyn DataObjectReferenceType> for Expression {}
impl Cast<dyn DataObjectReferenceTypeMut> for Expression {}
impl Cast<dyn DataOutputType> for Expression {}
impl Cast<dyn DataOutputTypeMut> for Expression {}
impl Cast<dyn DataOutputAssociationType> for Expression {}
impl Cast<dyn DataOutputAssociationTypeMut> for Expression {}
impl Cast<dyn DataStateType> for Expression {}
impl Cast<dyn DataStateTypeMut> for Expression {}
impl Cast<dyn DataStoreType> for Expression {}
impl Cast<dyn DataStoreTypeMut> for Expression {}
impl Cast<dyn DataStoreReferenceType> for Expression {}
impl Cast<dyn DataStoreReferenceTypeMut> for Expression {}
impl Cast<dyn DocumentationType> for Expression {}
impl Cast<dyn DocumentationTypeMut> for Expression {}
impl Cast<dyn EndEventType> for Expression {}
impl Cast<dyn EndEventTypeMut> for Expression {}
impl Cast<dyn EndPointType> for Expression {}
impl Cast<dyn EndPointTypeMut> for Expression {}
impl Cast<dyn ErrorType> for Expression {}
impl Cast<dyn ErrorTypeMut> for Expression {}
impl Cast<dyn ErrorEventDefinitionType> for Expression {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Expression {}
impl Cast<dyn EscalationType> for Expression {}
impl Cast<dyn EscalationTypeMut> for Expression {}
impl Cast<dyn EscalationEventDefinitionType> for Expression {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Expression {}
impl Cast<dyn EventType> for Expression {}
impl Cast<dyn EventTypeMut> for Expression {}
impl Cast<dyn EventBasedGatewayType> for Expression {}
impl Cast<dyn EventBasedGatewayTypeMut> for Expression {}
impl Cast<dyn EventDefinitionType> for Expression {}
impl Cast<dyn EventDefinitionTypeMut> for Expression {}
impl Cast<dyn ExclusiveGatewayType> for Expression {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Expression {}
impl Cast<dyn ExpressionType> for Expression {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExpressionTypeMut> for Expression {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExtensionType> for Expression {}
impl Cast<dyn ExtensionTypeMut> for Expression {}
impl Cast<dyn ExtensionElementsType> for Expression {}
impl Cast<dyn ExtensionElementsTypeMut> for Expression {}
impl Cast<dyn FlowElementType> for Expression {}
impl Cast<dyn FlowElementTypeMut> for Expression {}
impl Cast<dyn FlowNodeType> for Expression {}
impl Cast<dyn FlowNodeTypeMut> for Expression {}
impl Cast<dyn FormalExpressionType> for Expression {}
impl Cast<dyn FormalExpressionTypeMut> for Expression {}
impl Cast<dyn GatewayType> for Expression {}
impl Cast<dyn GatewayTypeMut> for Expression {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Expression {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Expression {}
impl Cast<dyn GlobalChoreographyTaskType> for Expression {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Expression {}
impl Cast<dyn GlobalConversationType> for Expression {}
impl Cast<dyn GlobalConversationTypeMut> for Expression {}
impl Cast<dyn GlobalManualTaskType> for Expression {}
impl Cast<dyn GlobalManualTaskTypeMut> for Expression {}
impl Cast<dyn GlobalScriptTaskType> for Expression {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Expression {}
impl Cast<dyn GlobalTaskType> for Expression {}
impl Cast<dyn GlobalTaskTypeMut> for Expression {}
impl Cast<dyn GlobalUserTaskType> for Expression {}
impl Cast<dyn GlobalUserTaskTypeMut> for Expression {}
impl Cast<dyn GroupType> for Expression {}
impl Cast<dyn GroupTypeMut> for Expression {}
impl Cast<dyn HumanPerformerType> for Expression {}
impl Cast<dyn HumanPerformerTypeMut> for Expression {}
impl Cast<dyn ImplicitThrowEventType> for Expression {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Expression {}
impl Cast<dyn InclusiveGatewayType> for Expression {}
impl Cast<dyn InclusiveGatewayTypeMut> for Expression {}
impl Cast<dyn InputSetType> for Expression {}
impl Cast<dyn InputSetTypeMut> for Expression {}
impl Cast<dyn InterfaceType> for Expression {}
impl Cast<dyn InterfaceTypeMut> for Expression {}
impl Cast<dyn IntermediateCatchEventType> for Expression {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Expression {}
impl Cast<dyn IntermediateThrowEventType> for Expression {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Expression {}
impl Cast<dyn InputOutputBindingType> for Expression {}
impl Cast<dyn InputOutputBindingTypeMut> for Expression {}
impl Cast<dyn InputOutputSpecificationType> for Expression {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Expression {}
impl Cast<dyn ItemDefinitionType> for Expression {}
impl Cast<dyn ItemDefinitionTypeMut> for Expression {}
impl Cast<dyn LaneType> for Expression {}
impl Cast<dyn LaneTypeMut> for Expression {}
impl Cast<dyn LaneSetType> for Expression {}
impl Cast<dyn LaneSetTypeMut> for Expression {}
impl Cast<dyn LinkEventDefinitionType> for Expression {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Expression {}
impl Cast<dyn LoopCharacteristicsType> for Expression {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Expression {}
impl Cast<dyn ManualTaskType> for Expression {}
impl Cast<dyn ManualTaskTypeMut> for Expression {}
impl Cast<dyn MessageType> for Expression {}
impl Cast<dyn MessageTypeMut> for Expression {}
impl Cast<dyn MessageEventDefinitionType> for Expression {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Expression {}
impl Cast<dyn MessageFlowType> for Expression {}
impl Cast<dyn MessageFlowTypeMut> for Expression {}
impl Cast<dyn MessageFlowAssociationType> for Expression {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Expression {}
impl Cast<dyn MonitoringType> for Expression {}
impl Cast<dyn MonitoringTypeMut> for Expression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Expression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Expression {}
impl Cast<dyn OperationType> for Expression {}
impl Cast<dyn OperationTypeMut> for Expression {}
impl Cast<dyn OutputSetType> for Expression {}
impl Cast<dyn OutputSetTypeMut> for Expression {}
impl Cast<dyn ParallelGatewayType> for Expression {}
impl Cast<dyn ParallelGatewayTypeMut> for Expression {}
impl Cast<dyn ParticipantType> for Expression {}
impl Cast<dyn ParticipantTypeMut> for Expression {}
impl Cast<dyn ParticipantAssociationType> for Expression {}
impl Cast<dyn ParticipantAssociationTypeMut> for Expression {}
impl Cast<dyn ParticipantMultiplicityType> for Expression {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Expression {}
impl Cast<dyn PartnerEntityType> for Expression {}
impl Cast<dyn PartnerEntityTypeMut> for Expression {}
impl Cast<dyn PartnerRoleType> for Expression {}
impl Cast<dyn PartnerRoleTypeMut> for Expression {}
impl Cast<dyn PerformerType> for Expression {}
impl Cast<dyn PerformerTypeMut> for Expression {}
impl Cast<dyn PotentialOwnerType> for Expression {}
impl Cast<dyn PotentialOwnerTypeMut> for Expression {}
impl Cast<dyn ProcessType> for Expression {}
impl Cast<dyn ProcessTypeMut> for Expression {}
impl Cast<dyn PropertyType> for Expression {}
impl Cast<dyn PropertyTypeMut> for Expression {}
impl Cast<dyn ReceiveTaskType> for Expression {}
impl Cast<dyn ReceiveTaskTypeMut> for Expression {}
impl Cast<dyn RelationshipType> for Expression {}
impl Cast<dyn RelationshipTypeMut> for Expression {}
impl Cast<dyn RenderingType> for Expression {}
impl Cast<dyn RenderingTypeMut> for Expression {}
impl Cast<dyn ResourceType> for Expression {}
impl Cast<dyn ResourceTypeMut> for Expression {}
impl Cast<dyn ResourceAssignmentExpressionType> for Expression {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Expression {}
impl Cast<dyn ResourceParameterType> for Expression {}
impl Cast<dyn ResourceParameterTypeMut> for Expression {}
impl Cast<dyn ResourceParameterBindingType> for Expression {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Expression {}
impl Cast<dyn ResourceRoleType> for Expression {}
impl Cast<dyn ResourceRoleTypeMut> for Expression {}
impl Cast<dyn RootElementType> for Expression {}
impl Cast<dyn RootElementTypeMut> for Expression {}
impl Cast<dyn ScriptTaskType> for Expression {}
impl Cast<dyn ScriptTaskTypeMut> for Expression {}
impl Cast<dyn ScriptType> for Expression {}
impl Cast<dyn ScriptTypeMut> for Expression {}
impl Cast<dyn SendTaskType> for Expression {}
impl Cast<dyn SendTaskTypeMut> for Expression {}
impl Cast<dyn SequenceFlowType> for Expression {}
impl Cast<dyn SequenceFlowTypeMut> for Expression {}
impl Cast<dyn ServiceTaskType> for Expression {}
impl Cast<dyn ServiceTaskTypeMut> for Expression {}
impl Cast<dyn SignalType> for Expression {}
impl Cast<dyn SignalTypeMut> for Expression {}
impl Cast<dyn SignalEventDefinitionType> for Expression {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Expression {}
impl Cast<dyn StandardLoopCharacteristicsType> for Expression {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Expression {}
impl Cast<dyn StartEventType> for Expression {}
impl Cast<dyn StartEventTypeMut> for Expression {}
impl Cast<dyn SubChoreographyType> for Expression {}
impl Cast<dyn SubChoreographyTypeMut> for Expression {}
impl Cast<dyn SubConversationType> for Expression {}
impl Cast<dyn SubConversationTypeMut> for Expression {}
impl Cast<dyn SubProcessType> for Expression {}
impl Cast<dyn SubProcessTypeMut> for Expression {}
impl Cast<dyn TaskType> for Expression {}
impl Cast<dyn TaskTypeMut> for Expression {}
impl Cast<dyn TerminateEventDefinitionType> for Expression {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Expression {}
impl Cast<dyn TextAnnotationType> for Expression {}
impl Cast<dyn TextAnnotationTypeMut> for Expression {}
impl Cast<dyn TextType> for Expression {}
impl Cast<dyn TextTypeMut> for Expression {}
impl Cast<dyn ThrowEventType> for Expression {}
impl Cast<dyn ThrowEventTypeMut> for Expression {}
impl Cast<dyn TimerEventDefinitionType> for Expression {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Expression {}
impl Cast<dyn TransactionType> for Expression {}
impl Cast<dyn TransactionTypeMut> for Expression {}
impl Cast<dyn UserTaskType> for Expression {}
impl Cast<dyn UserTaskTypeMut> for Expression {}
/// Wrapper for adHocSubProcess::completionCondition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct AdHocSubProcessCompletionCondition(pub Expr);
impl<'a> XmlRead<'a> for AdHocSubProcessCompletionCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(AdHocSubProcessCompletionCondition(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("completionCondition", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for AdHocSubProcessCompletionCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for assignment::from element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct AssignmentFrom(pub Expr);
impl<'a> XmlRead<'a> for AssignmentFrom {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(AssignmentFrom(Expr::from_reader(&mut XmlReader::new(
            &reader.read_source_till_end("from", "expression")?,
        ))?))
    }
}

impl DocumentElementContainer for AssignmentFrom {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for assignment::to element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct AssignmentTo(pub Expr);
impl<'a> XmlRead<'a> for AssignmentTo {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(AssignmentTo(Expr::from_reader(&mut XmlReader::new(
            &reader.read_source_till_end("to", "expression")?,
        ))?))
    }
}

impl DocumentElementContainer for AssignmentTo {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for complexGateway::activationCondition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct ComplexGatewayActivationCondition(pub Expr);
impl<'a> XmlRead<'a> for ComplexGatewayActivationCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(ComplexGatewayActivationCondition(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("activationCondition", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for ComplexGatewayActivationCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for conditionalEventDefinition::condition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct ConditionalEventDefinitionCondition(pub Expr);
impl<'a> XmlRead<'a> for ConditionalEventDefinitionCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(ConditionalEventDefinitionCondition(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("condition", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for ConditionalEventDefinitionCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for multiInstanceLoopCharacteristics::loopCardinality element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct MultiInstanceLoopCharacteristicsLoopCardinality(pub Expr);
impl<'a> XmlRead<'a> for MultiInstanceLoopCharacteristicsLoopCardinality {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(MultiInstanceLoopCharacteristicsLoopCardinality(
            Expr::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("loopCardinality", "expression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for MultiInstanceLoopCharacteristicsLoopCardinality {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for multiInstanceLoopCharacteristics::completionCondition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct MultiInstanceLoopCharacteristicsCompletionCondition(pub Expr);
impl<'a> XmlRead<'a> for MultiInstanceLoopCharacteristicsCompletionCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(MultiInstanceLoopCharacteristicsCompletionCondition(
            Expr::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("completionCondition", "expression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for MultiInstanceLoopCharacteristicsCompletionCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for sequenceFlow::conditionExpression element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct SequenceFlowConditionExpression(pub Expr);
impl<'a> XmlRead<'a> for SequenceFlowConditionExpression {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(SequenceFlowConditionExpression(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("conditionExpression", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for SequenceFlowConditionExpression {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for standardLoopCharacteristics::loopCondition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct StandardLoopCharacteristicsLoopCondition(pub Expr);
impl<'a> XmlRead<'a> for StandardLoopCharacteristicsLoopCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(StandardLoopCharacteristicsLoopCondition(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("loopCondition", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for StandardLoopCharacteristicsLoopCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for timerEventDefinition::timeDate element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct TimerEventDefinitionTimeDate(pub Expr);
impl<'a> XmlRead<'a> for TimerEventDefinitionTimeDate {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(TimerEventDefinitionTimeDate(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("timeDate", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for TimerEventDefinitionTimeDate {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for timerEventDefinition::timeDuration element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct TimerEventDefinitionTimeDuration(pub Expr);
impl<'a> XmlRead<'a> for TimerEventDefinitionTimeDuration {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(TimerEventDefinitionTimeDuration(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("timeDuration", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for TimerEventDefinitionTimeDuration {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for timerEventDefinition::timeCycle element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct TimerEventDefinitionTimeCycle(pub Expr);
impl<'a> XmlRead<'a> for TimerEventDefinitionTimeCycle {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(TimerEventDefinitionTimeCycle(Expr::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("timeCycle", "expression")?),
        )?))
    }
}

impl DocumentElementContainer for TimerEventDefinitionTimeCycle {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:extension")]
pub struct Extension {
    #[xml(attr = "definition")]
    #[tia("ExtensionType",rg*="definition","ExtensionTypeMut",s)]
    pub definition: Option<String>,
    #[xml(attr = "mustUnderstand")]
    #[tia("ExtensionType",rg*="must_understand","ExtensionTypeMut",s)]
    pub must_understand: Option<bool>,
    #[xml(child = "bpmn:documentation")]
    #[tia("ExtensionType",rg*="documentations","ExtensionTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
}
impl DocumentElement for Extension {
    fn element(&self) -> Element {
        Element::Extension
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Extension {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(e) = self.documentations.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(e) = self.documentations.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `extension`
pub trait ExtensionType: Downcast + Debug + Send + DynClone {
    /// Get value of attribute `definition`
    fn definition(&self) -> &Option<String>;
    /// Get value of attribute `mustUnderstand`
    fn must_understand(&self) -> &Option<bool>;
    /// Get value of `documentation` child
    fn documentations(&self) -> &Vec<Documentation>;
}
dyn_clone::clone_trait_object!(ExtensionType);
impl_downcast!(ExtensionType);
/// Mutable access to `extension`
pub trait ExtensionTypeMut: Downcast + Debug + Send + DynClone + ExtensionType {
    /// Set value of attribute `definition`
    fn set_definition(&mut self, value: Option<String>);
    /// Set value of attribute `mustUnderstand`
    fn set_must_understand(&mut self, value: Option<bool>);
    /// Get a mutable value of `documentation` child
    fn documentations_mut(&mut self) -> &mut Vec<Documentation>;
    /// Set value of `documentation` child
    fn set_documentations(&mut self, value: Vec<Documentation>);
}
dyn_clone::clone_trait_object!(ExtensionTypeMut);
impl_downcast!(ExtensionTypeMut);
impl Cast<dyn DefinitionsType> for Extension {}
impl Cast<dyn DefinitionsTypeMut> for Extension {}
impl Cast<dyn ImportType> for Extension {}
impl Cast<dyn ImportTypeMut> for Extension {}
impl Cast<dyn ActivityType> for Extension {}
impl Cast<dyn ActivityTypeMut> for Extension {}
impl Cast<dyn AdHocSubProcessType> for Extension {}
impl Cast<dyn AdHocSubProcessTypeMut> for Extension {}
impl Cast<dyn ArtifactType> for Extension {}
impl Cast<dyn ArtifactTypeMut> for Extension {}
impl Cast<dyn AssignmentType> for Extension {}
impl Cast<dyn AssignmentTypeMut> for Extension {}
impl Cast<dyn AssociationType> for Extension {}
impl Cast<dyn AssociationTypeMut> for Extension {}
impl Cast<dyn AuditingType> for Extension {}
impl Cast<dyn AuditingTypeMut> for Extension {}
impl Cast<dyn BaseElementType> for Extension {}
impl Cast<dyn BaseElementTypeMut> for Extension {}
impl Cast<dyn BaseElementWithMixedContentType> for Extension {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Extension {}
impl Cast<dyn BoundaryEventType> for Extension {}
impl Cast<dyn BoundaryEventTypeMut> for Extension {}
impl Cast<dyn BusinessRuleTaskType> for Extension {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Extension {}
impl Cast<dyn CallableElementType> for Extension {}
impl Cast<dyn CallableElementTypeMut> for Extension {}
impl Cast<dyn CallActivityType> for Extension {}
impl Cast<dyn CallActivityTypeMut> for Extension {}
impl Cast<dyn CallChoreographyType> for Extension {}
impl Cast<dyn CallChoreographyTypeMut> for Extension {}
impl Cast<dyn CallConversationType> for Extension {}
impl Cast<dyn CallConversationTypeMut> for Extension {}
impl Cast<dyn CancelEventDefinitionType> for Extension {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Extension {}
impl Cast<dyn CatchEventType> for Extension {}
impl Cast<dyn CatchEventTypeMut> for Extension {}
impl Cast<dyn CategoryType> for Extension {}
impl Cast<dyn CategoryTypeMut> for Extension {}
impl Cast<dyn CategoryValueType> for Extension {}
impl Cast<dyn CategoryValueTypeMut> for Extension {}
impl Cast<dyn ChoreographyType> for Extension {}
impl Cast<dyn ChoreographyTypeMut> for Extension {}
impl Cast<dyn ChoreographyActivityType> for Extension {}
impl Cast<dyn ChoreographyActivityTypeMut> for Extension {}
impl Cast<dyn ChoreographyTaskType> for Extension {}
impl Cast<dyn ChoreographyTaskTypeMut> for Extension {}
impl Cast<dyn CollaborationType> for Extension {}
impl Cast<dyn CollaborationTypeMut> for Extension {}
impl Cast<dyn CompensateEventDefinitionType> for Extension {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Extension {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Extension {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Extension {}
impl Cast<dyn ComplexGatewayType> for Extension {}
impl Cast<dyn ComplexGatewayTypeMut> for Extension {}
impl Cast<dyn ConditionalEventDefinitionType> for Extension {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Extension {}
impl Cast<dyn ConversationType> for Extension {}
impl Cast<dyn ConversationTypeMut> for Extension {}
impl Cast<dyn ConversationAssociationType> for Extension {}
impl Cast<dyn ConversationAssociationTypeMut> for Extension {}
impl Cast<dyn ConversationLinkType> for Extension {}
impl Cast<dyn ConversationLinkTypeMut> for Extension {}
impl Cast<dyn ConversationNodeType> for Extension {}
impl Cast<dyn ConversationNodeTypeMut> for Extension {}
impl Cast<dyn CorrelationKeyType> for Extension {}
impl Cast<dyn CorrelationKeyTypeMut> for Extension {}
impl Cast<dyn CorrelationPropertyType> for Extension {}
impl Cast<dyn CorrelationPropertyTypeMut> for Extension {}
impl Cast<dyn CorrelationPropertyBindingType> for Extension {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Extension {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Extension {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Extension {}
impl Cast<dyn CorrelationSubscriptionType> for Extension {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Extension {}
impl Cast<dyn DataAssociationType> for Extension {}
impl Cast<dyn DataAssociationTypeMut> for Extension {}
impl Cast<dyn DataInputType> for Extension {}
impl Cast<dyn DataInputTypeMut> for Extension {}
impl Cast<dyn DataInputAssociationType> for Extension {}
impl Cast<dyn DataInputAssociationTypeMut> for Extension {}
impl Cast<dyn DataObjectType> for Extension {}
impl Cast<dyn DataObjectTypeMut> for Extension {}
impl Cast<dyn DataObjectReferenceType> for Extension {}
impl Cast<dyn DataObjectReferenceTypeMut> for Extension {}
impl Cast<dyn DataOutputType> for Extension {}
impl Cast<dyn DataOutputTypeMut> for Extension {}
impl Cast<dyn DataOutputAssociationType> for Extension {}
impl Cast<dyn DataOutputAssociationTypeMut> for Extension {}
impl Cast<dyn DataStateType> for Extension {}
impl Cast<dyn DataStateTypeMut> for Extension {}
impl Cast<dyn DataStoreType> for Extension {}
impl Cast<dyn DataStoreTypeMut> for Extension {}
impl Cast<dyn DataStoreReferenceType> for Extension {}
impl Cast<dyn DataStoreReferenceTypeMut> for Extension {}
impl Cast<dyn DocumentationType> for Extension {}
impl Cast<dyn DocumentationTypeMut> for Extension {}
impl Cast<dyn EndEventType> for Extension {}
impl Cast<dyn EndEventTypeMut> for Extension {}
impl Cast<dyn EndPointType> for Extension {}
impl Cast<dyn EndPointTypeMut> for Extension {}
impl Cast<dyn ErrorType> for Extension {}
impl Cast<dyn ErrorTypeMut> for Extension {}
impl Cast<dyn ErrorEventDefinitionType> for Extension {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Extension {}
impl Cast<dyn EscalationType> for Extension {}
impl Cast<dyn EscalationTypeMut> for Extension {}
impl Cast<dyn EscalationEventDefinitionType> for Extension {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Extension {}
impl Cast<dyn EventType> for Extension {}
impl Cast<dyn EventTypeMut> for Extension {}
impl Cast<dyn EventBasedGatewayType> for Extension {}
impl Cast<dyn EventBasedGatewayTypeMut> for Extension {}
impl Cast<dyn EventDefinitionType> for Extension {}
impl Cast<dyn EventDefinitionTypeMut> for Extension {}
impl Cast<dyn ExclusiveGatewayType> for Extension {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Extension {}
impl Cast<dyn ExpressionType> for Extension {}
impl Cast<dyn ExpressionTypeMut> for Extension {}
impl Cast<dyn ExtensionType> for Extension {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExtensionTypeMut> for Extension {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExtensionElementsType> for Extension {}
impl Cast<dyn ExtensionElementsTypeMut> for Extension {}
impl Cast<dyn FlowElementType> for Extension {}
impl Cast<dyn FlowElementTypeMut> for Extension {}
impl Cast<dyn FlowNodeType> for Extension {}
impl Cast<dyn FlowNodeTypeMut> for Extension {}
impl Cast<dyn FormalExpressionType> for Extension {}
impl Cast<dyn FormalExpressionTypeMut> for Extension {}
impl Cast<dyn GatewayType> for Extension {}
impl Cast<dyn GatewayTypeMut> for Extension {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Extension {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Extension {}
impl Cast<dyn GlobalChoreographyTaskType> for Extension {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Extension {}
impl Cast<dyn GlobalConversationType> for Extension {}
impl Cast<dyn GlobalConversationTypeMut> for Extension {}
impl Cast<dyn GlobalManualTaskType> for Extension {}
impl Cast<dyn GlobalManualTaskTypeMut> for Extension {}
impl Cast<dyn GlobalScriptTaskType> for Extension {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Extension {}
impl Cast<dyn GlobalTaskType> for Extension {}
impl Cast<dyn GlobalTaskTypeMut> for Extension {}
impl Cast<dyn GlobalUserTaskType> for Extension {}
impl Cast<dyn GlobalUserTaskTypeMut> for Extension {}
impl Cast<dyn GroupType> for Extension {}
impl Cast<dyn GroupTypeMut> for Extension {}
impl Cast<dyn HumanPerformerType> for Extension {}
impl Cast<dyn HumanPerformerTypeMut> for Extension {}
impl Cast<dyn ImplicitThrowEventType> for Extension {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Extension {}
impl Cast<dyn InclusiveGatewayType> for Extension {}
impl Cast<dyn InclusiveGatewayTypeMut> for Extension {}
impl Cast<dyn InputSetType> for Extension {}
impl Cast<dyn InputSetTypeMut> for Extension {}
impl Cast<dyn InterfaceType> for Extension {}
impl Cast<dyn InterfaceTypeMut> for Extension {}
impl Cast<dyn IntermediateCatchEventType> for Extension {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Extension {}
impl Cast<dyn IntermediateThrowEventType> for Extension {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Extension {}
impl Cast<dyn InputOutputBindingType> for Extension {}
impl Cast<dyn InputOutputBindingTypeMut> for Extension {}
impl Cast<dyn InputOutputSpecificationType> for Extension {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Extension {}
impl Cast<dyn ItemDefinitionType> for Extension {}
impl Cast<dyn ItemDefinitionTypeMut> for Extension {}
impl Cast<dyn LaneType> for Extension {}
impl Cast<dyn LaneTypeMut> for Extension {}
impl Cast<dyn LaneSetType> for Extension {}
impl Cast<dyn LaneSetTypeMut> for Extension {}
impl Cast<dyn LinkEventDefinitionType> for Extension {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Extension {}
impl Cast<dyn LoopCharacteristicsType> for Extension {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Extension {}
impl Cast<dyn ManualTaskType> for Extension {}
impl Cast<dyn ManualTaskTypeMut> for Extension {}
impl Cast<dyn MessageType> for Extension {}
impl Cast<dyn MessageTypeMut> for Extension {}
impl Cast<dyn MessageEventDefinitionType> for Extension {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Extension {}
impl Cast<dyn MessageFlowType> for Extension {}
impl Cast<dyn MessageFlowTypeMut> for Extension {}
impl Cast<dyn MessageFlowAssociationType> for Extension {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Extension {}
impl Cast<dyn MonitoringType> for Extension {}
impl Cast<dyn MonitoringTypeMut> for Extension {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Extension {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Extension {}
impl Cast<dyn OperationType> for Extension {}
impl Cast<dyn OperationTypeMut> for Extension {}
impl Cast<dyn OutputSetType> for Extension {}
impl Cast<dyn OutputSetTypeMut> for Extension {}
impl Cast<dyn ParallelGatewayType> for Extension {}
impl Cast<dyn ParallelGatewayTypeMut> for Extension {}
impl Cast<dyn ParticipantType> for Extension {}
impl Cast<dyn ParticipantTypeMut> for Extension {}
impl Cast<dyn ParticipantAssociationType> for Extension {}
impl Cast<dyn ParticipantAssociationTypeMut> for Extension {}
impl Cast<dyn ParticipantMultiplicityType> for Extension {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Extension {}
impl Cast<dyn PartnerEntityType> for Extension {}
impl Cast<dyn PartnerEntityTypeMut> for Extension {}
impl Cast<dyn PartnerRoleType> for Extension {}
impl Cast<dyn PartnerRoleTypeMut> for Extension {}
impl Cast<dyn PerformerType> for Extension {}
impl Cast<dyn PerformerTypeMut> for Extension {}
impl Cast<dyn PotentialOwnerType> for Extension {}
impl Cast<dyn PotentialOwnerTypeMut> for Extension {}
impl Cast<dyn ProcessType> for Extension {}
impl Cast<dyn ProcessTypeMut> for Extension {}
impl Cast<dyn PropertyType> for Extension {}
impl Cast<dyn PropertyTypeMut> for Extension {}
impl Cast<dyn ReceiveTaskType> for Extension {}
impl Cast<dyn ReceiveTaskTypeMut> for Extension {}
impl Cast<dyn RelationshipType> for Extension {}
impl Cast<dyn RelationshipTypeMut> for Extension {}
impl Cast<dyn RenderingType> for Extension {}
impl Cast<dyn RenderingTypeMut> for Extension {}
impl Cast<dyn ResourceType> for Extension {}
impl Cast<dyn ResourceTypeMut> for Extension {}
impl Cast<dyn ResourceAssignmentExpressionType> for Extension {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Extension {}
impl Cast<dyn ResourceParameterType> for Extension {}
impl Cast<dyn ResourceParameterTypeMut> for Extension {}
impl Cast<dyn ResourceParameterBindingType> for Extension {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Extension {}
impl Cast<dyn ResourceRoleType> for Extension {}
impl Cast<dyn ResourceRoleTypeMut> for Extension {}
impl Cast<dyn RootElementType> for Extension {}
impl Cast<dyn RootElementTypeMut> for Extension {}
impl Cast<dyn ScriptTaskType> for Extension {}
impl Cast<dyn ScriptTaskTypeMut> for Extension {}
impl Cast<dyn ScriptType> for Extension {}
impl Cast<dyn ScriptTypeMut> for Extension {}
impl Cast<dyn SendTaskType> for Extension {}
impl Cast<dyn SendTaskTypeMut> for Extension {}
impl Cast<dyn SequenceFlowType> for Extension {}
impl Cast<dyn SequenceFlowTypeMut> for Extension {}
impl Cast<dyn ServiceTaskType> for Extension {}
impl Cast<dyn ServiceTaskTypeMut> for Extension {}
impl Cast<dyn SignalType> for Extension {}
impl Cast<dyn SignalTypeMut> for Extension {}
impl Cast<dyn SignalEventDefinitionType> for Extension {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Extension {}
impl Cast<dyn StandardLoopCharacteristicsType> for Extension {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Extension {}
impl Cast<dyn StartEventType> for Extension {}
impl Cast<dyn StartEventTypeMut> for Extension {}
impl Cast<dyn SubChoreographyType> for Extension {}
impl Cast<dyn SubChoreographyTypeMut> for Extension {}
impl Cast<dyn SubConversationType> for Extension {}
impl Cast<dyn SubConversationTypeMut> for Extension {}
impl Cast<dyn SubProcessType> for Extension {}
impl Cast<dyn SubProcessTypeMut> for Extension {}
impl Cast<dyn TaskType> for Extension {}
impl Cast<dyn TaskTypeMut> for Extension {}
impl Cast<dyn TerminateEventDefinitionType> for Extension {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Extension {}
impl Cast<dyn TextAnnotationType> for Extension {}
impl Cast<dyn TextAnnotationTypeMut> for Extension {}
impl Cast<dyn TextType> for Extension {}
impl Cast<dyn TextTypeMut> for Extension {}
impl Cast<dyn ThrowEventType> for Extension {}
impl Cast<dyn ThrowEventTypeMut> for Extension {}
impl Cast<dyn TimerEventDefinitionType> for Extension {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Extension {}
impl Cast<dyn TransactionType> for Extension {}
impl Cast<dyn TransactionTypeMut> for Extension {}
impl Cast<dyn UserTaskType> for Extension {}
impl Cast<dyn UserTaskTypeMut> for Extension {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:extensionElements")]
pub struct ExtensionElements {}
impl DocumentElement for ExtensionElements {
    fn element(&self) -> Element {
        Element::ExtensionElements
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ExtensionElements {}
// Traits
impl ExtensionElementsType for ExtensionElements {}
impl ExtensionElementsTypeMut for ExtensionElements {}
//

/// Access to `extensionElements`
pub trait ExtensionElementsType: Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ExtensionElementsType);
impl_downcast!(ExtensionElementsType);
/// Mutable access to `extensionElements`
pub trait ExtensionElementsTypeMut:
    Downcast + Debug + Send + DynClone + ExtensionElementsType
{
}
dyn_clone::clone_trait_object!(ExtensionElementsTypeMut);
impl_downcast!(ExtensionElementsTypeMut);
impl Cast<dyn DefinitionsType> for ExtensionElements {}
impl Cast<dyn DefinitionsTypeMut> for ExtensionElements {}
impl Cast<dyn ImportType> for ExtensionElements {}
impl Cast<dyn ImportTypeMut> for ExtensionElements {}
impl Cast<dyn ActivityType> for ExtensionElements {}
impl Cast<dyn ActivityTypeMut> for ExtensionElements {}
impl Cast<dyn AdHocSubProcessType> for ExtensionElements {}
impl Cast<dyn AdHocSubProcessTypeMut> for ExtensionElements {}
impl Cast<dyn ArtifactType> for ExtensionElements {}
impl Cast<dyn ArtifactTypeMut> for ExtensionElements {}
impl Cast<dyn AssignmentType> for ExtensionElements {}
impl Cast<dyn AssignmentTypeMut> for ExtensionElements {}
impl Cast<dyn AssociationType> for ExtensionElements {}
impl Cast<dyn AssociationTypeMut> for ExtensionElements {}
impl Cast<dyn AuditingType> for ExtensionElements {}
impl Cast<dyn AuditingTypeMut> for ExtensionElements {}
impl Cast<dyn BaseElementType> for ExtensionElements {}
impl Cast<dyn BaseElementTypeMut> for ExtensionElements {}
impl Cast<dyn BaseElementWithMixedContentType> for ExtensionElements {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ExtensionElements {}
impl Cast<dyn BoundaryEventType> for ExtensionElements {}
impl Cast<dyn BoundaryEventTypeMut> for ExtensionElements {}
impl Cast<dyn BusinessRuleTaskType> for ExtensionElements {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ExtensionElements {}
impl Cast<dyn CallableElementType> for ExtensionElements {}
impl Cast<dyn CallableElementTypeMut> for ExtensionElements {}
impl Cast<dyn CallActivityType> for ExtensionElements {}
impl Cast<dyn CallActivityTypeMut> for ExtensionElements {}
impl Cast<dyn CallChoreographyType> for ExtensionElements {}
impl Cast<dyn CallChoreographyTypeMut> for ExtensionElements {}
impl Cast<dyn CallConversationType> for ExtensionElements {}
impl Cast<dyn CallConversationTypeMut> for ExtensionElements {}
impl Cast<dyn CancelEventDefinitionType> for ExtensionElements {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn CatchEventType> for ExtensionElements {}
impl Cast<dyn CatchEventTypeMut> for ExtensionElements {}
impl Cast<dyn CategoryType> for ExtensionElements {}
impl Cast<dyn CategoryTypeMut> for ExtensionElements {}
impl Cast<dyn CategoryValueType> for ExtensionElements {}
impl Cast<dyn CategoryValueTypeMut> for ExtensionElements {}
impl Cast<dyn ChoreographyType> for ExtensionElements {}
impl Cast<dyn ChoreographyTypeMut> for ExtensionElements {}
impl Cast<dyn ChoreographyActivityType> for ExtensionElements {}
impl Cast<dyn ChoreographyActivityTypeMut> for ExtensionElements {}
impl Cast<dyn ChoreographyTaskType> for ExtensionElements {}
impl Cast<dyn ChoreographyTaskTypeMut> for ExtensionElements {}
impl Cast<dyn CollaborationType> for ExtensionElements {}
impl Cast<dyn CollaborationTypeMut> for ExtensionElements {}
impl Cast<dyn CompensateEventDefinitionType> for ExtensionElements {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ExtensionElements {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn ComplexGatewayType> for ExtensionElements {}
impl Cast<dyn ComplexGatewayTypeMut> for ExtensionElements {}
impl Cast<dyn ConditionalEventDefinitionType> for ExtensionElements {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn ConversationType> for ExtensionElements {}
impl Cast<dyn ConversationTypeMut> for ExtensionElements {}
impl Cast<dyn ConversationAssociationType> for ExtensionElements {}
impl Cast<dyn ConversationAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn ConversationLinkType> for ExtensionElements {}
impl Cast<dyn ConversationLinkTypeMut> for ExtensionElements {}
impl Cast<dyn ConversationNodeType> for ExtensionElements {}
impl Cast<dyn ConversationNodeTypeMut> for ExtensionElements {}
impl Cast<dyn CorrelationKeyType> for ExtensionElements {}
impl Cast<dyn CorrelationKeyTypeMut> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyType> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyTypeMut> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyBindingType> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ExtensionElements {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ExtensionElements {}
impl Cast<dyn CorrelationSubscriptionType> for ExtensionElements {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ExtensionElements {}
impl Cast<dyn DataAssociationType> for ExtensionElements {}
impl Cast<dyn DataAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn DataInputType> for ExtensionElements {}
impl Cast<dyn DataInputTypeMut> for ExtensionElements {}
impl Cast<dyn DataInputAssociationType> for ExtensionElements {}
impl Cast<dyn DataInputAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn DataObjectType> for ExtensionElements {}
impl Cast<dyn DataObjectTypeMut> for ExtensionElements {}
impl Cast<dyn DataObjectReferenceType> for ExtensionElements {}
impl Cast<dyn DataObjectReferenceTypeMut> for ExtensionElements {}
impl Cast<dyn DataOutputType> for ExtensionElements {}
impl Cast<dyn DataOutputTypeMut> for ExtensionElements {}
impl Cast<dyn DataOutputAssociationType> for ExtensionElements {}
impl Cast<dyn DataOutputAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn DataStateType> for ExtensionElements {}
impl Cast<dyn DataStateTypeMut> for ExtensionElements {}
impl Cast<dyn DataStoreType> for ExtensionElements {}
impl Cast<dyn DataStoreTypeMut> for ExtensionElements {}
impl Cast<dyn DataStoreReferenceType> for ExtensionElements {}
impl Cast<dyn DataStoreReferenceTypeMut> for ExtensionElements {}
impl Cast<dyn DocumentationType> for ExtensionElements {}
impl Cast<dyn DocumentationTypeMut> for ExtensionElements {}
impl Cast<dyn EndEventType> for ExtensionElements {}
impl Cast<dyn EndEventTypeMut> for ExtensionElements {}
impl Cast<dyn EndPointType> for ExtensionElements {}
impl Cast<dyn EndPointTypeMut> for ExtensionElements {}
impl Cast<dyn ErrorType> for ExtensionElements {}
impl Cast<dyn ErrorTypeMut> for ExtensionElements {}
impl Cast<dyn ErrorEventDefinitionType> for ExtensionElements {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn EscalationType> for ExtensionElements {}
impl Cast<dyn EscalationTypeMut> for ExtensionElements {}
impl Cast<dyn EscalationEventDefinitionType> for ExtensionElements {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn EventType> for ExtensionElements {}
impl Cast<dyn EventTypeMut> for ExtensionElements {}
impl Cast<dyn EventBasedGatewayType> for ExtensionElements {}
impl Cast<dyn EventBasedGatewayTypeMut> for ExtensionElements {}
impl Cast<dyn EventDefinitionType> for ExtensionElements {}
impl Cast<dyn EventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn ExclusiveGatewayType> for ExtensionElements {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ExtensionElements {}
impl Cast<dyn ExpressionType> for ExtensionElements {}
impl Cast<dyn ExpressionTypeMut> for ExtensionElements {}
impl Cast<dyn ExtensionType> for ExtensionElements {}
impl Cast<dyn ExtensionTypeMut> for ExtensionElements {}
impl Cast<dyn ExtensionElementsType> for ExtensionElements {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for ExtensionElements {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementType> for ExtensionElements {}
impl Cast<dyn FlowElementTypeMut> for ExtensionElements {}
impl Cast<dyn FlowNodeType> for ExtensionElements {}
impl Cast<dyn FlowNodeTypeMut> for ExtensionElements {}
impl Cast<dyn FormalExpressionType> for ExtensionElements {}
impl Cast<dyn FormalExpressionTypeMut> for ExtensionElements {}
impl Cast<dyn GatewayType> for ExtensionElements {}
impl Cast<dyn GatewayTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ExtensionElements {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalChoreographyTaskType> for ExtensionElements {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalConversationType> for ExtensionElements {}
impl Cast<dyn GlobalConversationTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalManualTaskType> for ExtensionElements {}
impl Cast<dyn GlobalManualTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalScriptTaskType> for ExtensionElements {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalTaskType> for ExtensionElements {}
impl Cast<dyn GlobalTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GlobalUserTaskType> for ExtensionElements {}
impl Cast<dyn GlobalUserTaskTypeMut> for ExtensionElements {}
impl Cast<dyn GroupType> for ExtensionElements {}
impl Cast<dyn GroupTypeMut> for ExtensionElements {}
impl Cast<dyn HumanPerformerType> for ExtensionElements {}
impl Cast<dyn HumanPerformerTypeMut> for ExtensionElements {}
impl Cast<dyn ImplicitThrowEventType> for ExtensionElements {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ExtensionElements {}
impl Cast<dyn InclusiveGatewayType> for ExtensionElements {}
impl Cast<dyn InclusiveGatewayTypeMut> for ExtensionElements {}
impl Cast<dyn InputSetType> for ExtensionElements {}
impl Cast<dyn InputSetTypeMut> for ExtensionElements {}
impl Cast<dyn InterfaceType> for ExtensionElements {}
impl Cast<dyn InterfaceTypeMut> for ExtensionElements {}
impl Cast<dyn IntermediateCatchEventType> for ExtensionElements {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ExtensionElements {}
impl Cast<dyn IntermediateThrowEventType> for ExtensionElements {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ExtensionElements {}
impl Cast<dyn InputOutputBindingType> for ExtensionElements {}
impl Cast<dyn InputOutputBindingTypeMut> for ExtensionElements {}
impl Cast<dyn InputOutputSpecificationType> for ExtensionElements {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ExtensionElements {}
impl Cast<dyn ItemDefinitionType> for ExtensionElements {}
impl Cast<dyn ItemDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn LaneType> for ExtensionElements {}
impl Cast<dyn LaneTypeMut> for ExtensionElements {}
impl Cast<dyn LaneSetType> for ExtensionElements {}
impl Cast<dyn LaneSetTypeMut> for ExtensionElements {}
impl Cast<dyn LinkEventDefinitionType> for ExtensionElements {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn LoopCharacteristicsType> for ExtensionElements {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ExtensionElements {}
impl Cast<dyn ManualTaskType> for ExtensionElements {}
impl Cast<dyn ManualTaskTypeMut> for ExtensionElements {}
impl Cast<dyn MessageType> for ExtensionElements {}
impl Cast<dyn MessageTypeMut> for ExtensionElements {}
impl Cast<dyn MessageEventDefinitionType> for ExtensionElements {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn MessageFlowType> for ExtensionElements {}
impl Cast<dyn MessageFlowTypeMut> for ExtensionElements {}
impl Cast<dyn MessageFlowAssociationType> for ExtensionElements {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn MonitoringType> for ExtensionElements {}
impl Cast<dyn MonitoringTypeMut> for ExtensionElements {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ExtensionElements {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ExtensionElements {}
impl Cast<dyn OperationType> for ExtensionElements {}
impl Cast<dyn OperationTypeMut> for ExtensionElements {}
impl Cast<dyn OutputSetType> for ExtensionElements {}
impl Cast<dyn OutputSetTypeMut> for ExtensionElements {}
impl Cast<dyn ParallelGatewayType> for ExtensionElements {}
impl Cast<dyn ParallelGatewayTypeMut> for ExtensionElements {}
impl Cast<dyn ParticipantType> for ExtensionElements {}
impl Cast<dyn ParticipantTypeMut> for ExtensionElements {}
impl Cast<dyn ParticipantAssociationType> for ExtensionElements {}
impl Cast<dyn ParticipantAssociationTypeMut> for ExtensionElements {}
impl Cast<dyn ParticipantMultiplicityType> for ExtensionElements {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ExtensionElements {}
impl Cast<dyn PartnerEntityType> for ExtensionElements {}
impl Cast<dyn PartnerEntityTypeMut> for ExtensionElements {}
impl Cast<dyn PartnerRoleType> for ExtensionElements {}
impl Cast<dyn PartnerRoleTypeMut> for ExtensionElements {}
impl Cast<dyn PerformerType> for ExtensionElements {}
impl Cast<dyn PerformerTypeMut> for ExtensionElements {}
impl Cast<dyn PotentialOwnerType> for ExtensionElements {}
impl Cast<dyn PotentialOwnerTypeMut> for ExtensionElements {}
impl Cast<dyn ProcessType> for ExtensionElements {}
impl Cast<dyn ProcessTypeMut> for ExtensionElements {}
impl Cast<dyn PropertyType> for ExtensionElements {}
impl Cast<dyn PropertyTypeMut> for ExtensionElements {}
impl Cast<dyn ReceiveTaskType> for ExtensionElements {}
impl Cast<dyn ReceiveTaskTypeMut> for ExtensionElements {}
impl Cast<dyn RelationshipType> for ExtensionElements {}
impl Cast<dyn RelationshipTypeMut> for ExtensionElements {}
impl Cast<dyn RenderingType> for ExtensionElements {}
impl Cast<dyn RenderingTypeMut> for ExtensionElements {}
impl Cast<dyn ResourceType> for ExtensionElements {}
impl Cast<dyn ResourceTypeMut> for ExtensionElements {}
impl Cast<dyn ResourceAssignmentExpressionType> for ExtensionElements {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ExtensionElements {}
impl Cast<dyn ResourceParameterType> for ExtensionElements {}
impl Cast<dyn ResourceParameterTypeMut> for ExtensionElements {}
impl Cast<dyn ResourceParameterBindingType> for ExtensionElements {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ExtensionElements {}
impl Cast<dyn ResourceRoleType> for ExtensionElements {}
impl Cast<dyn ResourceRoleTypeMut> for ExtensionElements {}
impl Cast<dyn RootElementType> for ExtensionElements {}
impl Cast<dyn RootElementTypeMut> for ExtensionElements {}
impl Cast<dyn ScriptTaskType> for ExtensionElements {}
impl Cast<dyn ScriptTaskTypeMut> for ExtensionElements {}
impl Cast<dyn ScriptType> for ExtensionElements {}
impl Cast<dyn ScriptTypeMut> for ExtensionElements {}
impl Cast<dyn SendTaskType> for ExtensionElements {}
impl Cast<dyn SendTaskTypeMut> for ExtensionElements {}
impl Cast<dyn SequenceFlowType> for ExtensionElements {}
impl Cast<dyn SequenceFlowTypeMut> for ExtensionElements {}
impl Cast<dyn ServiceTaskType> for ExtensionElements {}
impl Cast<dyn ServiceTaskTypeMut> for ExtensionElements {}
impl Cast<dyn SignalType> for ExtensionElements {}
impl Cast<dyn SignalTypeMut> for ExtensionElements {}
impl Cast<dyn SignalEventDefinitionType> for ExtensionElements {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn StandardLoopCharacteristicsType> for ExtensionElements {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ExtensionElements {}
impl Cast<dyn StartEventType> for ExtensionElements {}
impl Cast<dyn StartEventTypeMut> for ExtensionElements {}
impl Cast<dyn SubChoreographyType> for ExtensionElements {}
impl Cast<dyn SubChoreographyTypeMut> for ExtensionElements {}
impl Cast<dyn SubConversationType> for ExtensionElements {}
impl Cast<dyn SubConversationTypeMut> for ExtensionElements {}
impl Cast<dyn SubProcessType> for ExtensionElements {}
impl Cast<dyn SubProcessTypeMut> for ExtensionElements {}
impl Cast<dyn TaskType> for ExtensionElements {}
impl Cast<dyn TaskTypeMut> for ExtensionElements {}
impl Cast<dyn TerminateEventDefinitionType> for ExtensionElements {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn TextAnnotationType> for ExtensionElements {}
impl Cast<dyn TextAnnotationTypeMut> for ExtensionElements {}
impl Cast<dyn TextType> for ExtensionElements {}
impl Cast<dyn TextTypeMut> for ExtensionElements {}
impl Cast<dyn ThrowEventType> for ExtensionElements {}
impl Cast<dyn ThrowEventTypeMut> for ExtensionElements {}
impl Cast<dyn TimerEventDefinitionType> for ExtensionElements {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ExtensionElements {}
impl Cast<dyn TransactionType> for ExtensionElements {}
impl Cast<dyn TransactionTypeMut> for ExtensionElements {}
impl Cast<dyn UserTaskType> for ExtensionElements {}
impl Cast<dyn UserTaskTypeMut> for ExtensionElements {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:flowElement")]
#[serde(tag = "type")]
pub enum FlowElement {
    #[xml(tag = "bpmn:adHocSubProcess")]
    AdHocSubProcess(AdHocSubProcess),
    #[xml(tag = "bpmn:boundaryEvent")]
    BoundaryEvent(BoundaryEvent),
    #[xml(tag = "bpmn:businessRuleTask")]
    BusinessRuleTask(BusinessRuleTask),
    #[xml(tag = "bpmn:callActivity")]
    CallActivity(CallActivity),
    #[xml(tag = "bpmn:callChoreography")]
    CallChoreography(CallChoreography),
    #[xml(tag = "bpmn:choreographyTask")]
    ChoreographyTask(ChoreographyTask),
    #[xml(tag = "bpmn:complexGateway")]
    ComplexGateway(ComplexGateway),
    #[xml(tag = "bpmn:dataObject")]
    DataObject(DataObject),
    #[xml(tag = "bpmn:dataObjectReference")]
    DataObjectReference(DataObjectReference),
    #[xml(tag = "bpmn:dataStoreReference")]
    DataStoreReference(DataStoreReference),
    #[xml(tag = "bpmn:endEvent")]
    EndEvent(EndEvent),
    #[xml(tag = "bpmn:event")]
    Event(Event),
    #[xml(tag = "bpmn:eventBasedGateway")]
    EventBasedGateway(EventBasedGateway),
    #[xml(tag = "bpmn:exclusiveGateway")]
    ExclusiveGateway(ExclusiveGateway),
    #[xml(tag = "bpmn:implicitThrowEvent")]
    ImplicitThrowEvent(ImplicitThrowEvent),
    #[xml(tag = "bpmn:inclusiveGateway")]
    InclusiveGateway(InclusiveGateway),
    #[xml(tag = "bpmn:intermediateCatchEvent")]
    IntermediateCatchEvent(IntermediateCatchEvent),
    #[xml(tag = "bpmn:intermediateThrowEvent")]
    IntermediateThrowEvent(IntermediateThrowEvent),
    #[xml(tag = "bpmn:manualTask")]
    ManualTask(ManualTask),
    #[xml(tag = "bpmn:parallelGateway")]
    ParallelGateway(ParallelGateway),
    #[xml(tag = "bpmn:receiveTask")]
    ReceiveTask(ReceiveTask),
    #[xml(tag = "bpmn:scriptTask")]
    ScriptTask(ScriptTask),
    #[xml(tag = "bpmn:sendTask")]
    SendTask(SendTask),
    #[xml(tag = "bpmn:sequenceFlow")]
    SequenceFlow(SequenceFlow),
    #[xml(tag = "bpmn:serviceTask")]
    ServiceTask(ServiceTask),
    #[xml(tag = "bpmn:startEvent")]
    StartEvent(StartEvent),
    #[xml(tag = "bpmn:subChoreography")]
    SubChoreography(SubChoreography),
    #[xml(tag = "bpmn:subProcess")]
    SubProcess(SubProcess),
    #[xml(tag = "bpmn:task")]
    Task(Task),
    #[xml(tag = "bpmn:transaction")]
    Transaction(Transaction),
    #[xml(tag = "bpmn:userTask")]
    UserTask(UserTask),
}
impl FlowElement {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            FlowElement::AdHocSubProcess(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::BoundaryEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::BusinessRuleTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::CallActivity(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::CallChoreography(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ChoreographyTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ComplexGateway(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::DataObject(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::DataObjectReference(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::DataStoreReference(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::EndEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::Event(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::EventBasedGateway(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ExclusiveGateway(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ImplicitThrowEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::InclusiveGateway(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::IntermediateCatchEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::IntermediateThrowEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ManualTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ParallelGateway(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ReceiveTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ScriptTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::SendTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::SequenceFlow(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::ServiceTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::StartEvent(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::SubChoreography(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::SubProcess(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::Task(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::Transaction(e) => Box::new(e) as Box<dyn DocumentElement>,
            FlowElement::UserTask(e) => Box::new(e) as Box<dyn DocumentElement>,
        }
    }
}
impl DocumentElementContainer for FlowElement {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            FlowElement::AdHocSubProcess(e) => e.find_by_id_mut(id),
            FlowElement::BoundaryEvent(e) => e.find_by_id_mut(id),
            FlowElement::BusinessRuleTask(e) => e.find_by_id_mut(id),
            FlowElement::CallActivity(e) => e.find_by_id_mut(id),
            FlowElement::CallChoreography(e) => e.find_by_id_mut(id),
            FlowElement::ChoreographyTask(e) => e.find_by_id_mut(id),
            FlowElement::ComplexGateway(e) => e.find_by_id_mut(id),
            FlowElement::DataObject(e) => e.find_by_id_mut(id),
            FlowElement::DataObjectReference(e) => e.find_by_id_mut(id),
            FlowElement::DataStoreReference(e) => e.find_by_id_mut(id),
            FlowElement::EndEvent(e) => e.find_by_id_mut(id),
            FlowElement::Event(e) => e.find_by_id_mut(id),
            FlowElement::EventBasedGateway(e) => e.find_by_id_mut(id),
            FlowElement::ExclusiveGateway(e) => e.find_by_id_mut(id),
            FlowElement::ImplicitThrowEvent(e) => e.find_by_id_mut(id),
            FlowElement::InclusiveGateway(e) => e.find_by_id_mut(id),
            FlowElement::IntermediateCatchEvent(e) => e.find_by_id_mut(id),
            FlowElement::IntermediateThrowEvent(e) => e.find_by_id_mut(id),
            FlowElement::ManualTask(e) => e.find_by_id_mut(id),
            FlowElement::ParallelGateway(e) => e.find_by_id_mut(id),
            FlowElement::ReceiveTask(e) => e.find_by_id_mut(id),
            FlowElement::ScriptTask(e) => e.find_by_id_mut(id),
            FlowElement::SendTask(e) => e.find_by_id_mut(id),
            FlowElement::SequenceFlow(e) => e.find_by_id_mut(id),
            FlowElement::ServiceTask(e) => e.find_by_id_mut(id),
            FlowElement::StartEvent(e) => e.find_by_id_mut(id),
            FlowElement::SubChoreography(e) => e.find_by_id_mut(id),
            FlowElement::SubProcess(e) => e.find_by_id_mut(id),
            FlowElement::Task(e) => e.find_by_id_mut(id),
            FlowElement::Transaction(e) => e.find_by_id_mut(id),
            FlowElement::UserTask(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            FlowElement::AdHocSubProcess(e) => e.find_by_id(id),
            FlowElement::BoundaryEvent(e) => e.find_by_id(id),
            FlowElement::BusinessRuleTask(e) => e.find_by_id(id),
            FlowElement::CallActivity(e) => e.find_by_id(id),
            FlowElement::CallChoreography(e) => e.find_by_id(id),
            FlowElement::ChoreographyTask(e) => e.find_by_id(id),
            FlowElement::ComplexGateway(e) => e.find_by_id(id),
            FlowElement::DataObject(e) => e.find_by_id(id),
            FlowElement::DataObjectReference(e) => e.find_by_id(id),
            FlowElement::DataStoreReference(e) => e.find_by_id(id),
            FlowElement::EndEvent(e) => e.find_by_id(id),
            FlowElement::Event(e) => e.find_by_id(id),
            FlowElement::EventBasedGateway(e) => e.find_by_id(id),
            FlowElement::ExclusiveGateway(e) => e.find_by_id(id),
            FlowElement::ImplicitThrowEvent(e) => e.find_by_id(id),
            FlowElement::InclusiveGateway(e) => e.find_by_id(id),
            FlowElement::IntermediateCatchEvent(e) => e.find_by_id(id),
            FlowElement::IntermediateThrowEvent(e) => e.find_by_id(id),
            FlowElement::ManualTask(e) => e.find_by_id(id),
            FlowElement::ParallelGateway(e) => e.find_by_id(id),
            FlowElement::ReceiveTask(e) => e.find_by_id(id),
            FlowElement::ScriptTask(e) => e.find_by_id(id),
            FlowElement::SendTask(e) => e.find_by_id(id),
            FlowElement::SequenceFlow(e) => e.find_by_id(id),
            FlowElement::ServiceTask(e) => e.find_by_id(id),
            FlowElement::StartEvent(e) => e.find_by_id(id),
            FlowElement::SubChoreography(e) => e.find_by_id(id),
            FlowElement::SubProcess(e) => e.find_by_id(id),
            FlowElement::Task(e) => e.find_by_id(id),
            FlowElement::Transaction(e) => e.find_by_id(id),
            FlowElement::UserTask(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for FlowElement {
    fn element(&self) -> Element {
        Element::FlowElement
    }
}
/// Access to `flowElement`
pub trait FlowElementType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `auditing` child
    fn auditing(&self) -> &Option<Auditing>;
    /// Get value of `monitoring` child
    fn monitoring(&self) -> &Option<Monitoring>;
    /// Get value of `categoryValueRef` child
    fn category_value_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(FlowElementType);
impl_downcast!(FlowElementType);
/// Mutable access to `flowElement`
pub trait FlowElementTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + FlowElementType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `auditing` child
    fn auditing_mut(&mut self) -> &mut Option<Auditing>;
    /// Set value of `auditing` child
    fn set_auditing(&mut self, value: Option<Auditing>);
    /// Get a mutable value of `monitoring` child
    fn monitoring_mut(&mut self) -> &mut Option<Monitoring>;
    /// Set value of `monitoring` child
    fn set_monitoring(&mut self, value: Option<Monitoring>);
    /// Get a mutable value of `categoryValueRef` child
    fn category_value_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `categoryValueRef` child
    fn set_category_value_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(FlowElementTypeMut);
impl_downcast!(FlowElementTypeMut);
impl Cast<dyn DefinitionsType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DefinitionsType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ImportType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ImportType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ImportTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ActivityType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ActivityType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for FlowElement {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ArtifactType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for FlowElement {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AssignmentType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for FlowElement {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AuditingType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AuditingType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for FlowElement {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for FlowElement {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BoundaryEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallableElementType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallActivityType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallChoreographyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallConversationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CatchEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryValueType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CollaborationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationLinkType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationNodeType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::Event(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::Task(e) => Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::Event(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::Task(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::Transaction(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::Event(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::Task(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::Transaction(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::Event(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::Transaction(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStateType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStateType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DocumentationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EndEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EndEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EndPointType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EndPointType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExpressionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementType> for FlowElement {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowElementType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for FlowElement {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowNodeType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FormalExpressionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalConversationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupType> for FlowElement {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GroupType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GroupType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn GroupTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for FlowElement {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn HumanPerformerType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetType> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputSetType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputSetType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for FlowElement {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InterfaceType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingType> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneType> for FlowElement {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for FlowElement {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneSetType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for FlowElement {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ManualTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MonitoringType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for FlowElement {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ScriptTask(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::StartEvent(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::Event(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::Event(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::Task(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::Event(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::Transaction(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn OperationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn OperationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn OperationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for FlowElement {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn OutputSetType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityType> for FlowElement {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerEntityType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleType> for FlowElement {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerRoleType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for FlowElement {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PerformerType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PerformerType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for FlowElement {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ProcessType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ProcessType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PropertyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PropertyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for FlowElement {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RelationshipType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingType> for FlowElement {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RenderingType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RenderingType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::Event(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceRoleType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementType> for FlowElement {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RootElementType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RootElementType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SendTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SequenceFlowType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ServiceTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for FlowElement {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ScriptTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SendTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::StartEvent(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SubChoreography(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::Task(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            FlowElement::UserTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn StartEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn StartEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubChoreographyType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubConversationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessType> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubProcessType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BoundaryEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallChoreography(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataObject(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ReceiveTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ServiceTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::SubProcess(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TextAnnotationType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TextType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TextType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TextTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for FlowElement {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ThrowEventType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::CallActivity(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ChoreographyTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ComplexGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::DataStoreReference(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::EndEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ExclusiveGateway(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ImplicitThrowEvent(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::InclusiveGateway(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateCatchEvent(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::IntermediateThrowEvent(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            FlowElement::ManualTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionType> for FlowElement {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TransactionType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TransactionType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for FlowElement {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::Event(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::Task(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn UserTaskType>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for FlowElement {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::CallActivity(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::CallChoreography(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::DataObject(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::EndEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::Event(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ManualTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ScriptTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::SendTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::ServiceTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::StartEvent(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::SubChoreography(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::SubProcess(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::Task(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::Transaction(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            FlowElement::UserTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            FlowElement::AdHocSubProcess(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::BoundaryEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::BusinessRuleTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::CallActivity(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::CallChoreography(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ChoreographyTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ComplexGateway(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::DataObject(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::DataObjectReference(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::DataStoreReference(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::EndEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::Event(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::EventBasedGateway(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ExclusiveGateway(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ImplicitThrowEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::InclusiveGateway(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateCatchEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::IntermediateThrowEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ManualTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ParallelGateway(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ReceiveTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ScriptTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::SendTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::SequenceFlow(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::ServiceTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::StartEvent(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::SubChoreography(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::SubProcess(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::Task(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::Transaction(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            FlowElement::UserTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:flowNode")]
#[serde(tag = "type")]
pub enum FlowNode {}
impl FlowNode {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for FlowNode {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for FlowNode {
    fn element(&self) -> Element {
        Element::FlowNode
    }
}
/// Access to `flowNode`
pub trait FlowNodeType: FlowElementType + Downcast + Debug + Send + DynClone {
    /// Get value of `incoming` child
    fn incomings(&self) -> &Vec<String>;
    /// Get value of `outgoing` child
    fn outgoings(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(FlowNodeType);
impl_downcast!(FlowNodeType);
/// Mutable access to `flowNode`
pub trait FlowNodeTypeMut:
    FlowElementTypeMut + Downcast + Debug + Send + DynClone + FlowNodeType
{
    /// Get a mutable value of `incoming` child
    fn incomings_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `incoming` child
    fn set_incomings(&mut self, value: Vec<String>);
    /// Get a mutable value of `outgoing` child
    fn outgoings_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `outgoing` child
    fn set_outgoings(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(FlowNodeTypeMut);
impl_downcast!(FlowNodeTypeMut);
impl Cast<dyn DefinitionsType> for FlowNode {}
impl Cast<dyn DefinitionsTypeMut> for FlowNode {}
impl Cast<dyn ImportType> for FlowNode {}
impl Cast<dyn ImportTypeMut> for FlowNode {}
impl Cast<dyn ActivityType> for FlowNode {}
impl Cast<dyn ActivityTypeMut> for FlowNode {}
impl Cast<dyn AdHocSubProcessType> for FlowNode {}
impl Cast<dyn AdHocSubProcessTypeMut> for FlowNode {}
impl Cast<dyn ArtifactType> for FlowNode {}
impl Cast<dyn ArtifactTypeMut> for FlowNode {}
impl Cast<dyn AssignmentType> for FlowNode {}
impl Cast<dyn AssignmentTypeMut> for FlowNode {}
impl Cast<dyn AssociationType> for FlowNode {}
impl Cast<dyn AssociationTypeMut> for FlowNode {}
impl Cast<dyn AuditingType> for FlowNode {}
impl Cast<dyn AuditingTypeMut> for FlowNode {}
impl Cast<dyn BaseElementType> for FlowNode {}
impl Cast<dyn BaseElementTypeMut> for FlowNode {}
impl Cast<dyn BaseElementWithMixedContentType> for FlowNode {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for FlowNode {}
impl Cast<dyn BoundaryEventType> for FlowNode {}
impl Cast<dyn BoundaryEventTypeMut> for FlowNode {}
impl Cast<dyn BusinessRuleTaskType> for FlowNode {}
impl Cast<dyn BusinessRuleTaskTypeMut> for FlowNode {}
impl Cast<dyn CallableElementType> for FlowNode {}
impl Cast<dyn CallableElementTypeMut> for FlowNode {}
impl Cast<dyn CallActivityType> for FlowNode {}
impl Cast<dyn CallActivityTypeMut> for FlowNode {}
impl Cast<dyn CallChoreographyType> for FlowNode {}
impl Cast<dyn CallChoreographyTypeMut> for FlowNode {}
impl Cast<dyn CallConversationType> for FlowNode {}
impl Cast<dyn CallConversationTypeMut> for FlowNode {}
impl Cast<dyn CancelEventDefinitionType> for FlowNode {}
impl Cast<dyn CancelEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn CatchEventType> for FlowNode {}
impl Cast<dyn CatchEventTypeMut> for FlowNode {}
impl Cast<dyn CategoryType> for FlowNode {}
impl Cast<dyn CategoryTypeMut> for FlowNode {}
impl Cast<dyn CategoryValueType> for FlowNode {}
impl Cast<dyn CategoryValueTypeMut> for FlowNode {}
impl Cast<dyn ChoreographyType> for FlowNode {}
impl Cast<dyn ChoreographyTypeMut> for FlowNode {}
impl Cast<dyn ChoreographyActivityType> for FlowNode {}
impl Cast<dyn ChoreographyActivityTypeMut> for FlowNode {}
impl Cast<dyn ChoreographyTaskType> for FlowNode {}
impl Cast<dyn ChoreographyTaskTypeMut> for FlowNode {}
impl Cast<dyn CollaborationType> for FlowNode {}
impl Cast<dyn CollaborationTypeMut> for FlowNode {}
impl Cast<dyn CompensateEventDefinitionType> for FlowNode {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn ComplexBehaviorDefinitionType> for FlowNode {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for FlowNode {}
impl Cast<dyn ComplexGatewayType> for FlowNode {}
impl Cast<dyn ComplexGatewayTypeMut> for FlowNode {}
impl Cast<dyn ConditionalEventDefinitionType> for FlowNode {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn ConversationType> for FlowNode {}
impl Cast<dyn ConversationTypeMut> for FlowNode {}
impl Cast<dyn ConversationAssociationType> for FlowNode {}
impl Cast<dyn ConversationAssociationTypeMut> for FlowNode {}
impl Cast<dyn ConversationLinkType> for FlowNode {}
impl Cast<dyn ConversationLinkTypeMut> for FlowNode {}
impl Cast<dyn ConversationNodeType> for FlowNode {}
impl Cast<dyn ConversationNodeTypeMut> for FlowNode {}
impl Cast<dyn CorrelationKeyType> for FlowNode {}
impl Cast<dyn CorrelationKeyTypeMut> for FlowNode {}
impl Cast<dyn CorrelationPropertyType> for FlowNode {}
impl Cast<dyn CorrelationPropertyTypeMut> for FlowNode {}
impl Cast<dyn CorrelationPropertyBindingType> for FlowNode {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for FlowNode {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for FlowNode {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for FlowNode {}
impl Cast<dyn CorrelationSubscriptionType> for FlowNode {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for FlowNode {}
impl Cast<dyn DataAssociationType> for FlowNode {}
impl Cast<dyn DataAssociationTypeMut> for FlowNode {}
impl Cast<dyn DataInputType> for FlowNode {}
impl Cast<dyn DataInputTypeMut> for FlowNode {}
impl Cast<dyn DataInputAssociationType> for FlowNode {}
impl Cast<dyn DataInputAssociationTypeMut> for FlowNode {}
impl Cast<dyn DataObjectType> for FlowNode {}
impl Cast<dyn DataObjectTypeMut> for FlowNode {}
impl Cast<dyn DataObjectReferenceType> for FlowNode {}
impl Cast<dyn DataObjectReferenceTypeMut> for FlowNode {}
impl Cast<dyn DataOutputType> for FlowNode {}
impl Cast<dyn DataOutputTypeMut> for FlowNode {}
impl Cast<dyn DataOutputAssociationType> for FlowNode {}
impl Cast<dyn DataOutputAssociationTypeMut> for FlowNode {}
impl Cast<dyn DataStateType> for FlowNode {}
impl Cast<dyn DataStateTypeMut> for FlowNode {}
impl Cast<dyn DataStoreType> for FlowNode {}
impl Cast<dyn DataStoreTypeMut> for FlowNode {}
impl Cast<dyn DataStoreReferenceType> for FlowNode {}
impl Cast<dyn DataStoreReferenceTypeMut> for FlowNode {}
impl Cast<dyn DocumentationType> for FlowNode {}
impl Cast<dyn DocumentationTypeMut> for FlowNode {}
impl Cast<dyn EndEventType> for FlowNode {}
impl Cast<dyn EndEventTypeMut> for FlowNode {}
impl Cast<dyn EndPointType> for FlowNode {}
impl Cast<dyn EndPointTypeMut> for FlowNode {}
impl Cast<dyn ErrorType> for FlowNode {}
impl Cast<dyn ErrorTypeMut> for FlowNode {}
impl Cast<dyn ErrorEventDefinitionType> for FlowNode {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn EscalationType> for FlowNode {}
impl Cast<dyn EscalationTypeMut> for FlowNode {}
impl Cast<dyn EscalationEventDefinitionType> for FlowNode {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn EventType> for FlowNode {}
impl Cast<dyn EventTypeMut> for FlowNode {}
impl Cast<dyn EventBasedGatewayType> for FlowNode {}
impl Cast<dyn EventBasedGatewayTypeMut> for FlowNode {}
impl Cast<dyn EventDefinitionType> for FlowNode {}
impl Cast<dyn EventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn ExclusiveGatewayType> for FlowNode {}
impl Cast<dyn ExclusiveGatewayTypeMut> for FlowNode {}
impl Cast<dyn ExpressionType> for FlowNode {}
impl Cast<dyn ExpressionTypeMut> for FlowNode {}
impl Cast<dyn ExtensionType> for FlowNode {}
impl Cast<dyn ExtensionTypeMut> for FlowNode {}
impl Cast<dyn ExtensionElementsType> for FlowNode {}
impl Cast<dyn ExtensionElementsTypeMut> for FlowNode {}
impl Cast<dyn FlowElementType> for FlowNode {}
impl Cast<dyn FlowElementTypeMut> for FlowNode {}
impl Cast<dyn FlowNodeType> for FlowNode {}
impl Cast<dyn FlowNodeTypeMut> for FlowNode {}
impl Cast<dyn FormalExpressionType> for FlowNode {}
impl Cast<dyn FormalExpressionTypeMut> for FlowNode {}
impl Cast<dyn GatewayType> for FlowNode {}
impl Cast<dyn GatewayTypeMut> for FlowNode {}
impl Cast<dyn GlobalBusinessRuleTaskType> for FlowNode {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for FlowNode {}
impl Cast<dyn GlobalChoreographyTaskType> for FlowNode {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for FlowNode {}
impl Cast<dyn GlobalConversationType> for FlowNode {}
impl Cast<dyn GlobalConversationTypeMut> for FlowNode {}
impl Cast<dyn GlobalManualTaskType> for FlowNode {}
impl Cast<dyn GlobalManualTaskTypeMut> for FlowNode {}
impl Cast<dyn GlobalScriptTaskType> for FlowNode {}
impl Cast<dyn GlobalScriptTaskTypeMut> for FlowNode {}
impl Cast<dyn GlobalTaskType> for FlowNode {}
impl Cast<dyn GlobalTaskTypeMut> for FlowNode {}
impl Cast<dyn GlobalUserTaskType> for FlowNode {}
impl Cast<dyn GlobalUserTaskTypeMut> for FlowNode {}
impl Cast<dyn GroupType> for FlowNode {}
impl Cast<dyn GroupTypeMut> for FlowNode {}
impl Cast<dyn HumanPerformerType> for FlowNode {}
impl Cast<dyn HumanPerformerTypeMut> for FlowNode {}
impl Cast<dyn ImplicitThrowEventType> for FlowNode {}
impl Cast<dyn ImplicitThrowEventTypeMut> for FlowNode {}
impl Cast<dyn InclusiveGatewayType> for FlowNode {}
impl Cast<dyn InclusiveGatewayTypeMut> for FlowNode {}
impl Cast<dyn InputSetType> for FlowNode {}
impl Cast<dyn InputSetTypeMut> for FlowNode {}
impl Cast<dyn InterfaceType> for FlowNode {}
impl Cast<dyn InterfaceTypeMut> for FlowNode {}
impl Cast<dyn IntermediateCatchEventType> for FlowNode {}
impl Cast<dyn IntermediateCatchEventTypeMut> for FlowNode {}
impl Cast<dyn IntermediateThrowEventType> for FlowNode {}
impl Cast<dyn IntermediateThrowEventTypeMut> for FlowNode {}
impl Cast<dyn InputOutputBindingType> for FlowNode {}
impl Cast<dyn InputOutputBindingTypeMut> for FlowNode {}
impl Cast<dyn InputOutputSpecificationType> for FlowNode {}
impl Cast<dyn InputOutputSpecificationTypeMut> for FlowNode {}
impl Cast<dyn ItemDefinitionType> for FlowNode {}
impl Cast<dyn ItemDefinitionTypeMut> for FlowNode {}
impl Cast<dyn LaneType> for FlowNode {}
impl Cast<dyn LaneTypeMut> for FlowNode {}
impl Cast<dyn LaneSetType> for FlowNode {}
impl Cast<dyn LaneSetTypeMut> for FlowNode {}
impl Cast<dyn LinkEventDefinitionType> for FlowNode {}
impl Cast<dyn LinkEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn LoopCharacteristicsType> for FlowNode {}
impl Cast<dyn LoopCharacteristicsTypeMut> for FlowNode {}
impl Cast<dyn ManualTaskType> for FlowNode {}
impl Cast<dyn ManualTaskTypeMut> for FlowNode {}
impl Cast<dyn MessageType> for FlowNode {}
impl Cast<dyn MessageTypeMut> for FlowNode {}
impl Cast<dyn MessageEventDefinitionType> for FlowNode {}
impl Cast<dyn MessageEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn MessageFlowType> for FlowNode {}
impl Cast<dyn MessageFlowTypeMut> for FlowNode {}
impl Cast<dyn MessageFlowAssociationType> for FlowNode {}
impl Cast<dyn MessageFlowAssociationTypeMut> for FlowNode {}
impl Cast<dyn MonitoringType> for FlowNode {}
impl Cast<dyn MonitoringTypeMut> for FlowNode {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for FlowNode {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for FlowNode {}
impl Cast<dyn OperationType> for FlowNode {}
impl Cast<dyn OperationTypeMut> for FlowNode {}
impl Cast<dyn OutputSetType> for FlowNode {}
impl Cast<dyn OutputSetTypeMut> for FlowNode {}
impl Cast<dyn ParallelGatewayType> for FlowNode {}
impl Cast<dyn ParallelGatewayTypeMut> for FlowNode {}
impl Cast<dyn ParticipantType> for FlowNode {}
impl Cast<dyn ParticipantTypeMut> for FlowNode {}
impl Cast<dyn ParticipantAssociationType> for FlowNode {}
impl Cast<dyn ParticipantAssociationTypeMut> for FlowNode {}
impl Cast<dyn ParticipantMultiplicityType> for FlowNode {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for FlowNode {}
impl Cast<dyn PartnerEntityType> for FlowNode {}
impl Cast<dyn PartnerEntityTypeMut> for FlowNode {}
impl Cast<dyn PartnerRoleType> for FlowNode {}
impl Cast<dyn PartnerRoleTypeMut> for FlowNode {}
impl Cast<dyn PerformerType> for FlowNode {}
impl Cast<dyn PerformerTypeMut> for FlowNode {}
impl Cast<dyn PotentialOwnerType> for FlowNode {}
impl Cast<dyn PotentialOwnerTypeMut> for FlowNode {}
impl Cast<dyn ProcessType> for FlowNode {}
impl Cast<dyn ProcessTypeMut> for FlowNode {}
impl Cast<dyn PropertyType> for FlowNode {}
impl Cast<dyn PropertyTypeMut> for FlowNode {}
impl Cast<dyn ReceiveTaskType> for FlowNode {}
impl Cast<dyn ReceiveTaskTypeMut> for FlowNode {}
impl Cast<dyn RelationshipType> for FlowNode {}
impl Cast<dyn RelationshipTypeMut> for FlowNode {}
impl Cast<dyn RenderingType> for FlowNode {}
impl Cast<dyn RenderingTypeMut> for FlowNode {}
impl Cast<dyn ResourceType> for FlowNode {}
impl Cast<dyn ResourceTypeMut> for FlowNode {}
impl Cast<dyn ResourceAssignmentExpressionType> for FlowNode {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for FlowNode {}
impl Cast<dyn ResourceParameterType> for FlowNode {}
impl Cast<dyn ResourceParameterTypeMut> for FlowNode {}
impl Cast<dyn ResourceParameterBindingType> for FlowNode {}
impl Cast<dyn ResourceParameterBindingTypeMut> for FlowNode {}
impl Cast<dyn ResourceRoleType> for FlowNode {}
impl Cast<dyn ResourceRoleTypeMut> for FlowNode {}
impl Cast<dyn RootElementType> for FlowNode {}
impl Cast<dyn RootElementTypeMut> for FlowNode {}
impl Cast<dyn ScriptTaskType> for FlowNode {}
impl Cast<dyn ScriptTaskTypeMut> for FlowNode {}
impl Cast<dyn ScriptType> for FlowNode {}
impl Cast<dyn ScriptTypeMut> for FlowNode {}
impl Cast<dyn SendTaskType> for FlowNode {}
impl Cast<dyn SendTaskTypeMut> for FlowNode {}
impl Cast<dyn SequenceFlowType> for FlowNode {}
impl Cast<dyn SequenceFlowTypeMut> for FlowNode {}
impl Cast<dyn ServiceTaskType> for FlowNode {}
impl Cast<dyn ServiceTaskTypeMut> for FlowNode {}
impl Cast<dyn SignalType> for FlowNode {}
impl Cast<dyn SignalTypeMut> for FlowNode {}
impl Cast<dyn SignalEventDefinitionType> for FlowNode {}
impl Cast<dyn SignalEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn StandardLoopCharacteristicsType> for FlowNode {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for FlowNode {}
impl Cast<dyn StartEventType> for FlowNode {}
impl Cast<dyn StartEventTypeMut> for FlowNode {}
impl Cast<dyn SubChoreographyType> for FlowNode {}
impl Cast<dyn SubChoreographyTypeMut> for FlowNode {}
impl Cast<dyn SubConversationType> for FlowNode {}
impl Cast<dyn SubConversationTypeMut> for FlowNode {}
impl Cast<dyn SubProcessType> for FlowNode {}
impl Cast<dyn SubProcessTypeMut> for FlowNode {}
impl Cast<dyn TaskType> for FlowNode {}
impl Cast<dyn TaskTypeMut> for FlowNode {}
impl Cast<dyn TerminateEventDefinitionType> for FlowNode {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn TextAnnotationType> for FlowNode {}
impl Cast<dyn TextAnnotationTypeMut> for FlowNode {}
impl Cast<dyn TextType> for FlowNode {}
impl Cast<dyn TextTypeMut> for FlowNode {}
impl Cast<dyn ThrowEventType> for FlowNode {}
impl Cast<dyn ThrowEventTypeMut> for FlowNode {}
impl Cast<dyn TimerEventDefinitionType> for FlowNode {}
impl Cast<dyn TimerEventDefinitionTypeMut> for FlowNode {}
impl Cast<dyn TransactionType> for FlowNode {}
impl Cast<dyn TransactionTypeMut> for FlowNode {}
impl Cast<dyn UserTaskType> for FlowNode {}
impl Cast<dyn UserTaskTypeMut> for FlowNode {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:formalExpression")]
pub struct FormalExpression {
    #[xml(attr = "id")]
    #[tia("BaseElementWithMixedContentType",rg*="id","BaseElementWithMixedContentTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementWithMixedContentType",rg*="documentations","BaseElementWithMixedContentTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementWithMixedContentType",rg*="extension_elements","BaseElementWithMixedContentTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "language")]
    #[tia("FormalExpressionType",rg*="language","FormalExpressionTypeMut",s)]
    pub language: Option<URI>,
    #[xml(attr = "evaluatesToTypeRef")]
    #[tia("FormalExpressionType",rg*="evaluates_totype_ref","FormalExpressionTypeMut",s)]
    pub evaluates_totype_ref: Option<String>,
    #[tia("DocumentElementWithContent",rg*="content",
                    "DocumentElementWithContentMut",s,rmg*="content_mut")]
    #[xml(text)]
    pub content: Option<String>,
}
impl DocumentElement for FormalExpression {
    fn element(&self) -> Element {
        Element::FormalExpression
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for FormalExpression {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ExpressionType for FormalExpression {}
impl ExpressionTypeMut for FormalExpression {}
//

/// Access to `formalExpression`
pub trait FormalExpressionType: ExpressionType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `language`
    fn language(&self) -> &Option<URI>;
    /// Get value of attribute `evaluatesToTypeRef`
    fn evaluates_totype_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(FormalExpressionType);
impl_downcast!(FormalExpressionType);
/// Mutable access to `formalExpression`
pub trait FormalExpressionTypeMut:
    ExpressionTypeMut + Downcast + Debug + Send + DynClone + FormalExpressionType
{
    /// Set value of attribute `language`
    fn set_language(&mut self, value: Option<URI>);
    /// Set value of attribute `evaluatesToTypeRef`
    fn set_evaluates_totype_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(FormalExpressionTypeMut);
impl_downcast!(FormalExpressionTypeMut);
impl Cast<dyn DefinitionsType> for FormalExpression {}
impl Cast<dyn DefinitionsTypeMut> for FormalExpression {}
impl Cast<dyn ImportType> for FormalExpression {}
impl Cast<dyn ImportTypeMut> for FormalExpression {}
impl Cast<dyn ActivityType> for FormalExpression {}
impl Cast<dyn ActivityTypeMut> for FormalExpression {}
impl Cast<dyn AdHocSubProcessType> for FormalExpression {}
impl Cast<dyn AdHocSubProcessTypeMut> for FormalExpression {}
impl Cast<dyn ArtifactType> for FormalExpression {}
impl Cast<dyn ArtifactTypeMut> for FormalExpression {}
impl Cast<dyn AssignmentType> for FormalExpression {}
impl Cast<dyn AssignmentTypeMut> for FormalExpression {}
impl Cast<dyn AssociationType> for FormalExpression {}
impl Cast<dyn AssociationTypeMut> for FormalExpression {}
impl Cast<dyn AuditingType> for FormalExpression {}
impl Cast<dyn AuditingTypeMut> for FormalExpression {}
impl Cast<dyn BaseElementType> for FormalExpression {}
impl Cast<dyn BaseElementTypeMut> for FormalExpression {}
impl Cast<dyn BaseElementWithMixedContentType> for FormalExpression {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for FormalExpression {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BoundaryEventType> for FormalExpression {}
impl Cast<dyn BoundaryEventTypeMut> for FormalExpression {}
impl Cast<dyn BusinessRuleTaskType> for FormalExpression {}
impl Cast<dyn BusinessRuleTaskTypeMut> for FormalExpression {}
impl Cast<dyn CallableElementType> for FormalExpression {}
impl Cast<dyn CallableElementTypeMut> for FormalExpression {}
impl Cast<dyn CallActivityType> for FormalExpression {}
impl Cast<dyn CallActivityTypeMut> for FormalExpression {}
impl Cast<dyn CallChoreographyType> for FormalExpression {}
impl Cast<dyn CallChoreographyTypeMut> for FormalExpression {}
impl Cast<dyn CallConversationType> for FormalExpression {}
impl Cast<dyn CallConversationTypeMut> for FormalExpression {}
impl Cast<dyn CancelEventDefinitionType> for FormalExpression {}
impl Cast<dyn CancelEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn CatchEventType> for FormalExpression {}
impl Cast<dyn CatchEventTypeMut> for FormalExpression {}
impl Cast<dyn CategoryType> for FormalExpression {}
impl Cast<dyn CategoryTypeMut> for FormalExpression {}
impl Cast<dyn CategoryValueType> for FormalExpression {}
impl Cast<dyn CategoryValueTypeMut> for FormalExpression {}
impl Cast<dyn ChoreographyType> for FormalExpression {}
impl Cast<dyn ChoreographyTypeMut> for FormalExpression {}
impl Cast<dyn ChoreographyActivityType> for FormalExpression {}
impl Cast<dyn ChoreographyActivityTypeMut> for FormalExpression {}
impl Cast<dyn ChoreographyTaskType> for FormalExpression {}
impl Cast<dyn ChoreographyTaskTypeMut> for FormalExpression {}
impl Cast<dyn CollaborationType> for FormalExpression {}
impl Cast<dyn CollaborationTypeMut> for FormalExpression {}
impl Cast<dyn CompensateEventDefinitionType> for FormalExpression {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn ComplexBehaviorDefinitionType> for FormalExpression {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn ComplexGatewayType> for FormalExpression {}
impl Cast<dyn ComplexGatewayTypeMut> for FormalExpression {}
impl Cast<dyn ConditionalEventDefinitionType> for FormalExpression {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn ConversationType> for FormalExpression {}
impl Cast<dyn ConversationTypeMut> for FormalExpression {}
impl Cast<dyn ConversationAssociationType> for FormalExpression {}
impl Cast<dyn ConversationAssociationTypeMut> for FormalExpression {}
impl Cast<dyn ConversationLinkType> for FormalExpression {}
impl Cast<dyn ConversationLinkTypeMut> for FormalExpression {}
impl Cast<dyn ConversationNodeType> for FormalExpression {}
impl Cast<dyn ConversationNodeTypeMut> for FormalExpression {}
impl Cast<dyn CorrelationKeyType> for FormalExpression {}
impl Cast<dyn CorrelationKeyTypeMut> for FormalExpression {}
impl Cast<dyn CorrelationPropertyType> for FormalExpression {}
impl Cast<dyn CorrelationPropertyTypeMut> for FormalExpression {}
impl Cast<dyn CorrelationPropertyBindingType> for FormalExpression {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for FormalExpression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for FormalExpression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for FormalExpression {}
impl Cast<dyn CorrelationSubscriptionType> for FormalExpression {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for FormalExpression {}
impl Cast<dyn DataAssociationType> for FormalExpression {}
impl Cast<dyn DataAssociationTypeMut> for FormalExpression {}
impl Cast<dyn DataInputType> for FormalExpression {}
impl Cast<dyn DataInputTypeMut> for FormalExpression {}
impl Cast<dyn DataInputAssociationType> for FormalExpression {}
impl Cast<dyn DataInputAssociationTypeMut> for FormalExpression {}
impl Cast<dyn DataObjectType> for FormalExpression {}
impl Cast<dyn DataObjectTypeMut> for FormalExpression {}
impl Cast<dyn DataObjectReferenceType> for FormalExpression {}
impl Cast<dyn DataObjectReferenceTypeMut> for FormalExpression {}
impl Cast<dyn DataOutputType> for FormalExpression {}
impl Cast<dyn DataOutputTypeMut> for FormalExpression {}
impl Cast<dyn DataOutputAssociationType> for FormalExpression {}
impl Cast<dyn DataOutputAssociationTypeMut> for FormalExpression {}
impl Cast<dyn DataStateType> for FormalExpression {}
impl Cast<dyn DataStateTypeMut> for FormalExpression {}
impl Cast<dyn DataStoreType> for FormalExpression {}
impl Cast<dyn DataStoreTypeMut> for FormalExpression {}
impl Cast<dyn DataStoreReferenceType> for FormalExpression {}
impl Cast<dyn DataStoreReferenceTypeMut> for FormalExpression {}
impl Cast<dyn DocumentationType> for FormalExpression {}
impl Cast<dyn DocumentationTypeMut> for FormalExpression {}
impl Cast<dyn EndEventType> for FormalExpression {}
impl Cast<dyn EndEventTypeMut> for FormalExpression {}
impl Cast<dyn EndPointType> for FormalExpression {}
impl Cast<dyn EndPointTypeMut> for FormalExpression {}
impl Cast<dyn ErrorType> for FormalExpression {}
impl Cast<dyn ErrorTypeMut> for FormalExpression {}
impl Cast<dyn ErrorEventDefinitionType> for FormalExpression {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn EscalationType> for FormalExpression {}
impl Cast<dyn EscalationTypeMut> for FormalExpression {}
impl Cast<dyn EscalationEventDefinitionType> for FormalExpression {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn EventType> for FormalExpression {}
impl Cast<dyn EventTypeMut> for FormalExpression {}
impl Cast<dyn EventBasedGatewayType> for FormalExpression {}
impl Cast<dyn EventBasedGatewayTypeMut> for FormalExpression {}
impl Cast<dyn EventDefinitionType> for FormalExpression {}
impl Cast<dyn EventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn ExclusiveGatewayType> for FormalExpression {}
impl Cast<dyn ExclusiveGatewayTypeMut> for FormalExpression {}
impl Cast<dyn ExpressionType> for FormalExpression {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExpressionTypeMut> for FormalExpression {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExtensionType> for FormalExpression {}
impl Cast<dyn ExtensionTypeMut> for FormalExpression {}
impl Cast<dyn ExtensionElementsType> for FormalExpression {}
impl Cast<dyn ExtensionElementsTypeMut> for FormalExpression {}
impl Cast<dyn FlowElementType> for FormalExpression {}
impl Cast<dyn FlowElementTypeMut> for FormalExpression {}
impl Cast<dyn FlowNodeType> for FormalExpression {}
impl Cast<dyn FlowNodeTypeMut> for FormalExpression {}
impl Cast<dyn FormalExpressionType> for FormalExpression {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionTypeMut> for FormalExpression {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayType> for FormalExpression {}
impl Cast<dyn GatewayTypeMut> for FormalExpression {}
impl Cast<dyn GlobalBusinessRuleTaskType> for FormalExpression {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for FormalExpression {}
impl Cast<dyn GlobalChoreographyTaskType> for FormalExpression {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for FormalExpression {}
impl Cast<dyn GlobalConversationType> for FormalExpression {}
impl Cast<dyn GlobalConversationTypeMut> for FormalExpression {}
impl Cast<dyn GlobalManualTaskType> for FormalExpression {}
impl Cast<dyn GlobalManualTaskTypeMut> for FormalExpression {}
impl Cast<dyn GlobalScriptTaskType> for FormalExpression {}
impl Cast<dyn GlobalScriptTaskTypeMut> for FormalExpression {}
impl Cast<dyn GlobalTaskType> for FormalExpression {}
impl Cast<dyn GlobalTaskTypeMut> for FormalExpression {}
impl Cast<dyn GlobalUserTaskType> for FormalExpression {}
impl Cast<dyn GlobalUserTaskTypeMut> for FormalExpression {}
impl Cast<dyn GroupType> for FormalExpression {}
impl Cast<dyn GroupTypeMut> for FormalExpression {}
impl Cast<dyn HumanPerformerType> for FormalExpression {}
impl Cast<dyn HumanPerformerTypeMut> for FormalExpression {}
impl Cast<dyn ImplicitThrowEventType> for FormalExpression {}
impl Cast<dyn ImplicitThrowEventTypeMut> for FormalExpression {}
impl Cast<dyn InclusiveGatewayType> for FormalExpression {}
impl Cast<dyn InclusiveGatewayTypeMut> for FormalExpression {}
impl Cast<dyn InputSetType> for FormalExpression {}
impl Cast<dyn InputSetTypeMut> for FormalExpression {}
impl Cast<dyn InterfaceType> for FormalExpression {}
impl Cast<dyn InterfaceTypeMut> for FormalExpression {}
impl Cast<dyn IntermediateCatchEventType> for FormalExpression {}
impl Cast<dyn IntermediateCatchEventTypeMut> for FormalExpression {}
impl Cast<dyn IntermediateThrowEventType> for FormalExpression {}
impl Cast<dyn IntermediateThrowEventTypeMut> for FormalExpression {}
impl Cast<dyn InputOutputBindingType> for FormalExpression {}
impl Cast<dyn InputOutputBindingTypeMut> for FormalExpression {}
impl Cast<dyn InputOutputSpecificationType> for FormalExpression {}
impl Cast<dyn InputOutputSpecificationTypeMut> for FormalExpression {}
impl Cast<dyn ItemDefinitionType> for FormalExpression {}
impl Cast<dyn ItemDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn LaneType> for FormalExpression {}
impl Cast<dyn LaneTypeMut> for FormalExpression {}
impl Cast<dyn LaneSetType> for FormalExpression {}
impl Cast<dyn LaneSetTypeMut> for FormalExpression {}
impl Cast<dyn LinkEventDefinitionType> for FormalExpression {}
impl Cast<dyn LinkEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn LoopCharacteristicsType> for FormalExpression {}
impl Cast<dyn LoopCharacteristicsTypeMut> for FormalExpression {}
impl Cast<dyn ManualTaskType> for FormalExpression {}
impl Cast<dyn ManualTaskTypeMut> for FormalExpression {}
impl Cast<dyn MessageType> for FormalExpression {}
impl Cast<dyn MessageTypeMut> for FormalExpression {}
impl Cast<dyn MessageEventDefinitionType> for FormalExpression {}
impl Cast<dyn MessageEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn MessageFlowType> for FormalExpression {}
impl Cast<dyn MessageFlowTypeMut> for FormalExpression {}
impl Cast<dyn MessageFlowAssociationType> for FormalExpression {}
impl Cast<dyn MessageFlowAssociationTypeMut> for FormalExpression {}
impl Cast<dyn MonitoringType> for FormalExpression {}
impl Cast<dyn MonitoringTypeMut> for FormalExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for FormalExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for FormalExpression {}
impl Cast<dyn OperationType> for FormalExpression {}
impl Cast<dyn OperationTypeMut> for FormalExpression {}
impl Cast<dyn OutputSetType> for FormalExpression {}
impl Cast<dyn OutputSetTypeMut> for FormalExpression {}
impl Cast<dyn ParallelGatewayType> for FormalExpression {}
impl Cast<dyn ParallelGatewayTypeMut> for FormalExpression {}
impl Cast<dyn ParticipantType> for FormalExpression {}
impl Cast<dyn ParticipantTypeMut> for FormalExpression {}
impl Cast<dyn ParticipantAssociationType> for FormalExpression {}
impl Cast<dyn ParticipantAssociationTypeMut> for FormalExpression {}
impl Cast<dyn ParticipantMultiplicityType> for FormalExpression {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for FormalExpression {}
impl Cast<dyn PartnerEntityType> for FormalExpression {}
impl Cast<dyn PartnerEntityTypeMut> for FormalExpression {}
impl Cast<dyn PartnerRoleType> for FormalExpression {}
impl Cast<dyn PartnerRoleTypeMut> for FormalExpression {}
impl Cast<dyn PerformerType> for FormalExpression {}
impl Cast<dyn PerformerTypeMut> for FormalExpression {}
impl Cast<dyn PotentialOwnerType> for FormalExpression {}
impl Cast<dyn PotentialOwnerTypeMut> for FormalExpression {}
impl Cast<dyn ProcessType> for FormalExpression {}
impl Cast<dyn ProcessTypeMut> for FormalExpression {}
impl Cast<dyn PropertyType> for FormalExpression {}
impl Cast<dyn PropertyTypeMut> for FormalExpression {}
impl Cast<dyn ReceiveTaskType> for FormalExpression {}
impl Cast<dyn ReceiveTaskTypeMut> for FormalExpression {}
impl Cast<dyn RelationshipType> for FormalExpression {}
impl Cast<dyn RelationshipTypeMut> for FormalExpression {}
impl Cast<dyn RenderingType> for FormalExpression {}
impl Cast<dyn RenderingTypeMut> for FormalExpression {}
impl Cast<dyn ResourceType> for FormalExpression {}
impl Cast<dyn ResourceTypeMut> for FormalExpression {}
impl Cast<dyn ResourceAssignmentExpressionType> for FormalExpression {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for FormalExpression {}
impl Cast<dyn ResourceParameterType> for FormalExpression {}
impl Cast<dyn ResourceParameterTypeMut> for FormalExpression {}
impl Cast<dyn ResourceParameterBindingType> for FormalExpression {}
impl Cast<dyn ResourceParameterBindingTypeMut> for FormalExpression {}
impl Cast<dyn ResourceRoleType> for FormalExpression {}
impl Cast<dyn ResourceRoleTypeMut> for FormalExpression {}
impl Cast<dyn RootElementType> for FormalExpression {}
impl Cast<dyn RootElementTypeMut> for FormalExpression {}
impl Cast<dyn ScriptTaskType> for FormalExpression {}
impl Cast<dyn ScriptTaskTypeMut> for FormalExpression {}
impl Cast<dyn ScriptType> for FormalExpression {}
impl Cast<dyn ScriptTypeMut> for FormalExpression {}
impl Cast<dyn SendTaskType> for FormalExpression {}
impl Cast<dyn SendTaskTypeMut> for FormalExpression {}
impl Cast<dyn SequenceFlowType> for FormalExpression {}
impl Cast<dyn SequenceFlowTypeMut> for FormalExpression {}
impl Cast<dyn ServiceTaskType> for FormalExpression {}
impl Cast<dyn ServiceTaskTypeMut> for FormalExpression {}
impl Cast<dyn SignalType> for FormalExpression {}
impl Cast<dyn SignalTypeMut> for FormalExpression {}
impl Cast<dyn SignalEventDefinitionType> for FormalExpression {}
impl Cast<dyn SignalEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn StandardLoopCharacteristicsType> for FormalExpression {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for FormalExpression {}
impl Cast<dyn StartEventType> for FormalExpression {}
impl Cast<dyn StartEventTypeMut> for FormalExpression {}
impl Cast<dyn SubChoreographyType> for FormalExpression {}
impl Cast<dyn SubChoreographyTypeMut> for FormalExpression {}
impl Cast<dyn SubConversationType> for FormalExpression {}
impl Cast<dyn SubConversationTypeMut> for FormalExpression {}
impl Cast<dyn SubProcessType> for FormalExpression {}
impl Cast<dyn SubProcessTypeMut> for FormalExpression {}
impl Cast<dyn TaskType> for FormalExpression {}
impl Cast<dyn TaskTypeMut> for FormalExpression {}
impl Cast<dyn TerminateEventDefinitionType> for FormalExpression {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn TextAnnotationType> for FormalExpression {}
impl Cast<dyn TextAnnotationTypeMut> for FormalExpression {}
impl Cast<dyn TextType> for FormalExpression {}
impl Cast<dyn TextTypeMut> for FormalExpression {}
impl Cast<dyn ThrowEventType> for FormalExpression {}
impl Cast<dyn ThrowEventTypeMut> for FormalExpression {}
impl Cast<dyn TimerEventDefinitionType> for FormalExpression {}
impl Cast<dyn TimerEventDefinitionTypeMut> for FormalExpression {}
impl Cast<dyn TransactionType> for FormalExpression {}
impl Cast<dyn TransactionTypeMut> for FormalExpression {}
impl Cast<dyn UserTaskType> for FormalExpression {}
impl Cast<dyn UserTaskTypeMut> for FormalExpression {}
/// Wrapper for complexBehaviorDefinition::condition element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct ComplexBehaviorDefinitionCondition(pub FormalExpression);
impl<'a> XmlRead<'a> for ComplexBehaviorDefinitionCondition {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(ComplexBehaviorDefinitionCondition(
            FormalExpression::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("condition", "formalExpression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for ComplexBehaviorDefinitionCondition {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for correlationPropertyBinding::dataPath element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct CorrelationPropertyBindingDataPath(pub FormalExpression);
impl<'a> XmlRead<'a> for CorrelationPropertyBindingDataPath {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(CorrelationPropertyBindingDataPath(
            FormalExpression::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("dataPath", "formalExpression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for CorrelationPropertyBindingDataPath {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for correlationPropertyRetrievalExpression::messagePath element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct CorrelationPropertyRetrievalExpressionMessagePath(pub FormalExpression);
impl<'a> XmlRead<'a> for CorrelationPropertyRetrievalExpressionMessagePath {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(CorrelationPropertyRetrievalExpressionMessagePath(
            FormalExpression::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("messagePath", "formalExpression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for CorrelationPropertyRetrievalExpressionMessagePath {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Wrapper for dataAssociation::transformation element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct DataAssociationTransformation(pub FormalExpression);
impl<'a> XmlRead<'a> for DataAssociationTransformation {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(DataAssociationTransformation(
            FormalExpression::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("transformation", "formalExpression")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for DataAssociationTransformation {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:gateway")]
pub struct Gateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
}
impl DocumentElement for Gateway {
    fn element(&self) -> Element {
        Element::Gateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Gateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `gateway`
pub trait GatewayType: FlowNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `gatewayDirection`
    fn gateway_direction(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(GatewayType);
impl_downcast!(GatewayType);
/// Mutable access to `gateway`
pub trait GatewayTypeMut:
    FlowNodeTypeMut + Downcast + Debug + Send + DynClone + GatewayType
{
    /// Set value of attribute `gatewayDirection`
    fn set_gateway_direction(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(GatewayTypeMut);
impl_downcast!(GatewayTypeMut);
impl Cast<dyn DefinitionsType> for Gateway {}
impl Cast<dyn DefinitionsTypeMut> for Gateway {}
impl Cast<dyn ImportType> for Gateway {}
impl Cast<dyn ImportTypeMut> for Gateway {}
impl Cast<dyn ActivityType> for Gateway {}
impl Cast<dyn ActivityTypeMut> for Gateway {}
impl Cast<dyn AdHocSubProcessType> for Gateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for Gateway {}
impl Cast<dyn ArtifactType> for Gateway {}
impl Cast<dyn ArtifactTypeMut> for Gateway {}
impl Cast<dyn AssignmentType> for Gateway {}
impl Cast<dyn AssignmentTypeMut> for Gateway {}
impl Cast<dyn AssociationType> for Gateway {}
impl Cast<dyn AssociationTypeMut> for Gateway {}
impl Cast<dyn AuditingType> for Gateway {}
impl Cast<dyn AuditingTypeMut> for Gateway {}
impl Cast<dyn BaseElementType> for Gateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Gateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Gateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Gateway {}
impl Cast<dyn BoundaryEventType> for Gateway {}
impl Cast<dyn BoundaryEventTypeMut> for Gateway {}
impl Cast<dyn BusinessRuleTaskType> for Gateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Gateway {}
impl Cast<dyn CallableElementType> for Gateway {}
impl Cast<dyn CallableElementTypeMut> for Gateway {}
impl Cast<dyn CallActivityType> for Gateway {}
impl Cast<dyn CallActivityTypeMut> for Gateway {}
impl Cast<dyn CallChoreographyType> for Gateway {}
impl Cast<dyn CallChoreographyTypeMut> for Gateway {}
impl Cast<dyn CallConversationType> for Gateway {}
impl Cast<dyn CallConversationTypeMut> for Gateway {}
impl Cast<dyn CancelEventDefinitionType> for Gateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn CatchEventType> for Gateway {}
impl Cast<dyn CatchEventTypeMut> for Gateway {}
impl Cast<dyn CategoryType> for Gateway {}
impl Cast<dyn CategoryTypeMut> for Gateway {}
impl Cast<dyn CategoryValueType> for Gateway {}
impl Cast<dyn CategoryValueTypeMut> for Gateway {}
impl Cast<dyn ChoreographyType> for Gateway {}
impl Cast<dyn ChoreographyTypeMut> for Gateway {}
impl Cast<dyn ChoreographyActivityType> for Gateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for Gateway {}
impl Cast<dyn ChoreographyTaskType> for Gateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for Gateway {}
impl Cast<dyn CollaborationType> for Gateway {}
impl Cast<dyn CollaborationTypeMut> for Gateway {}
impl Cast<dyn CompensateEventDefinitionType> for Gateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Gateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Gateway {}
impl Cast<dyn ComplexGatewayType> for Gateway {}
impl Cast<dyn ComplexGatewayTypeMut> for Gateway {}
impl Cast<dyn ConditionalEventDefinitionType> for Gateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn ConversationType> for Gateway {}
impl Cast<dyn ConversationTypeMut> for Gateway {}
impl Cast<dyn ConversationAssociationType> for Gateway {}
impl Cast<dyn ConversationAssociationTypeMut> for Gateway {}
impl Cast<dyn ConversationLinkType> for Gateway {}
impl Cast<dyn ConversationLinkTypeMut> for Gateway {}
impl Cast<dyn ConversationNodeType> for Gateway {}
impl Cast<dyn ConversationNodeTypeMut> for Gateway {}
impl Cast<dyn CorrelationKeyType> for Gateway {}
impl Cast<dyn CorrelationKeyTypeMut> for Gateway {}
impl Cast<dyn CorrelationPropertyType> for Gateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for Gateway {}
impl Cast<dyn CorrelationPropertyBindingType> for Gateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Gateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Gateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Gateway {}
impl Cast<dyn CorrelationSubscriptionType> for Gateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Gateway {}
impl Cast<dyn DataAssociationType> for Gateway {}
impl Cast<dyn DataAssociationTypeMut> for Gateway {}
impl Cast<dyn DataInputType> for Gateway {}
impl Cast<dyn DataInputTypeMut> for Gateway {}
impl Cast<dyn DataInputAssociationType> for Gateway {}
impl Cast<dyn DataInputAssociationTypeMut> for Gateway {}
impl Cast<dyn DataObjectType> for Gateway {}
impl Cast<dyn DataObjectTypeMut> for Gateway {}
impl Cast<dyn DataObjectReferenceType> for Gateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for Gateway {}
impl Cast<dyn DataOutputType> for Gateway {}
impl Cast<dyn DataOutputTypeMut> for Gateway {}
impl Cast<dyn DataOutputAssociationType> for Gateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for Gateway {}
impl Cast<dyn DataStateType> for Gateway {}
impl Cast<dyn DataStateTypeMut> for Gateway {}
impl Cast<dyn DataStoreType> for Gateway {}
impl Cast<dyn DataStoreTypeMut> for Gateway {}
impl Cast<dyn DataStoreReferenceType> for Gateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for Gateway {}
impl Cast<dyn DocumentationType> for Gateway {}
impl Cast<dyn DocumentationTypeMut> for Gateway {}
impl Cast<dyn EndEventType> for Gateway {}
impl Cast<dyn EndEventTypeMut> for Gateway {}
impl Cast<dyn EndPointType> for Gateway {}
impl Cast<dyn EndPointTypeMut> for Gateway {}
impl Cast<dyn ErrorType> for Gateway {}
impl Cast<dyn ErrorTypeMut> for Gateway {}
impl Cast<dyn ErrorEventDefinitionType> for Gateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn EscalationType> for Gateway {}
impl Cast<dyn EscalationTypeMut> for Gateway {}
impl Cast<dyn EscalationEventDefinitionType> for Gateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn EventType> for Gateway {}
impl Cast<dyn EventTypeMut> for Gateway {}
impl Cast<dyn EventBasedGatewayType> for Gateway {}
impl Cast<dyn EventBasedGatewayTypeMut> for Gateway {}
impl Cast<dyn EventDefinitionType> for Gateway {}
impl Cast<dyn EventDefinitionTypeMut> for Gateway {}
impl Cast<dyn ExclusiveGatewayType> for Gateway {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Gateway {}
impl Cast<dyn ExpressionType> for Gateway {}
impl Cast<dyn ExpressionTypeMut> for Gateway {}
impl Cast<dyn ExtensionType> for Gateway {}
impl Cast<dyn ExtensionTypeMut> for Gateway {}
impl Cast<dyn ExtensionElementsType> for Gateway {}
impl Cast<dyn ExtensionElementsTypeMut> for Gateway {}
impl Cast<dyn FlowElementType> for Gateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for Gateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for Gateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for Gateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for Gateway {}
impl Cast<dyn FormalExpressionTypeMut> for Gateway {}
impl Cast<dyn GatewayType> for Gateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for Gateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for Gateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Gateway {}
impl Cast<dyn GlobalChoreographyTaskType> for Gateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Gateway {}
impl Cast<dyn GlobalConversationType> for Gateway {}
impl Cast<dyn GlobalConversationTypeMut> for Gateway {}
impl Cast<dyn GlobalManualTaskType> for Gateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for Gateway {}
impl Cast<dyn GlobalScriptTaskType> for Gateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Gateway {}
impl Cast<dyn GlobalTaskType> for Gateway {}
impl Cast<dyn GlobalTaskTypeMut> for Gateway {}
impl Cast<dyn GlobalUserTaskType> for Gateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for Gateway {}
impl Cast<dyn GroupType> for Gateway {}
impl Cast<dyn GroupTypeMut> for Gateway {}
impl Cast<dyn HumanPerformerType> for Gateway {}
impl Cast<dyn HumanPerformerTypeMut> for Gateway {}
impl Cast<dyn ImplicitThrowEventType> for Gateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Gateway {}
impl Cast<dyn InclusiveGatewayType> for Gateway {}
impl Cast<dyn InclusiveGatewayTypeMut> for Gateway {}
impl Cast<dyn InputSetType> for Gateway {}
impl Cast<dyn InputSetTypeMut> for Gateway {}
impl Cast<dyn InterfaceType> for Gateway {}
impl Cast<dyn InterfaceTypeMut> for Gateway {}
impl Cast<dyn IntermediateCatchEventType> for Gateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Gateway {}
impl Cast<dyn IntermediateThrowEventType> for Gateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Gateway {}
impl Cast<dyn InputOutputBindingType> for Gateway {}
impl Cast<dyn InputOutputBindingTypeMut> for Gateway {}
impl Cast<dyn InputOutputSpecificationType> for Gateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Gateway {}
impl Cast<dyn ItemDefinitionType> for Gateway {}
impl Cast<dyn ItemDefinitionTypeMut> for Gateway {}
impl Cast<dyn LaneType> for Gateway {}
impl Cast<dyn LaneTypeMut> for Gateway {}
impl Cast<dyn LaneSetType> for Gateway {}
impl Cast<dyn LaneSetTypeMut> for Gateway {}
impl Cast<dyn LinkEventDefinitionType> for Gateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn LoopCharacteristicsType> for Gateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Gateway {}
impl Cast<dyn ManualTaskType> for Gateway {}
impl Cast<dyn ManualTaskTypeMut> for Gateway {}
impl Cast<dyn MessageType> for Gateway {}
impl Cast<dyn MessageTypeMut> for Gateway {}
impl Cast<dyn MessageEventDefinitionType> for Gateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn MessageFlowType> for Gateway {}
impl Cast<dyn MessageFlowTypeMut> for Gateway {}
impl Cast<dyn MessageFlowAssociationType> for Gateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Gateway {}
impl Cast<dyn MonitoringType> for Gateway {}
impl Cast<dyn MonitoringTypeMut> for Gateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Gateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Gateway {}
impl Cast<dyn OperationType> for Gateway {}
impl Cast<dyn OperationTypeMut> for Gateway {}
impl Cast<dyn OutputSetType> for Gateway {}
impl Cast<dyn OutputSetTypeMut> for Gateway {}
impl Cast<dyn ParallelGatewayType> for Gateway {}
impl Cast<dyn ParallelGatewayTypeMut> for Gateway {}
impl Cast<dyn ParticipantType> for Gateway {}
impl Cast<dyn ParticipantTypeMut> for Gateway {}
impl Cast<dyn ParticipantAssociationType> for Gateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for Gateway {}
impl Cast<dyn ParticipantMultiplicityType> for Gateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Gateway {}
impl Cast<dyn PartnerEntityType> for Gateway {}
impl Cast<dyn PartnerEntityTypeMut> for Gateway {}
impl Cast<dyn PartnerRoleType> for Gateway {}
impl Cast<dyn PartnerRoleTypeMut> for Gateway {}
impl Cast<dyn PerformerType> for Gateway {}
impl Cast<dyn PerformerTypeMut> for Gateway {}
impl Cast<dyn PotentialOwnerType> for Gateway {}
impl Cast<dyn PotentialOwnerTypeMut> for Gateway {}
impl Cast<dyn ProcessType> for Gateway {}
impl Cast<dyn ProcessTypeMut> for Gateway {}
impl Cast<dyn PropertyType> for Gateway {}
impl Cast<dyn PropertyTypeMut> for Gateway {}
impl Cast<dyn ReceiveTaskType> for Gateway {}
impl Cast<dyn ReceiveTaskTypeMut> for Gateway {}
impl Cast<dyn RelationshipType> for Gateway {}
impl Cast<dyn RelationshipTypeMut> for Gateway {}
impl Cast<dyn RenderingType> for Gateway {}
impl Cast<dyn RenderingTypeMut> for Gateway {}
impl Cast<dyn ResourceType> for Gateway {}
impl Cast<dyn ResourceTypeMut> for Gateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for Gateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Gateway {}
impl Cast<dyn ResourceParameterType> for Gateway {}
impl Cast<dyn ResourceParameterTypeMut> for Gateway {}
impl Cast<dyn ResourceParameterBindingType> for Gateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Gateway {}
impl Cast<dyn ResourceRoleType> for Gateway {}
impl Cast<dyn ResourceRoleTypeMut> for Gateway {}
impl Cast<dyn RootElementType> for Gateway {}
impl Cast<dyn RootElementTypeMut> for Gateway {}
impl Cast<dyn ScriptTaskType> for Gateway {}
impl Cast<dyn ScriptTaskTypeMut> for Gateway {}
impl Cast<dyn ScriptType> for Gateway {}
impl Cast<dyn ScriptTypeMut> for Gateway {}
impl Cast<dyn SendTaskType> for Gateway {}
impl Cast<dyn SendTaskTypeMut> for Gateway {}
impl Cast<dyn SequenceFlowType> for Gateway {}
impl Cast<dyn SequenceFlowTypeMut> for Gateway {}
impl Cast<dyn ServiceTaskType> for Gateway {}
impl Cast<dyn ServiceTaskTypeMut> for Gateway {}
impl Cast<dyn SignalType> for Gateway {}
impl Cast<dyn SignalTypeMut> for Gateway {}
impl Cast<dyn SignalEventDefinitionType> for Gateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for Gateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Gateway {}
impl Cast<dyn StartEventType> for Gateway {}
impl Cast<dyn StartEventTypeMut> for Gateway {}
impl Cast<dyn SubChoreographyType> for Gateway {}
impl Cast<dyn SubChoreographyTypeMut> for Gateway {}
impl Cast<dyn SubConversationType> for Gateway {}
impl Cast<dyn SubConversationTypeMut> for Gateway {}
impl Cast<dyn SubProcessType> for Gateway {}
impl Cast<dyn SubProcessTypeMut> for Gateway {}
impl Cast<dyn TaskType> for Gateway {}
impl Cast<dyn TaskTypeMut> for Gateway {}
impl Cast<dyn TerminateEventDefinitionType> for Gateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn TextAnnotationType> for Gateway {}
impl Cast<dyn TextAnnotationTypeMut> for Gateway {}
impl Cast<dyn TextType> for Gateway {}
impl Cast<dyn TextTypeMut> for Gateway {}
impl Cast<dyn ThrowEventType> for Gateway {}
impl Cast<dyn ThrowEventTypeMut> for Gateway {}
impl Cast<dyn TimerEventDefinitionType> for Gateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Gateway {}
impl Cast<dyn TransactionType> for Gateway {}
impl Cast<dyn TransactionTypeMut> for Gateway {}
impl Cast<dyn UserTaskType> for Gateway {}
impl Cast<dyn UserTaskTypeMut> for Gateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalBusinessRuleTask")]
pub struct GlobalBusinessRuleTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("GlobalTaskType",rg*="resource_roles","GlobalTaskTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(attr = "implementation")]
    #[tia("GlobalBusinessRuleTaskType",rg*="implementation","GlobalBusinessRuleTaskTypeMut",s)]
    pub implementation: Option<String>,
}
impl DocumentElement for GlobalBusinessRuleTask {
    fn element(&self) -> Element {
        Element::GlobalBusinessRuleTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalBusinessRuleTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for GlobalBusinessRuleTask {}
impl RootElementTypeMut for GlobalBusinessRuleTask {}
//

/// Access to `globalBusinessRuleTask`
pub trait GlobalBusinessRuleTaskType: GlobalTaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(GlobalBusinessRuleTaskType);
impl_downcast!(GlobalBusinessRuleTaskType);
/// Mutable access to `globalBusinessRuleTask`
pub trait GlobalBusinessRuleTaskTypeMut:
    GlobalTaskTypeMut + Downcast + Debug + Send + DynClone + GlobalBusinessRuleTaskType
{
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(GlobalBusinessRuleTaskTypeMut);
impl_downcast!(GlobalBusinessRuleTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalBusinessRuleTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ImportType> for GlobalBusinessRuleTask {}
impl Cast<dyn ImportTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ActivityType> for GlobalBusinessRuleTask {}
impl Cast<dyn ActivityTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalBusinessRuleTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ArtifactType> for GlobalBusinessRuleTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn AssignmentType> for GlobalBusinessRuleTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn AssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn AssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn AuditingType> for GlobalBusinessRuleTask {}
impl Cast<dyn AuditingTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn BaseElementType> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalBusinessRuleTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn BoundaryEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CallableElementType> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for GlobalBusinessRuleTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CallChoreographyType> for GlobalBusinessRuleTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CallConversationType> for GlobalBusinessRuleTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CatchEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CategoryType> for GlobalBusinessRuleTask {}
impl Cast<dyn CategoryTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CategoryValueType> for GlobalBusinessRuleTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyType> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyActivityType> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CollaborationType> for GlobalBusinessRuleTask {}
impl Cast<dyn CollaborationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CompensateEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ComplexGatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationType> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationLinkType> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationNodeType> for GlobalBusinessRuleTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationKeyType> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalBusinessRuleTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataInputType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataInputTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataInputAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataObjectType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataOutputType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStateType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStateTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStoreType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalBusinessRuleTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn DocumentationType> for GlobalBusinessRuleTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EndEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn EndEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EndPointType> for GlobalBusinessRuleTask {}
impl Cast<dyn EndPointTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ErrorType> for GlobalBusinessRuleTask {}
impl Cast<dyn ErrorTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EscalationType> for GlobalBusinessRuleTask {}
impl Cast<dyn EscalationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EventType> for GlobalBusinessRuleTask {}
impl Cast<dyn EventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn EventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ExpressionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ExtensionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ExtensionElementsType> for GlobalBusinessRuleTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn FlowElementType> for GlobalBusinessRuleTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn FlowNodeType> for GlobalBusinessRuleTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn FormalExpressionType> for GlobalBusinessRuleTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn GatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalConversationType> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalScriptTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalTaskType> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskTypeMut> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn GroupType> for GlobalBusinessRuleTask {}
impl Cast<dyn GroupTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn HumanPerformerType> for GlobalBusinessRuleTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn InputSetType> for GlobalBusinessRuleTask {}
impl Cast<dyn InputSetTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn InterfaceType> for GlobalBusinessRuleTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn InputOutputBindingType> for GlobalBusinessRuleTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalBusinessRuleTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ItemDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn LaneType> for GlobalBusinessRuleTask {}
impl Cast<dyn LaneTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn LaneSetType> for GlobalBusinessRuleTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalBusinessRuleTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ManualTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageType> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageFlowType> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MonitoringType> for GlobalBusinessRuleTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalBusinessRuleTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn OperationType> for GlobalBusinessRuleTask {}
impl Cast<dyn OperationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn OutputSetType> for GlobalBusinessRuleTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ParallelGatewayType> for GlobalBusinessRuleTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantType> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalBusinessRuleTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn PartnerEntityType> for GlobalBusinessRuleTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn PartnerRoleType> for GlobalBusinessRuleTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn PerformerType> for GlobalBusinessRuleTask {}
impl Cast<dyn PerformerTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn PotentialOwnerType> for GlobalBusinessRuleTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ProcessType> for GlobalBusinessRuleTask {}
impl Cast<dyn ProcessTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn PropertyType> for GlobalBusinessRuleTask {}
impl Cast<dyn PropertyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ReceiveTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn RelationshipType> for GlobalBusinessRuleTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn RenderingType> for GlobalBusinessRuleTask {}
impl Cast<dyn RenderingTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceType> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceParameterType> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceRoleType> for GlobalBusinessRuleTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn RootElementType> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalBusinessRuleTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ScriptType> for GlobalBusinessRuleTask {}
impl Cast<dyn ScriptTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SendTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SequenceFlowType> for GlobalBusinessRuleTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ServiceTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SignalType> for GlobalBusinessRuleTask {}
impl Cast<dyn SignalTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalBusinessRuleTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn StartEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn StartEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SubChoreographyType> for GlobalBusinessRuleTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SubConversationType> for GlobalBusinessRuleTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn SubProcessType> for GlobalBusinessRuleTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn TaskTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TextAnnotationType> for GlobalBusinessRuleTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TextType> for GlobalBusinessRuleTask {}
impl Cast<dyn TextTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn ThrowEventType> for GlobalBusinessRuleTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalBusinessRuleTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn TransactionType> for GlobalBusinessRuleTask {}
impl Cast<dyn TransactionTypeMut> for GlobalBusinessRuleTask {}
impl Cast<dyn UserTaskType> for GlobalBusinessRuleTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalBusinessRuleTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalChoreographyTask")]
pub struct GlobalChoreographyTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CollaborationType",rg*="name","CollaborationTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "isClosed")]
    #[tia("CollaborationType",rg*="is_closed","CollaborationTypeMut",s)]
    pub is_closed: Option<bool>,
    #[xml(child = "bpmn:participant")]
    #[tia("CollaborationType",rg*="participants","CollaborationTypeMut",s,rmg*="participants_mut")]
    pub participants: Vec<Participant>,
    #[xml(child = "bpmn:messageFlow")]
    #[tia("CollaborationType",rg*="message_flows","CollaborationTypeMut",s,rmg*="message_flows_mut")]
    pub message_flows: Vec<MessageFlow>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("CollaborationType",rg*="artifacts","CollaborationTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(
        child = "bpmn:callConversation",
        child = "bpmn:conversation",
        child = "bpmn:subConversation"
    )]
    #[tia("CollaborationType",rg*="conversation_nodes","CollaborationTypeMut",s,rmg*="conversation_nodes_mut")]
    pub conversation_nodes: Vec<ConversationNode>,
    #[xml(child = "bpmn:conversationAssociation")]
    #[tia("CollaborationType",rg*="conversation_associations","CollaborationTypeMut",s,rmg*="conversation_associations_mut")]
    pub conversation_associations: Vec<ConversationAssociation>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CollaborationType",rg*="participant_associations","CollaborationTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
    #[xml(child = "bpmn:messageFlowAssociation")]
    #[tia("CollaborationType",rg*="message_flow_associations","CollaborationTypeMut",s,rmg*="message_flow_associations_mut")]
    pub message_flow_associations: Vec<MessageFlowAssociation>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("CollaborationType",rg*="correlation_keys","CollaborationTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(flatten_text = "bpmn:choreographyRef")]
    #[tia("CollaborationType",rg*="choreography_refs","CollaborationTypeMut",s,rmg*="choreography_refs_mut")]
    pub choreography_refs: Vec<String>,
    #[xml(child = "bpmn:conversationLink")]
    #[tia("CollaborationType",rg*="conversation_links","CollaborationTypeMut",s,rmg*="conversation_links_mut")]
    pub conversation_links: Vec<ConversationLink>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("ChoreographyType",rg*="flow_elements","ChoreographyTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(attr = "initiatingParticipantRef")]
    #[tia("GlobalChoreographyTaskType",rg*="initiating_participant_ref","GlobalChoreographyTaskTypeMut",s)]
    pub initiating_participant_ref: Option<String>,
}
impl DocumentElement for GlobalChoreographyTask {
    fn element(&self) -> Element {
        Element::GlobalChoreographyTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalChoreographyTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for GlobalChoreographyTask {}
impl RootElementTypeMut for GlobalChoreographyTask {}
//

/// Access to `globalChoreographyTask`
pub trait GlobalChoreographyTaskType:
    ChoreographyType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `initiatingParticipantRef`
    fn initiating_participant_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(GlobalChoreographyTaskType);
impl_downcast!(GlobalChoreographyTaskType);
/// Mutable access to `globalChoreographyTask`
pub trait GlobalChoreographyTaskTypeMut:
    ChoreographyTypeMut + Downcast + Debug + Send + DynClone + GlobalChoreographyTaskType
{
    /// Set value of attribute `initiatingParticipantRef`
    fn set_initiating_participant_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(GlobalChoreographyTaskTypeMut);
impl_downcast!(GlobalChoreographyTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalChoreographyTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ImportType> for GlobalChoreographyTask {}
impl Cast<dyn ImportTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ActivityType> for GlobalChoreographyTask {}
impl Cast<dyn ActivityTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalChoreographyTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ArtifactType> for GlobalChoreographyTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn AssignmentType> for GlobalChoreographyTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn AssociationType> for GlobalChoreographyTask {}
impl Cast<dyn AssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn AuditingType> for GlobalChoreographyTask {}
impl Cast<dyn AuditingTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn BaseElementType> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalChoreographyTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn BoundaryEventType> for GlobalChoreographyTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalChoreographyTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CallableElementType> for GlobalChoreographyTask {}
impl Cast<dyn CallableElementTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CallActivityType> for GlobalChoreographyTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CallChoreographyType> for GlobalChoreographyTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CallConversationType> for GlobalChoreographyTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CatchEventType> for GlobalChoreographyTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CategoryType> for GlobalChoreographyTask {}
impl Cast<dyn CategoryTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CategoryValueType> for GlobalChoreographyTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ChoreographyType> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTypeMut> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyActivityType> for GlobalChoreographyTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalChoreographyTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CollaborationType> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CollaborationTypeMut> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CompensateEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ComplexGatewayType> for GlobalChoreographyTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ConversationType> for GlobalChoreographyTask {}
impl Cast<dyn ConversationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ConversationAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ConversationLinkType> for GlobalChoreographyTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ConversationNodeType> for GlobalChoreographyTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationKeyType> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalChoreographyTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataInputType> for GlobalChoreographyTask {}
impl Cast<dyn DataInputTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataInputAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataObjectType> for GlobalChoreographyTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalChoreographyTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataOutputType> for GlobalChoreographyTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataStateType> for GlobalChoreographyTask {}
impl Cast<dyn DataStateTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataStoreType> for GlobalChoreographyTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalChoreographyTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn DocumentationType> for GlobalChoreographyTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EndEventType> for GlobalChoreographyTask {}
impl Cast<dyn EndEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EndPointType> for GlobalChoreographyTask {}
impl Cast<dyn EndPointTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ErrorType> for GlobalChoreographyTask {}
impl Cast<dyn ErrorTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EscalationType> for GlobalChoreographyTask {}
impl Cast<dyn EscalationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EventType> for GlobalChoreographyTask {}
impl Cast<dyn EventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalChoreographyTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn EventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalChoreographyTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ExpressionType> for GlobalChoreographyTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ExtensionType> for GlobalChoreographyTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ExtensionElementsType> for GlobalChoreographyTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn FlowElementType> for GlobalChoreographyTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn FlowNodeType> for GlobalChoreographyTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn FormalExpressionType> for GlobalChoreographyTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GatewayType> for GlobalChoreographyTask {}
impl Cast<dyn GatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalConversationType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalScriptTaskType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalTaskType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GlobalUserTaskType> for GlobalChoreographyTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn GroupType> for GlobalChoreographyTask {}
impl Cast<dyn GroupTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn HumanPerformerType> for GlobalChoreographyTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalChoreographyTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalChoreographyTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn InputSetType> for GlobalChoreographyTask {}
impl Cast<dyn InputSetTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn InterfaceType> for GlobalChoreographyTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalChoreographyTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalChoreographyTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn InputOutputBindingType> for GlobalChoreographyTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalChoreographyTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ItemDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn LaneType> for GlobalChoreographyTask {}
impl Cast<dyn LaneTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn LaneSetType> for GlobalChoreographyTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalChoreographyTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ManualTaskType> for GlobalChoreographyTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MessageType> for GlobalChoreographyTask {}
impl Cast<dyn MessageTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MessageFlowType> for GlobalChoreographyTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MonitoringType> for GlobalChoreographyTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalChoreographyTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn OperationType> for GlobalChoreographyTask {}
impl Cast<dyn OperationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn OutputSetType> for GlobalChoreographyTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ParallelGatewayType> for GlobalChoreographyTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantType> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalChoreographyTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn PartnerEntityType> for GlobalChoreographyTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn PartnerRoleType> for GlobalChoreographyTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn PerformerType> for GlobalChoreographyTask {}
impl Cast<dyn PerformerTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn PotentialOwnerType> for GlobalChoreographyTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ProcessType> for GlobalChoreographyTask {}
impl Cast<dyn ProcessTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn PropertyType> for GlobalChoreographyTask {}
impl Cast<dyn PropertyTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ReceiveTaskType> for GlobalChoreographyTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn RelationshipType> for GlobalChoreographyTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn RenderingType> for GlobalChoreographyTask {}
impl Cast<dyn RenderingTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ResourceType> for GlobalChoreographyTask {}
impl Cast<dyn ResourceTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalChoreographyTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ResourceParameterType> for GlobalChoreographyTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalChoreographyTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ResourceRoleType> for GlobalChoreographyTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn RootElementType> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalChoreographyTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalChoreographyTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ScriptType> for GlobalChoreographyTask {}
impl Cast<dyn ScriptTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SendTaskType> for GlobalChoreographyTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SequenceFlowType> for GlobalChoreographyTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ServiceTaskType> for GlobalChoreographyTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SignalType> for GlobalChoreographyTask {}
impl Cast<dyn SignalTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalChoreographyTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn StartEventType> for GlobalChoreographyTask {}
impl Cast<dyn StartEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SubChoreographyType> for GlobalChoreographyTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SubConversationType> for GlobalChoreographyTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn SubProcessType> for GlobalChoreographyTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TaskType> for GlobalChoreographyTask {}
impl Cast<dyn TaskTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TextAnnotationType> for GlobalChoreographyTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TextType> for GlobalChoreographyTask {}
impl Cast<dyn TextTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn ThrowEventType> for GlobalChoreographyTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalChoreographyTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn TransactionType> for GlobalChoreographyTask {}
impl Cast<dyn TransactionTypeMut> for GlobalChoreographyTask {}
impl Cast<dyn UserTaskType> for GlobalChoreographyTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalChoreographyTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalConversation")]
pub struct GlobalConversation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CollaborationType",rg*="name","CollaborationTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "isClosed")]
    #[tia("CollaborationType",rg*="is_closed","CollaborationTypeMut",s)]
    pub is_closed: Option<bool>,
    #[xml(child = "bpmn:participant")]
    #[tia("CollaborationType",rg*="participants","CollaborationTypeMut",s,rmg*="participants_mut")]
    pub participants: Vec<Participant>,
    #[xml(child = "bpmn:messageFlow")]
    #[tia("CollaborationType",rg*="message_flows","CollaborationTypeMut",s,rmg*="message_flows_mut")]
    pub message_flows: Vec<MessageFlow>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("CollaborationType",rg*="artifacts","CollaborationTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(
        child = "bpmn:callConversation",
        child = "bpmn:conversation",
        child = "bpmn:subConversation"
    )]
    #[tia("CollaborationType",rg*="conversation_nodes","CollaborationTypeMut",s,rmg*="conversation_nodes_mut")]
    pub conversation_nodes: Vec<ConversationNode>,
    #[xml(child = "bpmn:conversationAssociation")]
    #[tia("CollaborationType",rg*="conversation_associations","CollaborationTypeMut",s,rmg*="conversation_associations_mut")]
    pub conversation_associations: Vec<ConversationAssociation>,
    #[xml(child = "bpmn:participantAssociation")]
    #[tia("CollaborationType",rg*="participant_associations","CollaborationTypeMut",s,rmg*="participant_associations_mut")]
    pub participant_associations: Vec<ParticipantAssociation>,
    #[xml(child = "bpmn:messageFlowAssociation")]
    #[tia("CollaborationType",rg*="message_flow_associations","CollaborationTypeMut",s,rmg*="message_flow_associations_mut")]
    pub message_flow_associations: Vec<MessageFlowAssociation>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("CollaborationType",rg*="correlation_keys","CollaborationTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(flatten_text = "bpmn:choreographyRef")]
    #[tia("CollaborationType",rg*="choreography_refs","CollaborationTypeMut",s,rmg*="choreography_refs_mut")]
    pub choreography_refs: Vec<String>,
    #[xml(child = "bpmn:conversationLink")]
    #[tia("CollaborationType",rg*="conversation_links","CollaborationTypeMut",s,rmg*="conversation_links_mut")]
    pub conversation_links: Vec<ConversationLink>,
}
impl DocumentElement for GlobalConversation {
    fn element(&self) -> Element {
        Element::GlobalConversation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalConversation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl GlobalConversationType for GlobalConversation {}
impl GlobalConversationTypeMut for GlobalConversation {}
impl RootElementType for GlobalConversation {}
impl RootElementTypeMut for GlobalConversation {}
//

/// Access to `globalConversation`
pub trait GlobalConversationType: CollaborationType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(GlobalConversationType);
impl_downcast!(GlobalConversationType);
/// Mutable access to `globalConversation`
pub trait GlobalConversationTypeMut:
    CollaborationTypeMut + Downcast + Debug + Send + DynClone + GlobalConversationType
{
}
dyn_clone::clone_trait_object!(GlobalConversationTypeMut);
impl_downcast!(GlobalConversationTypeMut);
impl Cast<dyn DefinitionsType> for GlobalConversation {}
impl Cast<dyn DefinitionsTypeMut> for GlobalConversation {}
impl Cast<dyn ImportType> for GlobalConversation {}
impl Cast<dyn ImportTypeMut> for GlobalConversation {}
impl Cast<dyn ActivityType> for GlobalConversation {}
impl Cast<dyn ActivityTypeMut> for GlobalConversation {}
impl Cast<dyn AdHocSubProcessType> for GlobalConversation {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalConversation {}
impl Cast<dyn ArtifactType> for GlobalConversation {}
impl Cast<dyn ArtifactTypeMut> for GlobalConversation {}
impl Cast<dyn AssignmentType> for GlobalConversation {}
impl Cast<dyn AssignmentTypeMut> for GlobalConversation {}
impl Cast<dyn AssociationType> for GlobalConversation {}
impl Cast<dyn AssociationTypeMut> for GlobalConversation {}
impl Cast<dyn AuditingType> for GlobalConversation {}
impl Cast<dyn AuditingTypeMut> for GlobalConversation {}
impl Cast<dyn BaseElementType> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalConversation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalConversation {}
impl Cast<dyn BoundaryEventType> for GlobalConversation {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalConversation {}
impl Cast<dyn BusinessRuleTaskType> for GlobalConversation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalConversation {}
impl Cast<dyn CallableElementType> for GlobalConversation {}
impl Cast<dyn CallableElementTypeMut> for GlobalConversation {}
impl Cast<dyn CallActivityType> for GlobalConversation {}
impl Cast<dyn CallActivityTypeMut> for GlobalConversation {}
impl Cast<dyn CallChoreographyType> for GlobalConversation {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalConversation {}
impl Cast<dyn CallConversationType> for GlobalConversation {}
impl Cast<dyn CallConversationTypeMut> for GlobalConversation {}
impl Cast<dyn CancelEventDefinitionType> for GlobalConversation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn CatchEventType> for GlobalConversation {}
impl Cast<dyn CatchEventTypeMut> for GlobalConversation {}
impl Cast<dyn CategoryType> for GlobalConversation {}
impl Cast<dyn CategoryTypeMut> for GlobalConversation {}
impl Cast<dyn CategoryValueType> for GlobalConversation {}
impl Cast<dyn CategoryValueTypeMut> for GlobalConversation {}
impl Cast<dyn ChoreographyType> for GlobalConversation {}
impl Cast<dyn ChoreographyTypeMut> for GlobalConversation {}
impl Cast<dyn ChoreographyActivityType> for GlobalConversation {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalConversation {}
impl Cast<dyn ChoreographyTaskType> for GlobalConversation {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalConversation {}
impl Cast<dyn CollaborationType> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CollaborationTypeMut> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CompensateEventDefinitionType> for GlobalConversation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalConversation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn ComplexGatewayType> for GlobalConversation {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalConversation {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalConversation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn ConversationType> for GlobalConversation {}
impl Cast<dyn ConversationTypeMut> for GlobalConversation {}
impl Cast<dyn ConversationAssociationType> for GlobalConversation {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn ConversationLinkType> for GlobalConversation {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalConversation {}
impl Cast<dyn ConversationNodeType> for GlobalConversation {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalConversation {}
impl Cast<dyn CorrelationKeyType> for GlobalConversation {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyType> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalConversation {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalConversation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalConversation {}
impl Cast<dyn DataAssociationType> for GlobalConversation {}
impl Cast<dyn DataAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn DataInputType> for GlobalConversation {}
impl Cast<dyn DataInputTypeMut> for GlobalConversation {}
impl Cast<dyn DataInputAssociationType> for GlobalConversation {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn DataObjectType> for GlobalConversation {}
impl Cast<dyn DataObjectTypeMut> for GlobalConversation {}
impl Cast<dyn DataObjectReferenceType> for GlobalConversation {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalConversation {}
impl Cast<dyn DataOutputType> for GlobalConversation {}
impl Cast<dyn DataOutputTypeMut> for GlobalConversation {}
impl Cast<dyn DataOutputAssociationType> for GlobalConversation {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn DataStateType> for GlobalConversation {}
impl Cast<dyn DataStateTypeMut> for GlobalConversation {}
impl Cast<dyn DataStoreType> for GlobalConversation {}
impl Cast<dyn DataStoreTypeMut> for GlobalConversation {}
impl Cast<dyn DataStoreReferenceType> for GlobalConversation {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalConversation {}
impl Cast<dyn DocumentationType> for GlobalConversation {}
impl Cast<dyn DocumentationTypeMut> for GlobalConversation {}
impl Cast<dyn EndEventType> for GlobalConversation {}
impl Cast<dyn EndEventTypeMut> for GlobalConversation {}
impl Cast<dyn EndPointType> for GlobalConversation {}
impl Cast<dyn EndPointTypeMut> for GlobalConversation {}
impl Cast<dyn ErrorType> for GlobalConversation {}
impl Cast<dyn ErrorTypeMut> for GlobalConversation {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalConversation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn EscalationType> for GlobalConversation {}
impl Cast<dyn EscalationTypeMut> for GlobalConversation {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalConversation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn EventType> for GlobalConversation {}
impl Cast<dyn EventTypeMut> for GlobalConversation {}
impl Cast<dyn EventBasedGatewayType> for GlobalConversation {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalConversation {}
impl Cast<dyn EventDefinitionType> for GlobalConversation {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn ExclusiveGatewayType> for GlobalConversation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalConversation {}
impl Cast<dyn ExpressionType> for GlobalConversation {}
impl Cast<dyn ExpressionTypeMut> for GlobalConversation {}
impl Cast<dyn ExtensionType> for GlobalConversation {}
impl Cast<dyn ExtensionTypeMut> for GlobalConversation {}
impl Cast<dyn ExtensionElementsType> for GlobalConversation {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalConversation {}
impl Cast<dyn FlowElementType> for GlobalConversation {}
impl Cast<dyn FlowElementTypeMut> for GlobalConversation {}
impl Cast<dyn FlowNodeType> for GlobalConversation {}
impl Cast<dyn FlowNodeTypeMut> for GlobalConversation {}
impl Cast<dyn FormalExpressionType> for GlobalConversation {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalConversation {}
impl Cast<dyn GatewayType> for GlobalConversation {}
impl Cast<dyn GatewayTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalConversation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalConversation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalConversationType> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalConversationTypeMut> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalManualTaskType> for GlobalConversation {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalScriptTaskType> for GlobalConversation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalTaskType> for GlobalConversation {}
impl Cast<dyn GlobalTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GlobalUserTaskType> for GlobalConversation {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalConversation {}
impl Cast<dyn GroupType> for GlobalConversation {}
impl Cast<dyn GroupTypeMut> for GlobalConversation {}
impl Cast<dyn HumanPerformerType> for GlobalConversation {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalConversation {}
impl Cast<dyn ImplicitThrowEventType> for GlobalConversation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalConversation {}
impl Cast<dyn InclusiveGatewayType> for GlobalConversation {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalConversation {}
impl Cast<dyn InputSetType> for GlobalConversation {}
impl Cast<dyn InputSetTypeMut> for GlobalConversation {}
impl Cast<dyn InterfaceType> for GlobalConversation {}
impl Cast<dyn InterfaceTypeMut> for GlobalConversation {}
impl Cast<dyn IntermediateCatchEventType> for GlobalConversation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalConversation {}
impl Cast<dyn IntermediateThrowEventType> for GlobalConversation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalConversation {}
impl Cast<dyn InputOutputBindingType> for GlobalConversation {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalConversation {}
impl Cast<dyn InputOutputSpecificationType> for GlobalConversation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalConversation {}
impl Cast<dyn ItemDefinitionType> for GlobalConversation {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn LaneType> for GlobalConversation {}
impl Cast<dyn LaneTypeMut> for GlobalConversation {}
impl Cast<dyn LaneSetType> for GlobalConversation {}
impl Cast<dyn LaneSetTypeMut> for GlobalConversation {}
impl Cast<dyn LinkEventDefinitionType> for GlobalConversation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn LoopCharacteristicsType> for GlobalConversation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalConversation {}
impl Cast<dyn ManualTaskType> for GlobalConversation {}
impl Cast<dyn ManualTaskTypeMut> for GlobalConversation {}
impl Cast<dyn MessageType> for GlobalConversation {}
impl Cast<dyn MessageTypeMut> for GlobalConversation {}
impl Cast<dyn MessageEventDefinitionType> for GlobalConversation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn MessageFlowType> for GlobalConversation {}
impl Cast<dyn MessageFlowTypeMut> for GlobalConversation {}
impl Cast<dyn MessageFlowAssociationType> for GlobalConversation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn MonitoringType> for GlobalConversation {}
impl Cast<dyn MonitoringTypeMut> for GlobalConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalConversation {}
impl Cast<dyn OperationType> for GlobalConversation {}
impl Cast<dyn OperationTypeMut> for GlobalConversation {}
impl Cast<dyn OutputSetType> for GlobalConversation {}
impl Cast<dyn OutputSetTypeMut> for GlobalConversation {}
impl Cast<dyn ParallelGatewayType> for GlobalConversation {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalConversation {}
impl Cast<dyn ParticipantType> for GlobalConversation {}
impl Cast<dyn ParticipantTypeMut> for GlobalConversation {}
impl Cast<dyn ParticipantAssociationType> for GlobalConversation {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalConversation {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalConversation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalConversation {}
impl Cast<dyn PartnerEntityType> for GlobalConversation {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalConversation {}
impl Cast<dyn PartnerRoleType> for GlobalConversation {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalConversation {}
impl Cast<dyn PerformerType> for GlobalConversation {}
impl Cast<dyn PerformerTypeMut> for GlobalConversation {}
impl Cast<dyn PotentialOwnerType> for GlobalConversation {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalConversation {}
impl Cast<dyn ProcessType> for GlobalConversation {}
impl Cast<dyn ProcessTypeMut> for GlobalConversation {}
impl Cast<dyn PropertyType> for GlobalConversation {}
impl Cast<dyn PropertyTypeMut> for GlobalConversation {}
impl Cast<dyn ReceiveTaskType> for GlobalConversation {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalConversation {}
impl Cast<dyn RelationshipType> for GlobalConversation {}
impl Cast<dyn RelationshipTypeMut> for GlobalConversation {}
impl Cast<dyn RenderingType> for GlobalConversation {}
impl Cast<dyn RenderingTypeMut> for GlobalConversation {}
impl Cast<dyn ResourceType> for GlobalConversation {}
impl Cast<dyn ResourceTypeMut> for GlobalConversation {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalConversation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalConversation {}
impl Cast<dyn ResourceParameterType> for GlobalConversation {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalConversation {}
impl Cast<dyn ResourceParameterBindingType> for GlobalConversation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalConversation {}
impl Cast<dyn ResourceRoleType> for GlobalConversation {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalConversation {}
impl Cast<dyn RootElementType> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalConversation {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalConversation {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalConversation {}
impl Cast<dyn ScriptType> for GlobalConversation {}
impl Cast<dyn ScriptTypeMut> for GlobalConversation {}
impl Cast<dyn SendTaskType> for GlobalConversation {}
impl Cast<dyn SendTaskTypeMut> for GlobalConversation {}
impl Cast<dyn SequenceFlowType> for GlobalConversation {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalConversation {}
impl Cast<dyn ServiceTaskType> for GlobalConversation {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalConversation {}
impl Cast<dyn SignalType> for GlobalConversation {}
impl Cast<dyn SignalTypeMut> for GlobalConversation {}
impl Cast<dyn SignalEventDefinitionType> for GlobalConversation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalConversation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalConversation {}
impl Cast<dyn StartEventType> for GlobalConversation {}
impl Cast<dyn StartEventTypeMut> for GlobalConversation {}
impl Cast<dyn SubChoreographyType> for GlobalConversation {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalConversation {}
impl Cast<dyn SubConversationType> for GlobalConversation {}
impl Cast<dyn SubConversationTypeMut> for GlobalConversation {}
impl Cast<dyn SubProcessType> for GlobalConversation {}
impl Cast<dyn SubProcessTypeMut> for GlobalConversation {}
impl Cast<dyn TaskType> for GlobalConversation {}
impl Cast<dyn TaskTypeMut> for GlobalConversation {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalConversation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn TextAnnotationType> for GlobalConversation {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalConversation {}
impl Cast<dyn TextType> for GlobalConversation {}
impl Cast<dyn TextTypeMut> for GlobalConversation {}
impl Cast<dyn ThrowEventType> for GlobalConversation {}
impl Cast<dyn ThrowEventTypeMut> for GlobalConversation {}
impl Cast<dyn TimerEventDefinitionType> for GlobalConversation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalConversation {}
impl Cast<dyn TransactionType> for GlobalConversation {}
impl Cast<dyn TransactionTypeMut> for GlobalConversation {}
impl Cast<dyn UserTaskType> for GlobalConversation {}
impl Cast<dyn UserTaskTypeMut> for GlobalConversation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalManualTask")]
pub struct GlobalManualTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("GlobalTaskType",rg*="resource_roles","GlobalTaskTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
}
impl DocumentElement for GlobalManualTask {
    fn element(&self) -> Element {
        Element::GlobalManualTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalManualTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl GlobalManualTaskType for GlobalManualTask {}
impl GlobalManualTaskTypeMut for GlobalManualTask {}
impl RootElementType for GlobalManualTask {}
impl RootElementTypeMut for GlobalManualTask {}
//

/// Access to `globalManualTask`
pub trait GlobalManualTaskType: GlobalTaskType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(GlobalManualTaskType);
impl_downcast!(GlobalManualTaskType);
/// Mutable access to `globalManualTask`
pub trait GlobalManualTaskTypeMut:
    GlobalTaskTypeMut + Downcast + Debug + Send + DynClone + GlobalManualTaskType
{
}
dyn_clone::clone_trait_object!(GlobalManualTaskTypeMut);
impl_downcast!(GlobalManualTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalManualTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalManualTask {}
impl Cast<dyn ImportType> for GlobalManualTask {}
impl Cast<dyn ImportTypeMut> for GlobalManualTask {}
impl Cast<dyn ActivityType> for GlobalManualTask {}
impl Cast<dyn ActivityTypeMut> for GlobalManualTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalManualTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalManualTask {}
impl Cast<dyn ArtifactType> for GlobalManualTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalManualTask {}
impl Cast<dyn AssignmentType> for GlobalManualTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalManualTask {}
impl Cast<dyn AssociationType> for GlobalManualTask {}
impl Cast<dyn AssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn AuditingType> for GlobalManualTask {}
impl Cast<dyn AuditingTypeMut> for GlobalManualTask {}
impl Cast<dyn BaseElementType> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalManualTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalManualTask {}
impl Cast<dyn BoundaryEventType> for GlobalManualTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalManualTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalManualTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn CallableElementType> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for GlobalManualTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalManualTask {}
impl Cast<dyn CallChoreographyType> for GlobalManualTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalManualTask {}
impl Cast<dyn CallConversationType> for GlobalManualTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalManualTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn CatchEventType> for GlobalManualTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalManualTask {}
impl Cast<dyn CategoryType> for GlobalManualTask {}
impl Cast<dyn CategoryTypeMut> for GlobalManualTask {}
impl Cast<dyn CategoryValueType> for GlobalManualTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalManualTask {}
impl Cast<dyn ChoreographyType> for GlobalManualTask {}
impl Cast<dyn ChoreographyTypeMut> for GlobalManualTask {}
impl Cast<dyn ChoreographyActivityType> for GlobalManualTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalManualTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalManualTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn CollaborationType> for GlobalManualTask {}
impl Cast<dyn CollaborationTypeMut> for GlobalManualTask {}
impl Cast<dyn CompensateEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalManualTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn ComplexGatewayType> for GlobalManualTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn ConversationType> for GlobalManualTask {}
impl Cast<dyn ConversationTypeMut> for GlobalManualTask {}
impl Cast<dyn ConversationAssociationType> for GlobalManualTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn ConversationLinkType> for GlobalManualTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalManualTask {}
impl Cast<dyn ConversationNodeType> for GlobalManualTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalManualTask {}
impl Cast<dyn CorrelationKeyType> for GlobalManualTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalManualTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalManualTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalManualTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalManualTask {}
impl Cast<dyn DataAssociationType> for GlobalManualTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn DataInputType> for GlobalManualTask {}
impl Cast<dyn DataInputTypeMut> for GlobalManualTask {}
impl Cast<dyn DataInputAssociationType> for GlobalManualTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn DataObjectType> for GlobalManualTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalManualTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalManualTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalManualTask {}
impl Cast<dyn DataOutputType> for GlobalManualTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalManualTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalManualTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn DataStateType> for GlobalManualTask {}
impl Cast<dyn DataStateTypeMut> for GlobalManualTask {}
impl Cast<dyn DataStoreType> for GlobalManualTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalManualTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalManualTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalManualTask {}
impl Cast<dyn DocumentationType> for GlobalManualTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalManualTask {}
impl Cast<dyn EndEventType> for GlobalManualTask {}
impl Cast<dyn EndEventTypeMut> for GlobalManualTask {}
impl Cast<dyn EndPointType> for GlobalManualTask {}
impl Cast<dyn EndPointTypeMut> for GlobalManualTask {}
impl Cast<dyn ErrorType> for GlobalManualTask {}
impl Cast<dyn ErrorTypeMut> for GlobalManualTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn EscalationType> for GlobalManualTask {}
impl Cast<dyn EscalationTypeMut> for GlobalManualTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn EventType> for GlobalManualTask {}
impl Cast<dyn EventTypeMut> for GlobalManualTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalManualTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn EventDefinitionType> for GlobalManualTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalManualTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn ExpressionType> for GlobalManualTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalManualTask {}
impl Cast<dyn ExtensionType> for GlobalManualTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalManualTask {}
impl Cast<dyn ExtensionElementsType> for GlobalManualTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalManualTask {}
impl Cast<dyn FlowElementType> for GlobalManualTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalManualTask {}
impl Cast<dyn FlowNodeType> for GlobalManualTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalManualTask {}
impl Cast<dyn FormalExpressionType> for GlobalManualTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalManualTask {}
impl Cast<dyn GatewayType> for GlobalManualTask {}
impl Cast<dyn GatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalManualTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalManualTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn GlobalConversationType> for GlobalManualTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalManualTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalScriptTaskType> for GlobalManualTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn GlobalTaskType> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskTypeMut> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskType> for GlobalManualTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn GroupType> for GlobalManualTask {}
impl Cast<dyn GroupTypeMut> for GlobalManualTask {}
impl Cast<dyn HumanPerformerType> for GlobalManualTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalManualTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalManualTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalManualTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalManualTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn InputSetType> for GlobalManualTask {}
impl Cast<dyn InputSetTypeMut> for GlobalManualTask {}
impl Cast<dyn InterfaceType> for GlobalManualTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalManualTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalManualTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalManualTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalManualTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalManualTask {}
impl Cast<dyn InputOutputBindingType> for GlobalManualTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalManualTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalManualTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalManualTask {}
impl Cast<dyn ItemDefinitionType> for GlobalManualTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn LaneType> for GlobalManualTask {}
impl Cast<dyn LaneTypeMut> for GlobalManualTask {}
impl Cast<dyn LaneSetType> for GlobalManualTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalManualTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalManualTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalManualTask {}
impl Cast<dyn ManualTaskType> for GlobalManualTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn MessageType> for GlobalManualTask {}
impl Cast<dyn MessageTypeMut> for GlobalManualTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn MessageFlowType> for GlobalManualTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalManualTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalManualTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn MonitoringType> for GlobalManualTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalManualTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalManualTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalManualTask {}
impl Cast<dyn OperationType> for GlobalManualTask {}
impl Cast<dyn OperationTypeMut> for GlobalManualTask {}
impl Cast<dyn OutputSetType> for GlobalManualTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalManualTask {}
impl Cast<dyn ParallelGatewayType> for GlobalManualTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalManualTask {}
impl Cast<dyn ParticipantType> for GlobalManualTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalManualTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalManualTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalManualTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalManualTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalManualTask {}
impl Cast<dyn PartnerEntityType> for GlobalManualTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalManualTask {}
impl Cast<dyn PartnerRoleType> for GlobalManualTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalManualTask {}
impl Cast<dyn PerformerType> for GlobalManualTask {}
impl Cast<dyn PerformerTypeMut> for GlobalManualTask {}
impl Cast<dyn PotentialOwnerType> for GlobalManualTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalManualTask {}
impl Cast<dyn ProcessType> for GlobalManualTask {}
impl Cast<dyn ProcessTypeMut> for GlobalManualTask {}
impl Cast<dyn PropertyType> for GlobalManualTask {}
impl Cast<dyn PropertyTypeMut> for GlobalManualTask {}
impl Cast<dyn ReceiveTaskType> for GlobalManualTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn RelationshipType> for GlobalManualTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalManualTask {}
impl Cast<dyn RenderingType> for GlobalManualTask {}
impl Cast<dyn RenderingTypeMut> for GlobalManualTask {}
impl Cast<dyn ResourceType> for GlobalManualTask {}
impl Cast<dyn ResourceTypeMut> for GlobalManualTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalManualTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalManualTask {}
impl Cast<dyn ResourceParameterType> for GlobalManualTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalManualTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalManualTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalManualTask {}
impl Cast<dyn ResourceRoleType> for GlobalManualTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalManualTask {}
impl Cast<dyn RootElementType> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalManualTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalManualTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn ScriptType> for GlobalManualTask {}
impl Cast<dyn ScriptTypeMut> for GlobalManualTask {}
impl Cast<dyn SendTaskType> for GlobalManualTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn SequenceFlowType> for GlobalManualTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalManualTask {}
impl Cast<dyn ServiceTaskType> for GlobalManualTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalManualTask {}
impl Cast<dyn SignalType> for GlobalManualTask {}
impl Cast<dyn SignalTypeMut> for GlobalManualTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalManualTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalManualTask {}
impl Cast<dyn StartEventType> for GlobalManualTask {}
impl Cast<dyn StartEventTypeMut> for GlobalManualTask {}
impl Cast<dyn SubChoreographyType> for GlobalManualTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalManualTask {}
impl Cast<dyn SubConversationType> for GlobalManualTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalManualTask {}
impl Cast<dyn SubProcessType> for GlobalManualTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalManualTask {}
impl Cast<dyn TaskType> for GlobalManualTask {}
impl Cast<dyn TaskTypeMut> for GlobalManualTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn TextAnnotationType> for GlobalManualTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalManualTask {}
impl Cast<dyn TextType> for GlobalManualTask {}
impl Cast<dyn TextTypeMut> for GlobalManualTask {}
impl Cast<dyn ThrowEventType> for GlobalManualTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalManualTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalManualTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalManualTask {}
impl Cast<dyn TransactionType> for GlobalManualTask {}
impl Cast<dyn TransactionTypeMut> for GlobalManualTask {}
impl Cast<dyn UserTaskType> for GlobalManualTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalManualTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalScriptTask")]
pub struct GlobalScriptTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("GlobalTaskType",rg*="resource_roles","GlobalTaskTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(attr = "scriptLanguage")]
    #[tia("GlobalScriptTaskType",rg*="script_language","GlobalScriptTaskTypeMut",s)]
    pub script_language: Option<URI>,
    #[xml(child = "bpmn:script")]
    #[tia("GlobalScriptTaskType",rg*="script","GlobalScriptTaskTypeMut",s,rmg*="script_mut")]
    pub script: Option<Script>,
}
impl DocumentElement for GlobalScriptTask {
    fn element(&self) -> Element {
        Element::GlobalScriptTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalScriptTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.script.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.script.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for GlobalScriptTask {}
impl RootElementTypeMut for GlobalScriptTask {}
//

/// Access to `globalScriptTask`
pub trait GlobalScriptTaskType: GlobalTaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `scriptLanguage`
    fn script_language(&self) -> &Option<URI>;
    /// Get value of `script` child
    fn script(&self) -> &Option<Script>;
}
dyn_clone::clone_trait_object!(GlobalScriptTaskType);
impl_downcast!(GlobalScriptTaskType);
/// Mutable access to `globalScriptTask`
pub trait GlobalScriptTaskTypeMut:
    GlobalTaskTypeMut + Downcast + Debug + Send + DynClone + GlobalScriptTaskType
{
    /// Set value of attribute `scriptLanguage`
    fn set_script_language(&mut self, value: Option<URI>);
    /// Get a mutable value of `script` child
    fn script_mut(&mut self) -> &mut Option<Script>;
    /// Set value of `script` child
    fn set_script(&mut self, value: Option<Script>);
}
dyn_clone::clone_trait_object!(GlobalScriptTaskTypeMut);
impl_downcast!(GlobalScriptTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalScriptTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalScriptTask {}
impl Cast<dyn ImportType> for GlobalScriptTask {}
impl Cast<dyn ImportTypeMut> for GlobalScriptTask {}
impl Cast<dyn ActivityType> for GlobalScriptTask {}
impl Cast<dyn ActivityTypeMut> for GlobalScriptTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalScriptTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalScriptTask {}
impl Cast<dyn ArtifactType> for GlobalScriptTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalScriptTask {}
impl Cast<dyn AssignmentType> for GlobalScriptTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalScriptTask {}
impl Cast<dyn AssociationType> for GlobalScriptTask {}
impl Cast<dyn AssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn AuditingType> for GlobalScriptTask {}
impl Cast<dyn AuditingTypeMut> for GlobalScriptTask {}
impl Cast<dyn BaseElementType> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalScriptTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalScriptTask {}
impl Cast<dyn BoundaryEventType> for GlobalScriptTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalScriptTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn CallableElementType> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for GlobalScriptTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalScriptTask {}
impl Cast<dyn CallChoreographyType> for GlobalScriptTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalScriptTask {}
impl Cast<dyn CallConversationType> for GlobalScriptTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalScriptTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn CatchEventType> for GlobalScriptTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn CategoryType> for GlobalScriptTask {}
impl Cast<dyn CategoryTypeMut> for GlobalScriptTask {}
impl Cast<dyn CategoryValueType> for GlobalScriptTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalScriptTask {}
impl Cast<dyn ChoreographyType> for GlobalScriptTask {}
impl Cast<dyn ChoreographyTypeMut> for GlobalScriptTask {}
impl Cast<dyn ChoreographyActivityType> for GlobalScriptTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalScriptTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalScriptTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn CollaborationType> for GlobalScriptTask {}
impl Cast<dyn CollaborationTypeMut> for GlobalScriptTask {}
impl Cast<dyn CompensateEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalScriptTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ComplexGatewayType> for GlobalScriptTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ConversationType> for GlobalScriptTask {}
impl Cast<dyn ConversationTypeMut> for GlobalScriptTask {}
impl Cast<dyn ConversationAssociationType> for GlobalScriptTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn ConversationLinkType> for GlobalScriptTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalScriptTask {}
impl Cast<dyn ConversationNodeType> for GlobalScriptTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalScriptTask {}
impl Cast<dyn CorrelationKeyType> for GlobalScriptTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalScriptTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalScriptTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalScriptTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataAssociationType> for GlobalScriptTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataInputType> for GlobalScriptTask {}
impl Cast<dyn DataInputTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataInputAssociationType> for GlobalScriptTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataObjectType> for GlobalScriptTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalScriptTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataOutputType> for GlobalScriptTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalScriptTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataStateType> for GlobalScriptTask {}
impl Cast<dyn DataStateTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataStoreType> for GlobalScriptTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalScriptTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalScriptTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalScriptTask {}
impl Cast<dyn DocumentationType> for GlobalScriptTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalScriptTask {}
impl Cast<dyn EndEventType> for GlobalScriptTask {}
impl Cast<dyn EndEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn EndPointType> for GlobalScriptTask {}
impl Cast<dyn EndPointTypeMut> for GlobalScriptTask {}
impl Cast<dyn ErrorType> for GlobalScriptTask {}
impl Cast<dyn ErrorTypeMut> for GlobalScriptTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn EscalationType> for GlobalScriptTask {}
impl Cast<dyn EscalationTypeMut> for GlobalScriptTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn EventType> for GlobalScriptTask {}
impl Cast<dyn EventTypeMut> for GlobalScriptTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalScriptTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn EventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalScriptTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn ExpressionType> for GlobalScriptTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ExtensionType> for GlobalScriptTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ExtensionElementsType> for GlobalScriptTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalScriptTask {}
impl Cast<dyn FlowElementType> for GlobalScriptTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalScriptTask {}
impl Cast<dyn FlowNodeType> for GlobalScriptTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalScriptTask {}
impl Cast<dyn FormalExpressionType> for GlobalScriptTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalScriptTask {}
impl Cast<dyn GatewayType> for GlobalScriptTask {}
impl Cast<dyn GatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalScriptTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalScriptTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn GlobalConversationType> for GlobalScriptTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalScriptTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalScriptTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn GlobalScriptTaskType> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskType> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskTypeMut> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskType> for GlobalScriptTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn GroupType> for GlobalScriptTask {}
impl Cast<dyn GroupTypeMut> for GlobalScriptTask {}
impl Cast<dyn HumanPerformerType> for GlobalScriptTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalScriptTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalScriptTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalScriptTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn InputSetType> for GlobalScriptTask {}
impl Cast<dyn InputSetTypeMut> for GlobalScriptTask {}
impl Cast<dyn InterfaceType> for GlobalScriptTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalScriptTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalScriptTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalScriptTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn InputOutputBindingType> for GlobalScriptTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalScriptTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalScriptTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalScriptTask {}
impl Cast<dyn ItemDefinitionType> for GlobalScriptTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn LaneType> for GlobalScriptTask {}
impl Cast<dyn LaneTypeMut> for GlobalScriptTask {}
impl Cast<dyn LaneSetType> for GlobalScriptTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalScriptTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalScriptTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalScriptTask {}
impl Cast<dyn ManualTaskType> for GlobalScriptTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn MessageType> for GlobalScriptTask {}
impl Cast<dyn MessageTypeMut> for GlobalScriptTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn MessageFlowType> for GlobalScriptTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalScriptTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalScriptTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn MonitoringType> for GlobalScriptTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalScriptTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalScriptTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalScriptTask {}
impl Cast<dyn OperationType> for GlobalScriptTask {}
impl Cast<dyn OperationTypeMut> for GlobalScriptTask {}
impl Cast<dyn OutputSetType> for GlobalScriptTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalScriptTask {}
impl Cast<dyn ParallelGatewayType> for GlobalScriptTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalScriptTask {}
impl Cast<dyn ParticipantType> for GlobalScriptTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalScriptTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalScriptTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalScriptTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalScriptTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalScriptTask {}
impl Cast<dyn PartnerEntityType> for GlobalScriptTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalScriptTask {}
impl Cast<dyn PartnerRoleType> for GlobalScriptTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalScriptTask {}
impl Cast<dyn PerformerType> for GlobalScriptTask {}
impl Cast<dyn PerformerTypeMut> for GlobalScriptTask {}
impl Cast<dyn PotentialOwnerType> for GlobalScriptTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalScriptTask {}
impl Cast<dyn ProcessType> for GlobalScriptTask {}
impl Cast<dyn ProcessTypeMut> for GlobalScriptTask {}
impl Cast<dyn PropertyType> for GlobalScriptTask {}
impl Cast<dyn PropertyTypeMut> for GlobalScriptTask {}
impl Cast<dyn ReceiveTaskType> for GlobalScriptTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn RelationshipType> for GlobalScriptTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalScriptTask {}
impl Cast<dyn RenderingType> for GlobalScriptTask {}
impl Cast<dyn RenderingTypeMut> for GlobalScriptTask {}
impl Cast<dyn ResourceType> for GlobalScriptTask {}
impl Cast<dyn ResourceTypeMut> for GlobalScriptTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalScriptTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalScriptTask {}
impl Cast<dyn ResourceParameterType> for GlobalScriptTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalScriptTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalScriptTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalScriptTask {}
impl Cast<dyn ResourceRoleType> for GlobalScriptTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalScriptTask {}
impl Cast<dyn RootElementType> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalScriptTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalScriptTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn ScriptType> for GlobalScriptTask {}
impl Cast<dyn ScriptTypeMut> for GlobalScriptTask {}
impl Cast<dyn SendTaskType> for GlobalScriptTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn SequenceFlowType> for GlobalScriptTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalScriptTask {}
impl Cast<dyn ServiceTaskType> for GlobalScriptTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn SignalType> for GlobalScriptTask {}
impl Cast<dyn SignalTypeMut> for GlobalScriptTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalScriptTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalScriptTask {}
impl Cast<dyn StartEventType> for GlobalScriptTask {}
impl Cast<dyn StartEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn SubChoreographyType> for GlobalScriptTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalScriptTask {}
impl Cast<dyn SubConversationType> for GlobalScriptTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalScriptTask {}
impl Cast<dyn SubProcessType> for GlobalScriptTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalScriptTask {}
impl Cast<dyn TaskType> for GlobalScriptTask {}
impl Cast<dyn TaskTypeMut> for GlobalScriptTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn TextAnnotationType> for GlobalScriptTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalScriptTask {}
impl Cast<dyn TextType> for GlobalScriptTask {}
impl Cast<dyn TextTypeMut> for GlobalScriptTask {}
impl Cast<dyn ThrowEventType> for GlobalScriptTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalScriptTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalScriptTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalScriptTask {}
impl Cast<dyn TransactionType> for GlobalScriptTask {}
impl Cast<dyn TransactionTypeMut> for GlobalScriptTask {}
impl Cast<dyn UserTaskType> for GlobalScriptTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalScriptTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalTask")]
pub struct GlobalTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("GlobalTaskType",rg*="resource_roles","GlobalTaskTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
}
impl DocumentElement for GlobalTask {
    fn element(&self) -> Element {
        Element::GlobalTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_roles.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_roles.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for GlobalTask {}
impl RootElementTypeMut for GlobalTask {}
//

/// Access to `globalTask`
pub trait GlobalTaskType: CallableElementType + Downcast + Debug + Send + DynClone {
    /// Get value of `resourceRole` child
    fn resource_roles(&self) -> &Vec<ResourceRole>;
}
dyn_clone::clone_trait_object!(GlobalTaskType);
impl_downcast!(GlobalTaskType);
/// Mutable access to `globalTask`
pub trait GlobalTaskTypeMut:
    CallableElementTypeMut + Downcast + Debug + Send + DynClone + GlobalTaskType
{
    /// Get a mutable value of `resourceRole` child
    fn resource_roles_mut(&mut self) -> &mut Vec<ResourceRole>;
    /// Set value of `resourceRole` child
    fn set_resource_roles(&mut self, value: Vec<ResourceRole>);
}
dyn_clone::clone_trait_object!(GlobalTaskTypeMut);
impl_downcast!(GlobalTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalTask {}
impl Cast<dyn ImportType> for GlobalTask {}
impl Cast<dyn ImportTypeMut> for GlobalTask {}
impl Cast<dyn ActivityType> for GlobalTask {}
impl Cast<dyn ActivityTypeMut> for GlobalTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalTask {}
impl Cast<dyn ArtifactType> for GlobalTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalTask {}
impl Cast<dyn AssignmentType> for GlobalTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalTask {}
impl Cast<dyn AssociationType> for GlobalTask {}
impl Cast<dyn AssociationTypeMut> for GlobalTask {}
impl Cast<dyn AuditingType> for GlobalTask {}
impl Cast<dyn AuditingTypeMut> for GlobalTask {}
impl Cast<dyn BaseElementType> for GlobalTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalTask {}
impl Cast<dyn BoundaryEventType> for GlobalTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalTask {}
impl Cast<dyn CallableElementType> for GlobalTask {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for GlobalTask {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for GlobalTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalTask {}
impl Cast<dyn CallChoreographyType> for GlobalTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalTask {}
impl Cast<dyn CallConversationType> for GlobalTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn CatchEventType> for GlobalTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalTask {}
impl Cast<dyn CategoryType> for GlobalTask {}
impl Cast<dyn CategoryTypeMut> for GlobalTask {}
impl Cast<dyn CategoryValueType> for GlobalTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalTask {}
impl Cast<dyn ChoreographyType> for GlobalTask {}
impl Cast<dyn ChoreographyTypeMut> for GlobalTask {}
impl Cast<dyn ChoreographyActivityType> for GlobalTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalTask {}
impl Cast<dyn CollaborationType> for GlobalTask {}
impl Cast<dyn CollaborationTypeMut> for GlobalTask {}
impl Cast<dyn CompensateEventDefinitionType> for GlobalTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn ComplexGatewayType> for GlobalTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn ConversationType> for GlobalTask {}
impl Cast<dyn ConversationTypeMut> for GlobalTask {}
impl Cast<dyn ConversationAssociationType> for GlobalTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalTask {}
impl Cast<dyn ConversationLinkType> for GlobalTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalTask {}
impl Cast<dyn ConversationNodeType> for GlobalTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalTask {}
impl Cast<dyn CorrelationKeyType> for GlobalTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalTask {}
impl Cast<dyn DataAssociationType> for GlobalTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalTask {}
impl Cast<dyn DataInputType> for GlobalTask {}
impl Cast<dyn DataInputTypeMut> for GlobalTask {}
impl Cast<dyn DataInputAssociationType> for GlobalTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalTask {}
impl Cast<dyn DataObjectType> for GlobalTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalTask {}
impl Cast<dyn DataOutputType> for GlobalTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalTask {}
impl Cast<dyn DataStateType> for GlobalTask {}
impl Cast<dyn DataStateTypeMut> for GlobalTask {}
impl Cast<dyn DataStoreType> for GlobalTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalTask {}
impl Cast<dyn DocumentationType> for GlobalTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalTask {}
impl Cast<dyn EndEventType> for GlobalTask {}
impl Cast<dyn EndEventTypeMut> for GlobalTask {}
impl Cast<dyn EndPointType> for GlobalTask {}
impl Cast<dyn EndPointTypeMut> for GlobalTask {}
impl Cast<dyn ErrorType> for GlobalTask {}
impl Cast<dyn ErrorTypeMut> for GlobalTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn EscalationType> for GlobalTask {}
impl Cast<dyn EscalationTypeMut> for GlobalTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn EventType> for GlobalTask {}
impl Cast<dyn EventTypeMut> for GlobalTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalTask {}
impl Cast<dyn EventDefinitionType> for GlobalTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalTask {}
impl Cast<dyn ExpressionType> for GlobalTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalTask {}
impl Cast<dyn ExtensionType> for GlobalTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalTask {}
impl Cast<dyn ExtensionElementsType> for GlobalTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalTask {}
impl Cast<dyn FlowElementType> for GlobalTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalTask {}
impl Cast<dyn FlowNodeType> for GlobalTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalTask {}
impl Cast<dyn FormalExpressionType> for GlobalTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalTask {}
impl Cast<dyn GatewayType> for GlobalTask {}
impl Cast<dyn GatewayTypeMut> for GlobalTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalTask {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalTask {}
impl Cast<dyn GlobalConversationType> for GlobalTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalTask {}
impl Cast<dyn GlobalScriptTaskType> for GlobalTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalTask {}
impl Cast<dyn GlobalTaskType> for GlobalTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskTypeMut> for GlobalTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskType> for GlobalTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalTask {}
impl Cast<dyn GroupType> for GlobalTask {}
impl Cast<dyn GroupTypeMut> for GlobalTask {}
impl Cast<dyn HumanPerformerType> for GlobalTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalTask {}
impl Cast<dyn InputSetType> for GlobalTask {}
impl Cast<dyn InputSetTypeMut> for GlobalTask {}
impl Cast<dyn InterfaceType> for GlobalTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalTask {}
impl Cast<dyn InputOutputBindingType> for GlobalTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalTask {}
impl Cast<dyn ItemDefinitionType> for GlobalTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn LaneType> for GlobalTask {}
impl Cast<dyn LaneTypeMut> for GlobalTask {}
impl Cast<dyn LaneSetType> for GlobalTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalTask {}
impl Cast<dyn ManualTaskType> for GlobalTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalTask {}
impl Cast<dyn MessageType> for GlobalTask {}
impl Cast<dyn MessageTypeMut> for GlobalTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn MessageFlowType> for GlobalTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalTask {}
impl Cast<dyn MonitoringType> for GlobalTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalTask {}
impl Cast<dyn OperationType> for GlobalTask {}
impl Cast<dyn OperationTypeMut> for GlobalTask {}
impl Cast<dyn OutputSetType> for GlobalTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalTask {}
impl Cast<dyn ParallelGatewayType> for GlobalTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalTask {}
impl Cast<dyn ParticipantType> for GlobalTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalTask {}
impl Cast<dyn PartnerEntityType> for GlobalTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalTask {}
impl Cast<dyn PartnerRoleType> for GlobalTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalTask {}
impl Cast<dyn PerformerType> for GlobalTask {}
impl Cast<dyn PerformerTypeMut> for GlobalTask {}
impl Cast<dyn PotentialOwnerType> for GlobalTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalTask {}
impl Cast<dyn ProcessType> for GlobalTask {}
impl Cast<dyn ProcessTypeMut> for GlobalTask {}
impl Cast<dyn PropertyType> for GlobalTask {}
impl Cast<dyn PropertyTypeMut> for GlobalTask {}
impl Cast<dyn ReceiveTaskType> for GlobalTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalTask {}
impl Cast<dyn RelationshipType> for GlobalTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalTask {}
impl Cast<dyn RenderingType> for GlobalTask {}
impl Cast<dyn RenderingTypeMut> for GlobalTask {}
impl Cast<dyn ResourceType> for GlobalTask {}
impl Cast<dyn ResourceTypeMut> for GlobalTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalTask {}
impl Cast<dyn ResourceParameterType> for GlobalTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalTask {}
impl Cast<dyn ResourceRoleType> for GlobalTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalTask {}
impl Cast<dyn RootElementType> for GlobalTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalTask {}
impl Cast<dyn ScriptType> for GlobalTask {}
impl Cast<dyn ScriptTypeMut> for GlobalTask {}
impl Cast<dyn SendTaskType> for GlobalTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalTask {}
impl Cast<dyn SequenceFlowType> for GlobalTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalTask {}
impl Cast<dyn ServiceTaskType> for GlobalTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalTask {}
impl Cast<dyn SignalType> for GlobalTask {}
impl Cast<dyn SignalTypeMut> for GlobalTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalTask {}
impl Cast<dyn StartEventType> for GlobalTask {}
impl Cast<dyn StartEventTypeMut> for GlobalTask {}
impl Cast<dyn SubChoreographyType> for GlobalTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalTask {}
impl Cast<dyn SubConversationType> for GlobalTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalTask {}
impl Cast<dyn SubProcessType> for GlobalTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalTask {}
impl Cast<dyn TaskType> for GlobalTask {}
impl Cast<dyn TaskTypeMut> for GlobalTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn TextAnnotationType> for GlobalTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalTask {}
impl Cast<dyn TextType> for GlobalTask {}
impl Cast<dyn TextTypeMut> for GlobalTask {}
impl Cast<dyn ThrowEventType> for GlobalTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalTask {}
impl Cast<dyn TransactionType> for GlobalTask {}
impl Cast<dyn TransactionTypeMut> for GlobalTask {}
impl Cast<dyn UserTaskType> for GlobalTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:globalUserTask")]
pub struct GlobalUserTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("GlobalTaskType",rg*="resource_roles","GlobalTaskTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(attr = "implementation")]
    #[tia("GlobalUserTaskType",rg*="implementation","GlobalUserTaskTypeMut",s)]
    pub implementation: Option<String>,
    #[xml(child = "bpmn:rendering")]
    #[tia("GlobalUserTaskType",rg*="renderings","GlobalUserTaskTypeMut",s,rmg*="renderings_mut")]
    pub renderings: Vec<Rendering>,
}
impl DocumentElement for GlobalUserTask {
    fn element(&self) -> Element {
        Element::GlobalUserTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for GlobalUserTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.renderings.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.renderings.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for GlobalUserTask {}
impl RootElementTypeMut for GlobalUserTask {}
//

/// Access to `globalUserTask`
pub trait GlobalUserTaskType: GlobalTaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
    /// Get value of `rendering` child
    fn renderings(&self) -> &Vec<Rendering>;
}
dyn_clone::clone_trait_object!(GlobalUserTaskType);
impl_downcast!(GlobalUserTaskType);
/// Mutable access to `globalUserTask`
pub trait GlobalUserTaskTypeMut:
    GlobalTaskTypeMut + Downcast + Debug + Send + DynClone + GlobalUserTaskType
{
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
    /// Get a mutable value of `rendering` child
    fn renderings_mut(&mut self) -> &mut Vec<Rendering>;
    /// Set value of `rendering` child
    fn set_renderings(&mut self, value: Vec<Rendering>);
}
dyn_clone::clone_trait_object!(GlobalUserTaskTypeMut);
impl_downcast!(GlobalUserTaskTypeMut);
impl Cast<dyn DefinitionsType> for GlobalUserTask {}
impl Cast<dyn DefinitionsTypeMut> for GlobalUserTask {}
impl Cast<dyn ImportType> for GlobalUserTask {}
impl Cast<dyn ImportTypeMut> for GlobalUserTask {}
impl Cast<dyn ActivityType> for GlobalUserTask {}
impl Cast<dyn ActivityTypeMut> for GlobalUserTask {}
impl Cast<dyn AdHocSubProcessType> for GlobalUserTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for GlobalUserTask {}
impl Cast<dyn ArtifactType> for GlobalUserTask {}
impl Cast<dyn ArtifactTypeMut> for GlobalUserTask {}
impl Cast<dyn AssignmentType> for GlobalUserTask {}
impl Cast<dyn AssignmentTypeMut> for GlobalUserTask {}
impl Cast<dyn AssociationType> for GlobalUserTask {}
impl Cast<dyn AssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn AuditingType> for GlobalUserTask {}
impl Cast<dyn AuditingTypeMut> for GlobalUserTask {}
impl Cast<dyn BaseElementType> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for GlobalUserTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for GlobalUserTask {}
impl Cast<dyn BoundaryEventType> for GlobalUserTask {}
impl Cast<dyn BoundaryEventTypeMut> for GlobalUserTask {}
impl Cast<dyn BusinessRuleTaskType> for GlobalUserTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn CallableElementType> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for GlobalUserTask {}
impl Cast<dyn CallActivityTypeMut> for GlobalUserTask {}
impl Cast<dyn CallChoreographyType> for GlobalUserTask {}
impl Cast<dyn CallChoreographyTypeMut> for GlobalUserTask {}
impl Cast<dyn CallConversationType> for GlobalUserTask {}
impl Cast<dyn CallConversationTypeMut> for GlobalUserTask {}
impl Cast<dyn CancelEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn CatchEventType> for GlobalUserTask {}
impl Cast<dyn CatchEventTypeMut> for GlobalUserTask {}
impl Cast<dyn CategoryType> for GlobalUserTask {}
impl Cast<dyn CategoryTypeMut> for GlobalUserTask {}
impl Cast<dyn CategoryValueType> for GlobalUserTask {}
impl Cast<dyn CategoryValueTypeMut> for GlobalUserTask {}
impl Cast<dyn ChoreographyType> for GlobalUserTask {}
impl Cast<dyn ChoreographyTypeMut> for GlobalUserTask {}
impl Cast<dyn ChoreographyActivityType> for GlobalUserTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for GlobalUserTask {}
impl Cast<dyn ChoreographyTaskType> for GlobalUserTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn CollaborationType> for GlobalUserTask {}
impl Cast<dyn CollaborationTypeMut> for GlobalUserTask {}
impl Cast<dyn CompensateEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for GlobalUserTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn ComplexGatewayType> for GlobalUserTask {}
impl Cast<dyn ComplexGatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn ConditionalEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn ConversationType> for GlobalUserTask {}
impl Cast<dyn ConversationTypeMut> for GlobalUserTask {}
impl Cast<dyn ConversationAssociationType> for GlobalUserTask {}
impl Cast<dyn ConversationAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn ConversationLinkType> for GlobalUserTask {}
impl Cast<dyn ConversationLinkTypeMut> for GlobalUserTask {}
impl Cast<dyn ConversationNodeType> for GlobalUserTask {}
impl Cast<dyn ConversationNodeTypeMut> for GlobalUserTask {}
impl Cast<dyn CorrelationKeyType> for GlobalUserTask {}
impl Cast<dyn CorrelationKeyTypeMut> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyType> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyBindingType> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for GlobalUserTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for GlobalUserTask {}
impl Cast<dyn CorrelationSubscriptionType> for GlobalUserTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for GlobalUserTask {}
impl Cast<dyn DataAssociationType> for GlobalUserTask {}
impl Cast<dyn DataAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn DataInputType> for GlobalUserTask {}
impl Cast<dyn DataInputTypeMut> for GlobalUserTask {}
impl Cast<dyn DataInputAssociationType> for GlobalUserTask {}
impl Cast<dyn DataInputAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn DataObjectType> for GlobalUserTask {}
impl Cast<dyn DataObjectTypeMut> for GlobalUserTask {}
impl Cast<dyn DataObjectReferenceType> for GlobalUserTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for GlobalUserTask {}
impl Cast<dyn DataOutputType> for GlobalUserTask {}
impl Cast<dyn DataOutputTypeMut> for GlobalUserTask {}
impl Cast<dyn DataOutputAssociationType> for GlobalUserTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn DataStateType> for GlobalUserTask {}
impl Cast<dyn DataStateTypeMut> for GlobalUserTask {}
impl Cast<dyn DataStoreType> for GlobalUserTask {}
impl Cast<dyn DataStoreTypeMut> for GlobalUserTask {}
impl Cast<dyn DataStoreReferenceType> for GlobalUserTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for GlobalUserTask {}
impl Cast<dyn DocumentationType> for GlobalUserTask {}
impl Cast<dyn DocumentationTypeMut> for GlobalUserTask {}
impl Cast<dyn EndEventType> for GlobalUserTask {}
impl Cast<dyn EndEventTypeMut> for GlobalUserTask {}
impl Cast<dyn EndPointType> for GlobalUserTask {}
impl Cast<dyn EndPointTypeMut> for GlobalUserTask {}
impl Cast<dyn ErrorType> for GlobalUserTask {}
impl Cast<dyn ErrorTypeMut> for GlobalUserTask {}
impl Cast<dyn ErrorEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn EscalationType> for GlobalUserTask {}
impl Cast<dyn EscalationTypeMut> for GlobalUserTask {}
impl Cast<dyn EscalationEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn EventType> for GlobalUserTask {}
impl Cast<dyn EventTypeMut> for GlobalUserTask {}
impl Cast<dyn EventBasedGatewayType> for GlobalUserTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn EventDefinitionType> for GlobalUserTask {}
impl Cast<dyn EventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn ExclusiveGatewayType> for GlobalUserTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn ExpressionType> for GlobalUserTask {}
impl Cast<dyn ExpressionTypeMut> for GlobalUserTask {}
impl Cast<dyn ExtensionType> for GlobalUserTask {}
impl Cast<dyn ExtensionTypeMut> for GlobalUserTask {}
impl Cast<dyn ExtensionElementsType> for GlobalUserTask {}
impl Cast<dyn ExtensionElementsTypeMut> for GlobalUserTask {}
impl Cast<dyn FlowElementType> for GlobalUserTask {}
impl Cast<dyn FlowElementTypeMut> for GlobalUserTask {}
impl Cast<dyn FlowNodeType> for GlobalUserTask {}
impl Cast<dyn FlowNodeTypeMut> for GlobalUserTask {}
impl Cast<dyn FormalExpressionType> for GlobalUserTask {}
impl Cast<dyn FormalExpressionTypeMut> for GlobalUserTask {}
impl Cast<dyn GatewayType> for GlobalUserTask {}
impl Cast<dyn GatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for GlobalUserTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalChoreographyTaskType> for GlobalUserTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalConversationType> for GlobalUserTask {}
impl Cast<dyn GlobalConversationTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalManualTaskType> for GlobalUserTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalScriptTaskType> for GlobalUserTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn GlobalTaskType> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalTaskTypeMut> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskType> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GroupType> for GlobalUserTask {}
impl Cast<dyn GroupTypeMut> for GlobalUserTask {}
impl Cast<dyn HumanPerformerType> for GlobalUserTask {}
impl Cast<dyn HumanPerformerTypeMut> for GlobalUserTask {}
impl Cast<dyn ImplicitThrowEventType> for GlobalUserTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for GlobalUserTask {}
impl Cast<dyn InclusiveGatewayType> for GlobalUserTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn InputSetType> for GlobalUserTask {}
impl Cast<dyn InputSetTypeMut> for GlobalUserTask {}
impl Cast<dyn InterfaceType> for GlobalUserTask {}
impl Cast<dyn InterfaceTypeMut> for GlobalUserTask {}
impl Cast<dyn IntermediateCatchEventType> for GlobalUserTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for GlobalUserTask {}
impl Cast<dyn IntermediateThrowEventType> for GlobalUserTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for GlobalUserTask {}
impl Cast<dyn InputOutputBindingType> for GlobalUserTask {}
impl Cast<dyn InputOutputBindingTypeMut> for GlobalUserTask {}
impl Cast<dyn InputOutputSpecificationType> for GlobalUserTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for GlobalUserTask {}
impl Cast<dyn ItemDefinitionType> for GlobalUserTask {}
impl Cast<dyn ItemDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn LaneType> for GlobalUserTask {}
impl Cast<dyn LaneTypeMut> for GlobalUserTask {}
impl Cast<dyn LaneSetType> for GlobalUserTask {}
impl Cast<dyn LaneSetTypeMut> for GlobalUserTask {}
impl Cast<dyn LinkEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn LoopCharacteristicsType> for GlobalUserTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for GlobalUserTask {}
impl Cast<dyn ManualTaskType> for GlobalUserTask {}
impl Cast<dyn ManualTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn MessageType> for GlobalUserTask {}
impl Cast<dyn MessageTypeMut> for GlobalUserTask {}
impl Cast<dyn MessageEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn MessageFlowType> for GlobalUserTask {}
impl Cast<dyn MessageFlowTypeMut> for GlobalUserTask {}
impl Cast<dyn MessageFlowAssociationType> for GlobalUserTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn MonitoringType> for GlobalUserTask {}
impl Cast<dyn MonitoringTypeMut> for GlobalUserTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for GlobalUserTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for GlobalUserTask {}
impl Cast<dyn OperationType> for GlobalUserTask {}
impl Cast<dyn OperationTypeMut> for GlobalUserTask {}
impl Cast<dyn OutputSetType> for GlobalUserTask {}
impl Cast<dyn OutputSetTypeMut> for GlobalUserTask {}
impl Cast<dyn ParallelGatewayType> for GlobalUserTask {}
impl Cast<dyn ParallelGatewayTypeMut> for GlobalUserTask {}
impl Cast<dyn ParticipantType> for GlobalUserTask {}
impl Cast<dyn ParticipantTypeMut> for GlobalUserTask {}
impl Cast<dyn ParticipantAssociationType> for GlobalUserTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for GlobalUserTask {}
impl Cast<dyn ParticipantMultiplicityType> for GlobalUserTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for GlobalUserTask {}
impl Cast<dyn PartnerEntityType> for GlobalUserTask {}
impl Cast<dyn PartnerEntityTypeMut> for GlobalUserTask {}
impl Cast<dyn PartnerRoleType> for GlobalUserTask {}
impl Cast<dyn PartnerRoleTypeMut> for GlobalUserTask {}
impl Cast<dyn PerformerType> for GlobalUserTask {}
impl Cast<dyn PerformerTypeMut> for GlobalUserTask {}
impl Cast<dyn PotentialOwnerType> for GlobalUserTask {}
impl Cast<dyn PotentialOwnerTypeMut> for GlobalUserTask {}
impl Cast<dyn ProcessType> for GlobalUserTask {}
impl Cast<dyn ProcessTypeMut> for GlobalUserTask {}
impl Cast<dyn PropertyType> for GlobalUserTask {}
impl Cast<dyn PropertyTypeMut> for GlobalUserTask {}
impl Cast<dyn ReceiveTaskType> for GlobalUserTask {}
impl Cast<dyn ReceiveTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn RelationshipType> for GlobalUserTask {}
impl Cast<dyn RelationshipTypeMut> for GlobalUserTask {}
impl Cast<dyn RenderingType> for GlobalUserTask {}
impl Cast<dyn RenderingTypeMut> for GlobalUserTask {}
impl Cast<dyn ResourceType> for GlobalUserTask {}
impl Cast<dyn ResourceTypeMut> for GlobalUserTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for GlobalUserTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for GlobalUserTask {}
impl Cast<dyn ResourceParameterType> for GlobalUserTask {}
impl Cast<dyn ResourceParameterTypeMut> for GlobalUserTask {}
impl Cast<dyn ResourceParameterBindingType> for GlobalUserTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for GlobalUserTask {}
impl Cast<dyn ResourceRoleType> for GlobalUserTask {}
impl Cast<dyn ResourceRoleTypeMut> for GlobalUserTask {}
impl Cast<dyn RootElementType> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for GlobalUserTask {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for GlobalUserTask {}
impl Cast<dyn ScriptTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn ScriptType> for GlobalUserTask {}
impl Cast<dyn ScriptTypeMut> for GlobalUserTask {}
impl Cast<dyn SendTaskType> for GlobalUserTask {}
impl Cast<dyn SendTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn SequenceFlowType> for GlobalUserTask {}
impl Cast<dyn SequenceFlowTypeMut> for GlobalUserTask {}
impl Cast<dyn ServiceTaskType> for GlobalUserTask {}
impl Cast<dyn ServiceTaskTypeMut> for GlobalUserTask {}
impl Cast<dyn SignalType> for GlobalUserTask {}
impl Cast<dyn SignalTypeMut> for GlobalUserTask {}
impl Cast<dyn SignalEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for GlobalUserTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for GlobalUserTask {}
impl Cast<dyn StartEventType> for GlobalUserTask {}
impl Cast<dyn StartEventTypeMut> for GlobalUserTask {}
impl Cast<dyn SubChoreographyType> for GlobalUserTask {}
impl Cast<dyn SubChoreographyTypeMut> for GlobalUserTask {}
impl Cast<dyn SubConversationType> for GlobalUserTask {}
impl Cast<dyn SubConversationTypeMut> for GlobalUserTask {}
impl Cast<dyn SubProcessType> for GlobalUserTask {}
impl Cast<dyn SubProcessTypeMut> for GlobalUserTask {}
impl Cast<dyn TaskType> for GlobalUserTask {}
impl Cast<dyn TaskTypeMut> for GlobalUserTask {}
impl Cast<dyn TerminateEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn TextAnnotationType> for GlobalUserTask {}
impl Cast<dyn TextAnnotationTypeMut> for GlobalUserTask {}
impl Cast<dyn TextType> for GlobalUserTask {}
impl Cast<dyn TextTypeMut> for GlobalUserTask {}
impl Cast<dyn ThrowEventType> for GlobalUserTask {}
impl Cast<dyn ThrowEventTypeMut> for GlobalUserTask {}
impl Cast<dyn TimerEventDefinitionType> for GlobalUserTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for GlobalUserTask {}
impl Cast<dyn TransactionType> for GlobalUserTask {}
impl Cast<dyn TransactionTypeMut> for GlobalUserTask {}
impl Cast<dyn UserTaskType> for GlobalUserTask {}
impl Cast<dyn UserTaskTypeMut> for GlobalUserTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:group")]
pub struct Group {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "categoryValueRef")]
    #[tia("GroupType",rg*="category_value_ref","GroupTypeMut",s)]
    pub category_value_ref: Option<String>,
}
impl DocumentElement for Group {
    fn element(&self) -> Element {
        Element::Group
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Group {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ArtifactType for Group {}
impl ArtifactTypeMut for Group {}
//

/// Access to `group`
pub trait GroupType: ArtifactType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `categoryValueRef`
    fn category_value_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(GroupType);
impl_downcast!(GroupType);
/// Mutable access to `group`
pub trait GroupTypeMut: ArtifactTypeMut + Downcast + Debug + Send + DynClone + GroupType {
    /// Set value of attribute `categoryValueRef`
    fn set_category_value_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(GroupTypeMut);
impl_downcast!(GroupTypeMut);
impl Cast<dyn DefinitionsType> for Group {}
impl Cast<dyn DefinitionsTypeMut> for Group {}
impl Cast<dyn ImportType> for Group {}
impl Cast<dyn ImportTypeMut> for Group {}
impl Cast<dyn ActivityType> for Group {}
impl Cast<dyn ActivityTypeMut> for Group {}
impl Cast<dyn AdHocSubProcessType> for Group {}
impl Cast<dyn AdHocSubProcessTypeMut> for Group {}
impl Cast<dyn ArtifactType> for Group {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ArtifactTypeMut> for Group {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssignmentType> for Group {}
impl Cast<dyn AssignmentTypeMut> for Group {}
impl Cast<dyn AssociationType> for Group {}
impl Cast<dyn AssociationTypeMut> for Group {}
impl Cast<dyn AuditingType> for Group {}
impl Cast<dyn AuditingTypeMut> for Group {}
impl Cast<dyn BaseElementType> for Group {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Group {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Group {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Group {}
impl Cast<dyn BoundaryEventType> for Group {}
impl Cast<dyn BoundaryEventTypeMut> for Group {}
impl Cast<dyn BusinessRuleTaskType> for Group {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Group {}
impl Cast<dyn CallableElementType> for Group {}
impl Cast<dyn CallableElementTypeMut> for Group {}
impl Cast<dyn CallActivityType> for Group {}
impl Cast<dyn CallActivityTypeMut> for Group {}
impl Cast<dyn CallChoreographyType> for Group {}
impl Cast<dyn CallChoreographyTypeMut> for Group {}
impl Cast<dyn CallConversationType> for Group {}
impl Cast<dyn CallConversationTypeMut> for Group {}
impl Cast<dyn CancelEventDefinitionType> for Group {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Group {}
impl Cast<dyn CatchEventType> for Group {}
impl Cast<dyn CatchEventTypeMut> for Group {}
impl Cast<dyn CategoryType> for Group {}
impl Cast<dyn CategoryTypeMut> for Group {}
impl Cast<dyn CategoryValueType> for Group {}
impl Cast<dyn CategoryValueTypeMut> for Group {}
impl Cast<dyn ChoreographyType> for Group {}
impl Cast<dyn ChoreographyTypeMut> for Group {}
impl Cast<dyn ChoreographyActivityType> for Group {}
impl Cast<dyn ChoreographyActivityTypeMut> for Group {}
impl Cast<dyn ChoreographyTaskType> for Group {}
impl Cast<dyn ChoreographyTaskTypeMut> for Group {}
impl Cast<dyn CollaborationType> for Group {}
impl Cast<dyn CollaborationTypeMut> for Group {}
impl Cast<dyn CompensateEventDefinitionType> for Group {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Group {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Group {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Group {}
impl Cast<dyn ComplexGatewayType> for Group {}
impl Cast<dyn ComplexGatewayTypeMut> for Group {}
impl Cast<dyn ConditionalEventDefinitionType> for Group {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Group {}
impl Cast<dyn ConversationType> for Group {}
impl Cast<dyn ConversationTypeMut> for Group {}
impl Cast<dyn ConversationAssociationType> for Group {}
impl Cast<dyn ConversationAssociationTypeMut> for Group {}
impl Cast<dyn ConversationLinkType> for Group {}
impl Cast<dyn ConversationLinkTypeMut> for Group {}
impl Cast<dyn ConversationNodeType> for Group {}
impl Cast<dyn ConversationNodeTypeMut> for Group {}
impl Cast<dyn CorrelationKeyType> for Group {}
impl Cast<dyn CorrelationKeyTypeMut> for Group {}
impl Cast<dyn CorrelationPropertyType> for Group {}
impl Cast<dyn CorrelationPropertyTypeMut> for Group {}
impl Cast<dyn CorrelationPropertyBindingType> for Group {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Group {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Group {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Group {}
impl Cast<dyn CorrelationSubscriptionType> for Group {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Group {}
impl Cast<dyn DataAssociationType> for Group {}
impl Cast<dyn DataAssociationTypeMut> for Group {}
impl Cast<dyn DataInputType> for Group {}
impl Cast<dyn DataInputTypeMut> for Group {}
impl Cast<dyn DataInputAssociationType> for Group {}
impl Cast<dyn DataInputAssociationTypeMut> for Group {}
impl Cast<dyn DataObjectType> for Group {}
impl Cast<dyn DataObjectTypeMut> for Group {}
impl Cast<dyn DataObjectReferenceType> for Group {}
impl Cast<dyn DataObjectReferenceTypeMut> for Group {}
impl Cast<dyn DataOutputType> for Group {}
impl Cast<dyn DataOutputTypeMut> for Group {}
impl Cast<dyn DataOutputAssociationType> for Group {}
impl Cast<dyn DataOutputAssociationTypeMut> for Group {}
impl Cast<dyn DataStateType> for Group {}
impl Cast<dyn DataStateTypeMut> for Group {}
impl Cast<dyn DataStoreType> for Group {}
impl Cast<dyn DataStoreTypeMut> for Group {}
impl Cast<dyn DataStoreReferenceType> for Group {}
impl Cast<dyn DataStoreReferenceTypeMut> for Group {}
impl Cast<dyn DocumentationType> for Group {}
impl Cast<dyn DocumentationTypeMut> for Group {}
impl Cast<dyn EndEventType> for Group {}
impl Cast<dyn EndEventTypeMut> for Group {}
impl Cast<dyn EndPointType> for Group {}
impl Cast<dyn EndPointTypeMut> for Group {}
impl Cast<dyn ErrorType> for Group {}
impl Cast<dyn ErrorTypeMut> for Group {}
impl Cast<dyn ErrorEventDefinitionType> for Group {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Group {}
impl Cast<dyn EscalationType> for Group {}
impl Cast<dyn EscalationTypeMut> for Group {}
impl Cast<dyn EscalationEventDefinitionType> for Group {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Group {}
impl Cast<dyn EventType> for Group {}
impl Cast<dyn EventTypeMut> for Group {}
impl Cast<dyn EventBasedGatewayType> for Group {}
impl Cast<dyn EventBasedGatewayTypeMut> for Group {}
impl Cast<dyn EventDefinitionType> for Group {}
impl Cast<dyn EventDefinitionTypeMut> for Group {}
impl Cast<dyn ExclusiveGatewayType> for Group {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Group {}
impl Cast<dyn ExpressionType> for Group {}
impl Cast<dyn ExpressionTypeMut> for Group {}
impl Cast<dyn ExtensionType> for Group {}
impl Cast<dyn ExtensionTypeMut> for Group {}
impl Cast<dyn ExtensionElementsType> for Group {}
impl Cast<dyn ExtensionElementsTypeMut> for Group {}
impl Cast<dyn FlowElementType> for Group {}
impl Cast<dyn FlowElementTypeMut> for Group {}
impl Cast<dyn FlowNodeType> for Group {}
impl Cast<dyn FlowNodeTypeMut> for Group {}
impl Cast<dyn FormalExpressionType> for Group {}
impl Cast<dyn FormalExpressionTypeMut> for Group {}
impl Cast<dyn GatewayType> for Group {}
impl Cast<dyn GatewayTypeMut> for Group {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Group {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Group {}
impl Cast<dyn GlobalChoreographyTaskType> for Group {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Group {}
impl Cast<dyn GlobalConversationType> for Group {}
impl Cast<dyn GlobalConversationTypeMut> for Group {}
impl Cast<dyn GlobalManualTaskType> for Group {}
impl Cast<dyn GlobalManualTaskTypeMut> for Group {}
impl Cast<dyn GlobalScriptTaskType> for Group {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Group {}
impl Cast<dyn GlobalTaskType> for Group {}
impl Cast<dyn GlobalTaskTypeMut> for Group {}
impl Cast<dyn GlobalUserTaskType> for Group {}
impl Cast<dyn GlobalUserTaskTypeMut> for Group {}
impl Cast<dyn GroupType> for Group {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GroupTypeMut> for Group {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn HumanPerformerType> for Group {}
impl Cast<dyn HumanPerformerTypeMut> for Group {}
impl Cast<dyn ImplicitThrowEventType> for Group {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Group {}
impl Cast<dyn InclusiveGatewayType> for Group {}
impl Cast<dyn InclusiveGatewayTypeMut> for Group {}
impl Cast<dyn InputSetType> for Group {}
impl Cast<dyn InputSetTypeMut> for Group {}
impl Cast<dyn InterfaceType> for Group {}
impl Cast<dyn InterfaceTypeMut> for Group {}
impl Cast<dyn IntermediateCatchEventType> for Group {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Group {}
impl Cast<dyn IntermediateThrowEventType> for Group {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Group {}
impl Cast<dyn InputOutputBindingType> for Group {}
impl Cast<dyn InputOutputBindingTypeMut> for Group {}
impl Cast<dyn InputOutputSpecificationType> for Group {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Group {}
impl Cast<dyn ItemDefinitionType> for Group {}
impl Cast<dyn ItemDefinitionTypeMut> for Group {}
impl Cast<dyn LaneType> for Group {}
impl Cast<dyn LaneTypeMut> for Group {}
impl Cast<dyn LaneSetType> for Group {}
impl Cast<dyn LaneSetTypeMut> for Group {}
impl Cast<dyn LinkEventDefinitionType> for Group {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Group {}
impl Cast<dyn LoopCharacteristicsType> for Group {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Group {}
impl Cast<dyn ManualTaskType> for Group {}
impl Cast<dyn ManualTaskTypeMut> for Group {}
impl Cast<dyn MessageType> for Group {}
impl Cast<dyn MessageTypeMut> for Group {}
impl Cast<dyn MessageEventDefinitionType> for Group {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Group {}
impl Cast<dyn MessageFlowType> for Group {}
impl Cast<dyn MessageFlowTypeMut> for Group {}
impl Cast<dyn MessageFlowAssociationType> for Group {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Group {}
impl Cast<dyn MonitoringType> for Group {}
impl Cast<dyn MonitoringTypeMut> for Group {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Group {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Group {}
impl Cast<dyn OperationType> for Group {}
impl Cast<dyn OperationTypeMut> for Group {}
impl Cast<dyn OutputSetType> for Group {}
impl Cast<dyn OutputSetTypeMut> for Group {}
impl Cast<dyn ParallelGatewayType> for Group {}
impl Cast<dyn ParallelGatewayTypeMut> for Group {}
impl Cast<dyn ParticipantType> for Group {}
impl Cast<dyn ParticipantTypeMut> for Group {}
impl Cast<dyn ParticipantAssociationType> for Group {}
impl Cast<dyn ParticipantAssociationTypeMut> for Group {}
impl Cast<dyn ParticipantMultiplicityType> for Group {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Group {}
impl Cast<dyn PartnerEntityType> for Group {}
impl Cast<dyn PartnerEntityTypeMut> for Group {}
impl Cast<dyn PartnerRoleType> for Group {}
impl Cast<dyn PartnerRoleTypeMut> for Group {}
impl Cast<dyn PerformerType> for Group {}
impl Cast<dyn PerformerTypeMut> for Group {}
impl Cast<dyn PotentialOwnerType> for Group {}
impl Cast<dyn PotentialOwnerTypeMut> for Group {}
impl Cast<dyn ProcessType> for Group {}
impl Cast<dyn ProcessTypeMut> for Group {}
impl Cast<dyn PropertyType> for Group {}
impl Cast<dyn PropertyTypeMut> for Group {}
impl Cast<dyn ReceiveTaskType> for Group {}
impl Cast<dyn ReceiveTaskTypeMut> for Group {}
impl Cast<dyn RelationshipType> for Group {}
impl Cast<dyn RelationshipTypeMut> for Group {}
impl Cast<dyn RenderingType> for Group {}
impl Cast<dyn RenderingTypeMut> for Group {}
impl Cast<dyn ResourceType> for Group {}
impl Cast<dyn ResourceTypeMut> for Group {}
impl Cast<dyn ResourceAssignmentExpressionType> for Group {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Group {}
impl Cast<dyn ResourceParameterType> for Group {}
impl Cast<dyn ResourceParameterTypeMut> for Group {}
impl Cast<dyn ResourceParameterBindingType> for Group {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Group {}
impl Cast<dyn ResourceRoleType> for Group {}
impl Cast<dyn ResourceRoleTypeMut> for Group {}
impl Cast<dyn RootElementType> for Group {}
impl Cast<dyn RootElementTypeMut> for Group {}
impl Cast<dyn ScriptTaskType> for Group {}
impl Cast<dyn ScriptTaskTypeMut> for Group {}
impl Cast<dyn ScriptType> for Group {}
impl Cast<dyn ScriptTypeMut> for Group {}
impl Cast<dyn SendTaskType> for Group {}
impl Cast<dyn SendTaskTypeMut> for Group {}
impl Cast<dyn SequenceFlowType> for Group {}
impl Cast<dyn SequenceFlowTypeMut> for Group {}
impl Cast<dyn ServiceTaskType> for Group {}
impl Cast<dyn ServiceTaskTypeMut> for Group {}
impl Cast<dyn SignalType> for Group {}
impl Cast<dyn SignalTypeMut> for Group {}
impl Cast<dyn SignalEventDefinitionType> for Group {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Group {}
impl Cast<dyn StandardLoopCharacteristicsType> for Group {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Group {}
impl Cast<dyn StartEventType> for Group {}
impl Cast<dyn StartEventTypeMut> for Group {}
impl Cast<dyn SubChoreographyType> for Group {}
impl Cast<dyn SubChoreographyTypeMut> for Group {}
impl Cast<dyn SubConversationType> for Group {}
impl Cast<dyn SubConversationTypeMut> for Group {}
impl Cast<dyn SubProcessType> for Group {}
impl Cast<dyn SubProcessTypeMut> for Group {}
impl Cast<dyn TaskType> for Group {}
impl Cast<dyn TaskTypeMut> for Group {}
impl Cast<dyn TerminateEventDefinitionType> for Group {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Group {}
impl Cast<dyn TextAnnotationType> for Group {}
impl Cast<dyn TextAnnotationTypeMut> for Group {}
impl Cast<dyn TextType> for Group {}
impl Cast<dyn TextTypeMut> for Group {}
impl Cast<dyn ThrowEventType> for Group {}
impl Cast<dyn ThrowEventTypeMut> for Group {}
impl Cast<dyn TimerEventDefinitionType> for Group {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Group {}
impl Cast<dyn TransactionType> for Group {}
impl Cast<dyn TransactionTypeMut> for Group {}
impl Cast<dyn UserTaskType> for Group {}
impl Cast<dyn UserTaskTypeMut> for Group {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:humanPerformer")]
pub struct HumanPerformer {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceRoleType",rg*="name","ResourceRoleTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:resourceRef")]
    #[tia("ResourceRoleType",rg*="resource_ref","ResourceRoleTypeMut",s,rmg*="resource_ref_mut")]
    pub resource_ref: String,
    #[xml(child = "bpmn:resourceParameterBinding")]
    #[tia("ResourceRoleType",rg*="resource_parameter_bindings","ResourceRoleTypeMut",s,rmg*="resource_parameter_bindings_mut")]
    pub resource_parameter_bindings: Vec<ResourceParameterBinding>,
    #[xml(child = "bpmn:resourceAssignmentExpression")]
    #[tia("ResourceRoleType",rg*="resource_assignment_expression","ResourceRoleTypeMut",s,rmg*="resource_assignment_expression_mut")]
    pub resource_assignment_expression: Option<ResourceAssignmentExpression>,
}
impl DocumentElement for HumanPerformer {
    fn element(&self) -> Element {
        Element::HumanPerformer
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for HumanPerformer {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl HumanPerformerType for HumanPerformer {}
impl HumanPerformerTypeMut for HumanPerformer {}
impl PerformerType for HumanPerformer {}
impl PerformerTypeMut for HumanPerformer {}
//

/// Access to `humanPerformer`
pub trait HumanPerformerType: PerformerType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(HumanPerformerType);
impl_downcast!(HumanPerformerType);
/// Mutable access to `humanPerformer`
pub trait HumanPerformerTypeMut:
    PerformerTypeMut + Downcast + Debug + Send + DynClone + HumanPerformerType
{
}
dyn_clone::clone_trait_object!(HumanPerformerTypeMut);
impl_downcast!(HumanPerformerTypeMut);
impl Cast<dyn DefinitionsType> for HumanPerformer {}
impl Cast<dyn DefinitionsTypeMut> for HumanPerformer {}
impl Cast<dyn ImportType> for HumanPerformer {}
impl Cast<dyn ImportTypeMut> for HumanPerformer {}
impl Cast<dyn ActivityType> for HumanPerformer {}
impl Cast<dyn ActivityTypeMut> for HumanPerformer {}
impl Cast<dyn AdHocSubProcessType> for HumanPerformer {}
impl Cast<dyn AdHocSubProcessTypeMut> for HumanPerformer {}
impl Cast<dyn ArtifactType> for HumanPerformer {}
impl Cast<dyn ArtifactTypeMut> for HumanPerformer {}
impl Cast<dyn AssignmentType> for HumanPerformer {}
impl Cast<dyn AssignmentTypeMut> for HumanPerformer {}
impl Cast<dyn AssociationType> for HumanPerformer {}
impl Cast<dyn AssociationTypeMut> for HumanPerformer {}
impl Cast<dyn AuditingType> for HumanPerformer {}
impl Cast<dyn AuditingTypeMut> for HumanPerformer {}
impl Cast<dyn BaseElementType> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for HumanPerformer {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for HumanPerformer {}
impl Cast<dyn BoundaryEventType> for HumanPerformer {}
impl Cast<dyn BoundaryEventTypeMut> for HumanPerformer {}
impl Cast<dyn BusinessRuleTaskType> for HumanPerformer {}
impl Cast<dyn BusinessRuleTaskTypeMut> for HumanPerformer {}
impl Cast<dyn CallableElementType> for HumanPerformer {}
impl Cast<dyn CallableElementTypeMut> for HumanPerformer {}
impl Cast<dyn CallActivityType> for HumanPerformer {}
impl Cast<dyn CallActivityTypeMut> for HumanPerformer {}
impl Cast<dyn CallChoreographyType> for HumanPerformer {}
impl Cast<dyn CallChoreographyTypeMut> for HumanPerformer {}
impl Cast<dyn CallConversationType> for HumanPerformer {}
impl Cast<dyn CallConversationTypeMut> for HumanPerformer {}
impl Cast<dyn CancelEventDefinitionType> for HumanPerformer {}
impl Cast<dyn CancelEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn CatchEventType> for HumanPerformer {}
impl Cast<dyn CatchEventTypeMut> for HumanPerformer {}
impl Cast<dyn CategoryType> for HumanPerformer {}
impl Cast<dyn CategoryTypeMut> for HumanPerformer {}
impl Cast<dyn CategoryValueType> for HumanPerformer {}
impl Cast<dyn CategoryValueTypeMut> for HumanPerformer {}
impl Cast<dyn ChoreographyType> for HumanPerformer {}
impl Cast<dyn ChoreographyTypeMut> for HumanPerformer {}
impl Cast<dyn ChoreographyActivityType> for HumanPerformer {}
impl Cast<dyn ChoreographyActivityTypeMut> for HumanPerformer {}
impl Cast<dyn ChoreographyTaskType> for HumanPerformer {}
impl Cast<dyn ChoreographyTaskTypeMut> for HumanPerformer {}
impl Cast<dyn CollaborationType> for HumanPerformer {}
impl Cast<dyn CollaborationTypeMut> for HumanPerformer {}
impl Cast<dyn CompensateEventDefinitionType> for HumanPerformer {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn ComplexBehaviorDefinitionType> for HumanPerformer {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn ComplexGatewayType> for HumanPerformer {}
impl Cast<dyn ComplexGatewayTypeMut> for HumanPerformer {}
impl Cast<dyn ConditionalEventDefinitionType> for HumanPerformer {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn ConversationType> for HumanPerformer {}
impl Cast<dyn ConversationTypeMut> for HumanPerformer {}
impl Cast<dyn ConversationAssociationType> for HumanPerformer {}
impl Cast<dyn ConversationAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn ConversationLinkType> for HumanPerformer {}
impl Cast<dyn ConversationLinkTypeMut> for HumanPerformer {}
impl Cast<dyn ConversationNodeType> for HumanPerformer {}
impl Cast<dyn ConversationNodeTypeMut> for HumanPerformer {}
impl Cast<dyn CorrelationKeyType> for HumanPerformer {}
impl Cast<dyn CorrelationKeyTypeMut> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyType> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyTypeMut> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyBindingType> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for HumanPerformer {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for HumanPerformer {}
impl Cast<dyn CorrelationSubscriptionType> for HumanPerformer {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for HumanPerformer {}
impl Cast<dyn DataAssociationType> for HumanPerformer {}
impl Cast<dyn DataAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn DataInputType> for HumanPerformer {}
impl Cast<dyn DataInputTypeMut> for HumanPerformer {}
impl Cast<dyn DataInputAssociationType> for HumanPerformer {}
impl Cast<dyn DataInputAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn DataObjectType> for HumanPerformer {}
impl Cast<dyn DataObjectTypeMut> for HumanPerformer {}
impl Cast<dyn DataObjectReferenceType> for HumanPerformer {}
impl Cast<dyn DataObjectReferenceTypeMut> for HumanPerformer {}
impl Cast<dyn DataOutputType> for HumanPerformer {}
impl Cast<dyn DataOutputTypeMut> for HumanPerformer {}
impl Cast<dyn DataOutputAssociationType> for HumanPerformer {}
impl Cast<dyn DataOutputAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn DataStateType> for HumanPerformer {}
impl Cast<dyn DataStateTypeMut> for HumanPerformer {}
impl Cast<dyn DataStoreType> for HumanPerformer {}
impl Cast<dyn DataStoreTypeMut> for HumanPerformer {}
impl Cast<dyn DataStoreReferenceType> for HumanPerformer {}
impl Cast<dyn DataStoreReferenceTypeMut> for HumanPerformer {}
impl Cast<dyn DocumentationType> for HumanPerformer {}
impl Cast<dyn DocumentationTypeMut> for HumanPerformer {}
impl Cast<dyn EndEventType> for HumanPerformer {}
impl Cast<dyn EndEventTypeMut> for HumanPerformer {}
impl Cast<dyn EndPointType> for HumanPerformer {}
impl Cast<dyn EndPointTypeMut> for HumanPerformer {}
impl Cast<dyn ErrorType> for HumanPerformer {}
impl Cast<dyn ErrorTypeMut> for HumanPerformer {}
impl Cast<dyn ErrorEventDefinitionType> for HumanPerformer {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn EscalationType> for HumanPerformer {}
impl Cast<dyn EscalationTypeMut> for HumanPerformer {}
impl Cast<dyn EscalationEventDefinitionType> for HumanPerformer {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn EventType> for HumanPerformer {}
impl Cast<dyn EventTypeMut> for HumanPerformer {}
impl Cast<dyn EventBasedGatewayType> for HumanPerformer {}
impl Cast<dyn EventBasedGatewayTypeMut> for HumanPerformer {}
impl Cast<dyn EventDefinitionType> for HumanPerformer {}
impl Cast<dyn EventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn ExclusiveGatewayType> for HumanPerformer {}
impl Cast<dyn ExclusiveGatewayTypeMut> for HumanPerformer {}
impl Cast<dyn ExpressionType> for HumanPerformer {}
impl Cast<dyn ExpressionTypeMut> for HumanPerformer {}
impl Cast<dyn ExtensionType> for HumanPerformer {}
impl Cast<dyn ExtensionTypeMut> for HumanPerformer {}
impl Cast<dyn ExtensionElementsType> for HumanPerformer {}
impl Cast<dyn ExtensionElementsTypeMut> for HumanPerformer {}
impl Cast<dyn FlowElementType> for HumanPerformer {}
impl Cast<dyn FlowElementTypeMut> for HumanPerformer {}
impl Cast<dyn FlowNodeType> for HumanPerformer {}
impl Cast<dyn FlowNodeTypeMut> for HumanPerformer {}
impl Cast<dyn FormalExpressionType> for HumanPerformer {}
impl Cast<dyn FormalExpressionTypeMut> for HumanPerformer {}
impl Cast<dyn GatewayType> for HumanPerformer {}
impl Cast<dyn GatewayTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalBusinessRuleTaskType> for HumanPerformer {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalChoreographyTaskType> for HumanPerformer {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalConversationType> for HumanPerformer {}
impl Cast<dyn GlobalConversationTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalManualTaskType> for HumanPerformer {}
impl Cast<dyn GlobalManualTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalScriptTaskType> for HumanPerformer {}
impl Cast<dyn GlobalScriptTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalTaskType> for HumanPerformer {}
impl Cast<dyn GlobalTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GlobalUserTaskType> for HumanPerformer {}
impl Cast<dyn GlobalUserTaskTypeMut> for HumanPerformer {}
impl Cast<dyn GroupType> for HumanPerformer {}
impl Cast<dyn GroupTypeMut> for HumanPerformer {}
impl Cast<dyn HumanPerformerType> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn HumanPerformerTypeMut> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ImplicitThrowEventType> for HumanPerformer {}
impl Cast<dyn ImplicitThrowEventTypeMut> for HumanPerformer {}
impl Cast<dyn InclusiveGatewayType> for HumanPerformer {}
impl Cast<dyn InclusiveGatewayTypeMut> for HumanPerformer {}
impl Cast<dyn InputSetType> for HumanPerformer {}
impl Cast<dyn InputSetTypeMut> for HumanPerformer {}
impl Cast<dyn InterfaceType> for HumanPerformer {}
impl Cast<dyn InterfaceTypeMut> for HumanPerformer {}
impl Cast<dyn IntermediateCatchEventType> for HumanPerformer {}
impl Cast<dyn IntermediateCatchEventTypeMut> for HumanPerformer {}
impl Cast<dyn IntermediateThrowEventType> for HumanPerformer {}
impl Cast<dyn IntermediateThrowEventTypeMut> for HumanPerformer {}
impl Cast<dyn InputOutputBindingType> for HumanPerformer {}
impl Cast<dyn InputOutputBindingTypeMut> for HumanPerformer {}
impl Cast<dyn InputOutputSpecificationType> for HumanPerformer {}
impl Cast<dyn InputOutputSpecificationTypeMut> for HumanPerformer {}
impl Cast<dyn ItemDefinitionType> for HumanPerformer {}
impl Cast<dyn ItemDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn LaneType> for HumanPerformer {}
impl Cast<dyn LaneTypeMut> for HumanPerformer {}
impl Cast<dyn LaneSetType> for HumanPerformer {}
impl Cast<dyn LaneSetTypeMut> for HumanPerformer {}
impl Cast<dyn LinkEventDefinitionType> for HumanPerformer {}
impl Cast<dyn LinkEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn LoopCharacteristicsType> for HumanPerformer {}
impl Cast<dyn LoopCharacteristicsTypeMut> for HumanPerformer {}
impl Cast<dyn ManualTaskType> for HumanPerformer {}
impl Cast<dyn ManualTaskTypeMut> for HumanPerformer {}
impl Cast<dyn MessageType> for HumanPerformer {}
impl Cast<dyn MessageTypeMut> for HumanPerformer {}
impl Cast<dyn MessageEventDefinitionType> for HumanPerformer {}
impl Cast<dyn MessageEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn MessageFlowType> for HumanPerformer {}
impl Cast<dyn MessageFlowTypeMut> for HumanPerformer {}
impl Cast<dyn MessageFlowAssociationType> for HumanPerformer {}
impl Cast<dyn MessageFlowAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn MonitoringType> for HumanPerformer {}
impl Cast<dyn MonitoringTypeMut> for HumanPerformer {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for HumanPerformer {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for HumanPerformer {}
impl Cast<dyn OperationType> for HumanPerformer {}
impl Cast<dyn OperationTypeMut> for HumanPerformer {}
impl Cast<dyn OutputSetType> for HumanPerformer {}
impl Cast<dyn OutputSetTypeMut> for HumanPerformer {}
impl Cast<dyn ParallelGatewayType> for HumanPerformer {}
impl Cast<dyn ParallelGatewayTypeMut> for HumanPerformer {}
impl Cast<dyn ParticipantType> for HumanPerformer {}
impl Cast<dyn ParticipantTypeMut> for HumanPerformer {}
impl Cast<dyn ParticipantAssociationType> for HumanPerformer {}
impl Cast<dyn ParticipantAssociationTypeMut> for HumanPerformer {}
impl Cast<dyn ParticipantMultiplicityType> for HumanPerformer {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for HumanPerformer {}
impl Cast<dyn PartnerEntityType> for HumanPerformer {}
impl Cast<dyn PartnerEntityTypeMut> for HumanPerformer {}
impl Cast<dyn PartnerRoleType> for HumanPerformer {}
impl Cast<dyn PartnerRoleTypeMut> for HumanPerformer {}
impl Cast<dyn PerformerType> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PerformerTypeMut> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PotentialOwnerType> for HumanPerformer {}
impl Cast<dyn PotentialOwnerTypeMut> for HumanPerformer {}
impl Cast<dyn ProcessType> for HumanPerformer {}
impl Cast<dyn ProcessTypeMut> for HumanPerformer {}
impl Cast<dyn PropertyType> for HumanPerformer {}
impl Cast<dyn PropertyTypeMut> for HumanPerformer {}
impl Cast<dyn ReceiveTaskType> for HumanPerformer {}
impl Cast<dyn ReceiveTaskTypeMut> for HumanPerformer {}
impl Cast<dyn RelationshipType> for HumanPerformer {}
impl Cast<dyn RelationshipTypeMut> for HumanPerformer {}
impl Cast<dyn RenderingType> for HumanPerformer {}
impl Cast<dyn RenderingTypeMut> for HumanPerformer {}
impl Cast<dyn ResourceType> for HumanPerformer {}
impl Cast<dyn ResourceTypeMut> for HumanPerformer {}
impl Cast<dyn ResourceAssignmentExpressionType> for HumanPerformer {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for HumanPerformer {}
impl Cast<dyn ResourceParameterType> for HumanPerformer {}
impl Cast<dyn ResourceParameterTypeMut> for HumanPerformer {}
impl Cast<dyn ResourceParameterBindingType> for HumanPerformer {}
impl Cast<dyn ResourceParameterBindingTypeMut> for HumanPerformer {}
impl Cast<dyn ResourceRoleType> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceRoleTypeMut> for HumanPerformer {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementType> for HumanPerformer {}
impl Cast<dyn RootElementTypeMut> for HumanPerformer {}
impl Cast<dyn ScriptTaskType> for HumanPerformer {}
impl Cast<dyn ScriptTaskTypeMut> for HumanPerformer {}
impl Cast<dyn ScriptType> for HumanPerformer {}
impl Cast<dyn ScriptTypeMut> for HumanPerformer {}
impl Cast<dyn SendTaskType> for HumanPerformer {}
impl Cast<dyn SendTaskTypeMut> for HumanPerformer {}
impl Cast<dyn SequenceFlowType> for HumanPerformer {}
impl Cast<dyn SequenceFlowTypeMut> for HumanPerformer {}
impl Cast<dyn ServiceTaskType> for HumanPerformer {}
impl Cast<dyn ServiceTaskTypeMut> for HumanPerformer {}
impl Cast<dyn SignalType> for HumanPerformer {}
impl Cast<dyn SignalTypeMut> for HumanPerformer {}
impl Cast<dyn SignalEventDefinitionType> for HumanPerformer {}
impl Cast<dyn SignalEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn StandardLoopCharacteristicsType> for HumanPerformer {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for HumanPerformer {}
impl Cast<dyn StartEventType> for HumanPerformer {}
impl Cast<dyn StartEventTypeMut> for HumanPerformer {}
impl Cast<dyn SubChoreographyType> for HumanPerformer {}
impl Cast<dyn SubChoreographyTypeMut> for HumanPerformer {}
impl Cast<dyn SubConversationType> for HumanPerformer {}
impl Cast<dyn SubConversationTypeMut> for HumanPerformer {}
impl Cast<dyn SubProcessType> for HumanPerformer {}
impl Cast<dyn SubProcessTypeMut> for HumanPerformer {}
impl Cast<dyn TaskType> for HumanPerformer {}
impl Cast<dyn TaskTypeMut> for HumanPerformer {}
impl Cast<dyn TerminateEventDefinitionType> for HumanPerformer {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn TextAnnotationType> for HumanPerformer {}
impl Cast<dyn TextAnnotationTypeMut> for HumanPerformer {}
impl Cast<dyn TextType> for HumanPerformer {}
impl Cast<dyn TextTypeMut> for HumanPerformer {}
impl Cast<dyn ThrowEventType> for HumanPerformer {}
impl Cast<dyn ThrowEventTypeMut> for HumanPerformer {}
impl Cast<dyn TimerEventDefinitionType> for HumanPerformer {}
impl Cast<dyn TimerEventDefinitionTypeMut> for HumanPerformer {}
impl Cast<dyn TransactionType> for HumanPerformer {}
impl Cast<dyn TransactionTypeMut> for HumanPerformer {}
impl Cast<dyn UserTaskType> for HumanPerformer {}
impl Cast<dyn UserTaskTypeMut> for HumanPerformer {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:implicitThrowEvent")]
pub struct ImplicitThrowEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInput")]
    #[tia("ThrowEventType",rg*="data_inputs","ThrowEventTypeMut",s,rmg*="data_inputs_mut")]
    pub data_inputs: Vec<DataInput>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ThrowEventType",rg*="data_input_associations","ThrowEventTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:inputSet")]
    #[tia("ThrowEventType",rg*="input_set","ThrowEventTypeMut",s,rmg*="input_set_mut")]
    pub input_set: Option<InputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("ThrowEventType",rg*="event_definitions","ThrowEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("ThrowEventType",rg*="event_definition_refs","ThrowEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
}
impl DocumentElement for ImplicitThrowEvent {
    fn element(&self) -> Element {
        Element::ImplicitThrowEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ImplicitThrowEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ImplicitThrowEventType for ImplicitThrowEvent {}
impl ImplicitThrowEventTypeMut for ImplicitThrowEvent {}
//

/// Access to `implicitThrowEvent`
pub trait ImplicitThrowEventType: ThrowEventType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ImplicitThrowEventType);
impl_downcast!(ImplicitThrowEventType);
/// Mutable access to `implicitThrowEvent`
pub trait ImplicitThrowEventTypeMut:
    ThrowEventTypeMut + Downcast + Debug + Send + DynClone + ImplicitThrowEventType
{
}
dyn_clone::clone_trait_object!(ImplicitThrowEventTypeMut);
impl_downcast!(ImplicitThrowEventTypeMut);
impl Cast<dyn DefinitionsType> for ImplicitThrowEvent {}
impl Cast<dyn DefinitionsTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ImportType> for ImplicitThrowEvent {}
impl Cast<dyn ImportTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ActivityType> for ImplicitThrowEvent {}
impl Cast<dyn ActivityTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn AdHocSubProcessType> for ImplicitThrowEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ArtifactType> for ImplicitThrowEvent {}
impl Cast<dyn ArtifactTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn AssignmentType> for ImplicitThrowEvent {}
impl Cast<dyn AssignmentTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn AssociationType> for ImplicitThrowEvent {}
impl Cast<dyn AssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn AuditingType> for ImplicitThrowEvent {}
impl Cast<dyn AuditingTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn BaseElementType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ImplicitThrowEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn BoundaryEventType> for ImplicitThrowEvent {}
impl Cast<dyn BoundaryEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn BusinessRuleTaskType> for ImplicitThrowEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CallableElementType> for ImplicitThrowEvent {}
impl Cast<dyn CallableElementTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CallActivityType> for ImplicitThrowEvent {}
impl Cast<dyn CallActivityTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CallChoreographyType> for ImplicitThrowEvent {}
impl Cast<dyn CallChoreographyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CallConversationType> for ImplicitThrowEvent {}
impl Cast<dyn CallConversationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CancelEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CatchEventType> for ImplicitThrowEvent {}
impl Cast<dyn CatchEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CategoryType> for ImplicitThrowEvent {}
impl Cast<dyn CategoryTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CategoryValueType> for ImplicitThrowEvent {}
impl Cast<dyn CategoryValueTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyType> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyActivityType> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyTaskType> for ImplicitThrowEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CollaborationType> for ImplicitThrowEvent {}
impl Cast<dyn CollaborationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CompensateEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ComplexGatewayType> for ImplicitThrowEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ConversationType> for ImplicitThrowEvent {}
impl Cast<dyn ConversationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ConversationAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ConversationLinkType> for ImplicitThrowEvent {}
impl Cast<dyn ConversationLinkTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ConversationNodeType> for ImplicitThrowEvent {}
impl Cast<dyn ConversationNodeTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationKeyType> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyType> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationSubscriptionType> for ImplicitThrowEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn DataAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataInputType> for ImplicitThrowEvent {}
impl Cast<dyn DataInputTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataInputAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataObjectType> for ImplicitThrowEvent {}
impl Cast<dyn DataObjectTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataObjectReferenceType> for ImplicitThrowEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataOutputType> for ImplicitThrowEvent {}
impl Cast<dyn DataOutputTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataOutputAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataStateType> for ImplicitThrowEvent {}
impl Cast<dyn DataStateTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataStoreType> for ImplicitThrowEvent {}
impl Cast<dyn DataStoreTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DataStoreReferenceType> for ImplicitThrowEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn DocumentationType> for ImplicitThrowEvent {}
impl Cast<dyn DocumentationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EndEventType> for ImplicitThrowEvent {}
impl Cast<dyn EndEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EndPointType> for ImplicitThrowEvent {}
impl Cast<dyn EndPointTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ErrorType> for ImplicitThrowEvent {}
impl Cast<dyn ErrorTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ErrorEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EscalationType> for ImplicitThrowEvent {}
impl Cast<dyn EscalationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EscalationEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EventType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for ImplicitThrowEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn EventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn EventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ExclusiveGatewayType> for ImplicitThrowEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ExpressionType> for ImplicitThrowEvent {}
impl Cast<dyn ExpressionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ExtensionType> for ImplicitThrowEvent {}
impl Cast<dyn ExtensionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ExtensionElementsType> for ImplicitThrowEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn FlowElementType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ImplicitThrowEvent {}
impl Cast<dyn FormalExpressionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GatewayType> for ImplicitThrowEvent {}
impl Cast<dyn GatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalConversationType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalConversationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalManualTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalScriptTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GlobalUserTaskType> for ImplicitThrowEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn GroupType> for ImplicitThrowEvent {}
impl Cast<dyn GroupTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn HumanPerformerType> for ImplicitThrowEvent {}
impl Cast<dyn HumanPerformerTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ImplicitThrowEventType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InclusiveGatewayType> for ImplicitThrowEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn InputSetType> for ImplicitThrowEvent {}
impl Cast<dyn InputSetTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn InterfaceType> for ImplicitThrowEvent {}
impl Cast<dyn InterfaceTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn IntermediateCatchEventType> for ImplicitThrowEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn IntermediateThrowEventType> for ImplicitThrowEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn InputOutputBindingType> for ImplicitThrowEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn InputOutputSpecificationType> for ImplicitThrowEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ItemDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn LaneType> for ImplicitThrowEvent {}
impl Cast<dyn LaneTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn LaneSetType> for ImplicitThrowEvent {}
impl Cast<dyn LaneSetTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn LinkEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn LoopCharacteristicsType> for ImplicitThrowEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ManualTaskType> for ImplicitThrowEvent {}
impl Cast<dyn ManualTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MessageType> for ImplicitThrowEvent {}
impl Cast<dyn MessageTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MessageEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MessageFlowType> for ImplicitThrowEvent {}
impl Cast<dyn MessageFlowTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MessageFlowAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MonitoringType> for ImplicitThrowEvent {}
impl Cast<dyn MonitoringTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ImplicitThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn OperationType> for ImplicitThrowEvent {}
impl Cast<dyn OperationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn OutputSetType> for ImplicitThrowEvent {}
impl Cast<dyn OutputSetTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ParallelGatewayType> for ImplicitThrowEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantType> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantAssociationType> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantMultiplicityType> for ImplicitThrowEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn PartnerEntityType> for ImplicitThrowEvent {}
impl Cast<dyn PartnerEntityTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn PartnerRoleType> for ImplicitThrowEvent {}
impl Cast<dyn PartnerRoleTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn PerformerType> for ImplicitThrowEvent {}
impl Cast<dyn PerformerTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn PotentialOwnerType> for ImplicitThrowEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ProcessType> for ImplicitThrowEvent {}
impl Cast<dyn ProcessTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn PropertyType> for ImplicitThrowEvent {}
impl Cast<dyn PropertyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ReceiveTaskType> for ImplicitThrowEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn RelationshipType> for ImplicitThrowEvent {}
impl Cast<dyn RelationshipTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn RenderingType> for ImplicitThrowEvent {}
impl Cast<dyn RenderingTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ResourceType> for ImplicitThrowEvent {}
impl Cast<dyn ResourceTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for ImplicitThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ResourceParameterType> for ImplicitThrowEvent {}
impl Cast<dyn ResourceParameterTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ResourceParameterBindingType> for ImplicitThrowEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ResourceRoleType> for ImplicitThrowEvent {}
impl Cast<dyn ResourceRoleTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn RootElementType> for ImplicitThrowEvent {}
impl Cast<dyn RootElementTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ScriptTaskType> for ImplicitThrowEvent {}
impl Cast<dyn ScriptTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ScriptType> for ImplicitThrowEvent {}
impl Cast<dyn ScriptTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SendTaskType> for ImplicitThrowEvent {}
impl Cast<dyn SendTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SequenceFlowType> for ImplicitThrowEvent {}
impl Cast<dyn SequenceFlowTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ServiceTaskType> for ImplicitThrowEvent {}
impl Cast<dyn ServiceTaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SignalType> for ImplicitThrowEvent {}
impl Cast<dyn SignalTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SignalEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for ImplicitThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn StartEventType> for ImplicitThrowEvent {}
impl Cast<dyn StartEventTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SubChoreographyType> for ImplicitThrowEvent {}
impl Cast<dyn SubChoreographyTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SubConversationType> for ImplicitThrowEvent {}
impl Cast<dyn SubConversationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn SubProcessType> for ImplicitThrowEvent {}
impl Cast<dyn SubProcessTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn TaskType> for ImplicitThrowEvent {}
impl Cast<dyn TaskTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn TerminateEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn TextAnnotationType> for ImplicitThrowEvent {}
impl Cast<dyn TextAnnotationTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn TextType> for ImplicitThrowEvent {}
impl Cast<dyn TextTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn ThrowEventType> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ThrowEventTypeMut> for ImplicitThrowEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TimerEventDefinitionType> for ImplicitThrowEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn TransactionType> for ImplicitThrowEvent {}
impl Cast<dyn TransactionTypeMut> for ImplicitThrowEvent {}
impl Cast<dyn UserTaskType> for ImplicitThrowEvent {}
impl Cast<dyn UserTaskTypeMut> for ImplicitThrowEvent {}
/// Wrapper for complexBehaviorDefinition::event element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct ComplexBehaviorDefinitionEvent(pub ImplicitThrowEvent);
impl<'a> XmlRead<'a> for ComplexBehaviorDefinitionEvent {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(ComplexBehaviorDefinitionEvent(
            ImplicitThrowEvent::from_reader(&mut XmlReader::new(
                &reader.read_source_till_end("event", "implicitThrowEvent")?,
            ))?,
        ))
    }
}

impl DocumentElementContainer for ComplexBehaviorDefinitionEvent {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:inclusiveGateway")]
pub struct InclusiveGateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
    #[xml(attr = "default")]
    #[tia("InclusiveGatewayType",rg*="default","InclusiveGatewayTypeMut",s)]
    pub default: Option<String>,
}
impl DocumentElement for InclusiveGateway {
    fn element(&self) -> Element {
        Element::InclusiveGateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for InclusiveGateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `inclusiveGateway`
pub trait InclusiveGatewayType: GatewayType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `default`
    fn default(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(InclusiveGatewayType);
impl_downcast!(InclusiveGatewayType);
/// Mutable access to `inclusiveGateway`
pub trait InclusiveGatewayTypeMut:
    GatewayTypeMut + Downcast + Debug + Send + DynClone + InclusiveGatewayType
{
    /// Set value of attribute `default`
    fn set_default(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(InclusiveGatewayTypeMut);
impl_downcast!(InclusiveGatewayTypeMut);
impl Cast<dyn DefinitionsType> for InclusiveGateway {}
impl Cast<dyn DefinitionsTypeMut> for InclusiveGateway {}
impl Cast<dyn ImportType> for InclusiveGateway {}
impl Cast<dyn ImportTypeMut> for InclusiveGateway {}
impl Cast<dyn ActivityType> for InclusiveGateway {}
impl Cast<dyn ActivityTypeMut> for InclusiveGateway {}
impl Cast<dyn AdHocSubProcessType> for InclusiveGateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for InclusiveGateway {}
impl Cast<dyn ArtifactType> for InclusiveGateway {}
impl Cast<dyn ArtifactTypeMut> for InclusiveGateway {}
impl Cast<dyn AssignmentType> for InclusiveGateway {}
impl Cast<dyn AssignmentTypeMut> for InclusiveGateway {}
impl Cast<dyn AssociationType> for InclusiveGateway {}
impl Cast<dyn AssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn AuditingType> for InclusiveGateway {}
impl Cast<dyn AuditingTypeMut> for InclusiveGateway {}
impl Cast<dyn BaseElementType> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for InclusiveGateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for InclusiveGateway {}
impl Cast<dyn BoundaryEventType> for InclusiveGateway {}
impl Cast<dyn BoundaryEventTypeMut> for InclusiveGateway {}
impl Cast<dyn BusinessRuleTaskType> for InclusiveGateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn CallableElementType> for InclusiveGateway {}
impl Cast<dyn CallableElementTypeMut> for InclusiveGateway {}
impl Cast<dyn CallActivityType> for InclusiveGateway {}
impl Cast<dyn CallActivityTypeMut> for InclusiveGateway {}
impl Cast<dyn CallChoreographyType> for InclusiveGateway {}
impl Cast<dyn CallChoreographyTypeMut> for InclusiveGateway {}
impl Cast<dyn CallConversationType> for InclusiveGateway {}
impl Cast<dyn CallConversationTypeMut> for InclusiveGateway {}
impl Cast<dyn CancelEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn CatchEventType> for InclusiveGateway {}
impl Cast<dyn CatchEventTypeMut> for InclusiveGateway {}
impl Cast<dyn CategoryType> for InclusiveGateway {}
impl Cast<dyn CategoryTypeMut> for InclusiveGateway {}
impl Cast<dyn CategoryValueType> for InclusiveGateway {}
impl Cast<dyn CategoryValueTypeMut> for InclusiveGateway {}
impl Cast<dyn ChoreographyType> for InclusiveGateway {}
impl Cast<dyn ChoreographyTypeMut> for InclusiveGateway {}
impl Cast<dyn ChoreographyActivityType> for InclusiveGateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for InclusiveGateway {}
impl Cast<dyn ChoreographyTaskType> for InclusiveGateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn CollaborationType> for InclusiveGateway {}
impl Cast<dyn CollaborationTypeMut> for InclusiveGateway {}
impl Cast<dyn CompensateEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for InclusiveGateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn ComplexGatewayType> for InclusiveGateway {}
impl Cast<dyn ComplexGatewayTypeMut> for InclusiveGateway {}
impl Cast<dyn ConditionalEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn ConversationType> for InclusiveGateway {}
impl Cast<dyn ConversationTypeMut> for InclusiveGateway {}
impl Cast<dyn ConversationAssociationType> for InclusiveGateway {}
impl Cast<dyn ConversationAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn ConversationLinkType> for InclusiveGateway {}
impl Cast<dyn ConversationLinkTypeMut> for InclusiveGateway {}
impl Cast<dyn ConversationNodeType> for InclusiveGateway {}
impl Cast<dyn ConversationNodeTypeMut> for InclusiveGateway {}
impl Cast<dyn CorrelationKeyType> for InclusiveGateway {}
impl Cast<dyn CorrelationKeyTypeMut> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyType> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyBindingType> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for InclusiveGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for InclusiveGateway {}
impl Cast<dyn CorrelationSubscriptionType> for InclusiveGateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for InclusiveGateway {}
impl Cast<dyn DataAssociationType> for InclusiveGateway {}
impl Cast<dyn DataAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn DataInputType> for InclusiveGateway {}
impl Cast<dyn DataInputTypeMut> for InclusiveGateway {}
impl Cast<dyn DataInputAssociationType> for InclusiveGateway {}
impl Cast<dyn DataInputAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn DataObjectType> for InclusiveGateway {}
impl Cast<dyn DataObjectTypeMut> for InclusiveGateway {}
impl Cast<dyn DataObjectReferenceType> for InclusiveGateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for InclusiveGateway {}
impl Cast<dyn DataOutputType> for InclusiveGateway {}
impl Cast<dyn DataOutputTypeMut> for InclusiveGateway {}
impl Cast<dyn DataOutputAssociationType> for InclusiveGateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn DataStateType> for InclusiveGateway {}
impl Cast<dyn DataStateTypeMut> for InclusiveGateway {}
impl Cast<dyn DataStoreType> for InclusiveGateway {}
impl Cast<dyn DataStoreTypeMut> for InclusiveGateway {}
impl Cast<dyn DataStoreReferenceType> for InclusiveGateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for InclusiveGateway {}
impl Cast<dyn DocumentationType> for InclusiveGateway {}
impl Cast<dyn DocumentationTypeMut> for InclusiveGateway {}
impl Cast<dyn EndEventType> for InclusiveGateway {}
impl Cast<dyn EndEventTypeMut> for InclusiveGateway {}
impl Cast<dyn EndPointType> for InclusiveGateway {}
impl Cast<dyn EndPointTypeMut> for InclusiveGateway {}
impl Cast<dyn ErrorType> for InclusiveGateway {}
impl Cast<dyn ErrorTypeMut> for InclusiveGateway {}
impl Cast<dyn ErrorEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn EscalationType> for InclusiveGateway {}
impl Cast<dyn EscalationTypeMut> for InclusiveGateway {}
impl Cast<dyn EscalationEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn EventType> for InclusiveGateway {}
impl Cast<dyn EventTypeMut> for InclusiveGateway {}
impl Cast<dyn EventBasedGatewayType> for InclusiveGateway {}
impl Cast<dyn EventBasedGatewayTypeMut> for InclusiveGateway {}
impl Cast<dyn EventDefinitionType> for InclusiveGateway {}
impl Cast<dyn EventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn ExclusiveGatewayType> for InclusiveGateway {}
impl Cast<dyn ExclusiveGatewayTypeMut> for InclusiveGateway {}
impl Cast<dyn ExpressionType> for InclusiveGateway {}
impl Cast<dyn ExpressionTypeMut> for InclusiveGateway {}
impl Cast<dyn ExtensionType> for InclusiveGateway {}
impl Cast<dyn ExtensionTypeMut> for InclusiveGateway {}
impl Cast<dyn ExtensionElementsType> for InclusiveGateway {}
impl Cast<dyn ExtensionElementsTypeMut> for InclusiveGateway {}
impl Cast<dyn FlowElementType> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for InclusiveGateway {}
impl Cast<dyn FormalExpressionTypeMut> for InclusiveGateway {}
impl Cast<dyn GatewayType> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalChoreographyTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalConversationType> for InclusiveGateway {}
impl Cast<dyn GlobalConversationTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalManualTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalScriptTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GlobalUserTaskType> for InclusiveGateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn GroupType> for InclusiveGateway {}
impl Cast<dyn GroupTypeMut> for InclusiveGateway {}
impl Cast<dyn HumanPerformerType> for InclusiveGateway {}
impl Cast<dyn HumanPerformerTypeMut> for InclusiveGateway {}
impl Cast<dyn ImplicitThrowEventType> for InclusiveGateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for InclusiveGateway {}
impl Cast<dyn InclusiveGatewayType> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for InclusiveGateway {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputSetType> for InclusiveGateway {}
impl Cast<dyn InputSetTypeMut> for InclusiveGateway {}
impl Cast<dyn InterfaceType> for InclusiveGateway {}
impl Cast<dyn InterfaceTypeMut> for InclusiveGateway {}
impl Cast<dyn IntermediateCatchEventType> for InclusiveGateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for InclusiveGateway {}
impl Cast<dyn IntermediateThrowEventType> for InclusiveGateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for InclusiveGateway {}
impl Cast<dyn InputOutputBindingType> for InclusiveGateway {}
impl Cast<dyn InputOutputBindingTypeMut> for InclusiveGateway {}
impl Cast<dyn InputOutputSpecificationType> for InclusiveGateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for InclusiveGateway {}
impl Cast<dyn ItemDefinitionType> for InclusiveGateway {}
impl Cast<dyn ItemDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn LaneType> for InclusiveGateway {}
impl Cast<dyn LaneTypeMut> for InclusiveGateway {}
impl Cast<dyn LaneSetType> for InclusiveGateway {}
impl Cast<dyn LaneSetTypeMut> for InclusiveGateway {}
impl Cast<dyn LinkEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn LoopCharacteristicsType> for InclusiveGateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for InclusiveGateway {}
impl Cast<dyn ManualTaskType> for InclusiveGateway {}
impl Cast<dyn ManualTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn MessageType> for InclusiveGateway {}
impl Cast<dyn MessageTypeMut> for InclusiveGateway {}
impl Cast<dyn MessageEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn MessageFlowType> for InclusiveGateway {}
impl Cast<dyn MessageFlowTypeMut> for InclusiveGateway {}
impl Cast<dyn MessageFlowAssociationType> for InclusiveGateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn MonitoringType> for InclusiveGateway {}
impl Cast<dyn MonitoringTypeMut> for InclusiveGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for InclusiveGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for InclusiveGateway {}
impl Cast<dyn OperationType> for InclusiveGateway {}
impl Cast<dyn OperationTypeMut> for InclusiveGateway {}
impl Cast<dyn OutputSetType> for InclusiveGateway {}
impl Cast<dyn OutputSetTypeMut> for InclusiveGateway {}
impl Cast<dyn ParallelGatewayType> for InclusiveGateway {}
impl Cast<dyn ParallelGatewayTypeMut> for InclusiveGateway {}
impl Cast<dyn ParticipantType> for InclusiveGateway {}
impl Cast<dyn ParticipantTypeMut> for InclusiveGateway {}
impl Cast<dyn ParticipantAssociationType> for InclusiveGateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for InclusiveGateway {}
impl Cast<dyn ParticipantMultiplicityType> for InclusiveGateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for InclusiveGateway {}
impl Cast<dyn PartnerEntityType> for InclusiveGateway {}
impl Cast<dyn PartnerEntityTypeMut> for InclusiveGateway {}
impl Cast<dyn PartnerRoleType> for InclusiveGateway {}
impl Cast<dyn PartnerRoleTypeMut> for InclusiveGateway {}
impl Cast<dyn PerformerType> for InclusiveGateway {}
impl Cast<dyn PerformerTypeMut> for InclusiveGateway {}
impl Cast<dyn PotentialOwnerType> for InclusiveGateway {}
impl Cast<dyn PotentialOwnerTypeMut> for InclusiveGateway {}
impl Cast<dyn ProcessType> for InclusiveGateway {}
impl Cast<dyn ProcessTypeMut> for InclusiveGateway {}
impl Cast<dyn PropertyType> for InclusiveGateway {}
impl Cast<dyn PropertyTypeMut> for InclusiveGateway {}
impl Cast<dyn ReceiveTaskType> for InclusiveGateway {}
impl Cast<dyn ReceiveTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn RelationshipType> for InclusiveGateway {}
impl Cast<dyn RelationshipTypeMut> for InclusiveGateway {}
impl Cast<dyn RenderingType> for InclusiveGateway {}
impl Cast<dyn RenderingTypeMut> for InclusiveGateway {}
impl Cast<dyn ResourceType> for InclusiveGateway {}
impl Cast<dyn ResourceTypeMut> for InclusiveGateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for InclusiveGateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for InclusiveGateway {}
impl Cast<dyn ResourceParameterType> for InclusiveGateway {}
impl Cast<dyn ResourceParameterTypeMut> for InclusiveGateway {}
impl Cast<dyn ResourceParameterBindingType> for InclusiveGateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for InclusiveGateway {}
impl Cast<dyn ResourceRoleType> for InclusiveGateway {}
impl Cast<dyn ResourceRoleTypeMut> for InclusiveGateway {}
impl Cast<dyn RootElementType> for InclusiveGateway {}
impl Cast<dyn RootElementTypeMut> for InclusiveGateway {}
impl Cast<dyn ScriptTaskType> for InclusiveGateway {}
impl Cast<dyn ScriptTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn ScriptType> for InclusiveGateway {}
impl Cast<dyn ScriptTypeMut> for InclusiveGateway {}
impl Cast<dyn SendTaskType> for InclusiveGateway {}
impl Cast<dyn SendTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn SequenceFlowType> for InclusiveGateway {}
impl Cast<dyn SequenceFlowTypeMut> for InclusiveGateway {}
impl Cast<dyn ServiceTaskType> for InclusiveGateway {}
impl Cast<dyn ServiceTaskTypeMut> for InclusiveGateway {}
impl Cast<dyn SignalType> for InclusiveGateway {}
impl Cast<dyn SignalTypeMut> for InclusiveGateway {}
impl Cast<dyn SignalEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for InclusiveGateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for InclusiveGateway {}
impl Cast<dyn StartEventType> for InclusiveGateway {}
impl Cast<dyn StartEventTypeMut> for InclusiveGateway {}
impl Cast<dyn SubChoreographyType> for InclusiveGateway {}
impl Cast<dyn SubChoreographyTypeMut> for InclusiveGateway {}
impl Cast<dyn SubConversationType> for InclusiveGateway {}
impl Cast<dyn SubConversationTypeMut> for InclusiveGateway {}
impl Cast<dyn SubProcessType> for InclusiveGateway {}
impl Cast<dyn SubProcessTypeMut> for InclusiveGateway {}
impl Cast<dyn TaskType> for InclusiveGateway {}
impl Cast<dyn TaskTypeMut> for InclusiveGateway {}
impl Cast<dyn TerminateEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn TextAnnotationType> for InclusiveGateway {}
impl Cast<dyn TextAnnotationTypeMut> for InclusiveGateway {}
impl Cast<dyn TextType> for InclusiveGateway {}
impl Cast<dyn TextTypeMut> for InclusiveGateway {}
impl Cast<dyn ThrowEventType> for InclusiveGateway {}
impl Cast<dyn ThrowEventTypeMut> for InclusiveGateway {}
impl Cast<dyn TimerEventDefinitionType> for InclusiveGateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for InclusiveGateway {}
impl Cast<dyn TransactionType> for InclusiveGateway {}
impl Cast<dyn TransactionTypeMut> for InclusiveGateway {}
impl Cast<dyn UserTaskType> for InclusiveGateway {}
impl Cast<dyn UserTaskTypeMut> for InclusiveGateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:inputSet")]
pub struct InputSet {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("InputSetType",rg*="name","InputSetTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:dataInputRefs")]
    #[tia("InputSetType",rg*="data_input_refses","InputSetTypeMut",s,rmg*="data_input_refses_mut")]
    pub data_input_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:optionalInputRefs")]
    #[tia("InputSetType",rg*="optional_input_refses","InputSetTypeMut",s,rmg*="optional_input_refses_mut")]
    pub optional_input_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:whileExecutingInputRefs")]
    #[tia("InputSetType",rg*="while_executing_input_refses","InputSetTypeMut",s,rmg*="while_executing_input_refses_mut")]
    pub while_executing_input_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:outputSetRefs")]
    #[tia("InputSetType",rg*="output_set_refses","InputSetTypeMut",s,rmg*="output_set_refses_mut")]
    pub output_set_refses: Vec<String>,
}
impl DocumentElement for InputSet {
    fn element(&self) -> Element {
        Element::InputSet
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for InputSet {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `inputSet`
pub trait InputSetType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `dataInputRefs` child
    fn data_input_refses(&self) -> &Vec<String>;
    /// Get value of `optionalInputRefs` child
    fn optional_input_refses(&self) -> &Vec<String>;
    /// Get value of `whileExecutingInputRefs` child
    fn while_executing_input_refses(&self) -> &Vec<String>;
    /// Get value of `outputSetRefs` child
    fn output_set_refses(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(InputSetType);
impl_downcast!(InputSetType);
/// Mutable access to `inputSet`
pub trait InputSetTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + InputSetType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `dataInputRefs` child
    fn data_input_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `dataInputRefs` child
    fn set_data_input_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `optionalInputRefs` child
    fn optional_input_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `optionalInputRefs` child
    fn set_optional_input_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `whileExecutingInputRefs` child
    fn while_executing_input_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `whileExecutingInputRefs` child
    fn set_while_executing_input_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `outputSetRefs` child
    fn output_set_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `outputSetRefs` child
    fn set_output_set_refses(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(InputSetTypeMut);
impl_downcast!(InputSetTypeMut);
impl Cast<dyn DefinitionsType> for InputSet {}
impl Cast<dyn DefinitionsTypeMut> for InputSet {}
impl Cast<dyn ImportType> for InputSet {}
impl Cast<dyn ImportTypeMut> for InputSet {}
impl Cast<dyn ActivityType> for InputSet {}
impl Cast<dyn ActivityTypeMut> for InputSet {}
impl Cast<dyn AdHocSubProcessType> for InputSet {}
impl Cast<dyn AdHocSubProcessTypeMut> for InputSet {}
impl Cast<dyn ArtifactType> for InputSet {}
impl Cast<dyn ArtifactTypeMut> for InputSet {}
impl Cast<dyn AssignmentType> for InputSet {}
impl Cast<dyn AssignmentTypeMut> for InputSet {}
impl Cast<dyn AssociationType> for InputSet {}
impl Cast<dyn AssociationTypeMut> for InputSet {}
impl Cast<dyn AuditingType> for InputSet {}
impl Cast<dyn AuditingTypeMut> for InputSet {}
impl Cast<dyn BaseElementType> for InputSet {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for InputSet {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for InputSet {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for InputSet {}
impl Cast<dyn BoundaryEventType> for InputSet {}
impl Cast<dyn BoundaryEventTypeMut> for InputSet {}
impl Cast<dyn BusinessRuleTaskType> for InputSet {}
impl Cast<dyn BusinessRuleTaskTypeMut> for InputSet {}
impl Cast<dyn CallableElementType> for InputSet {}
impl Cast<dyn CallableElementTypeMut> for InputSet {}
impl Cast<dyn CallActivityType> for InputSet {}
impl Cast<dyn CallActivityTypeMut> for InputSet {}
impl Cast<dyn CallChoreographyType> for InputSet {}
impl Cast<dyn CallChoreographyTypeMut> for InputSet {}
impl Cast<dyn CallConversationType> for InputSet {}
impl Cast<dyn CallConversationTypeMut> for InputSet {}
impl Cast<dyn CancelEventDefinitionType> for InputSet {}
impl Cast<dyn CancelEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn CatchEventType> for InputSet {}
impl Cast<dyn CatchEventTypeMut> for InputSet {}
impl Cast<dyn CategoryType> for InputSet {}
impl Cast<dyn CategoryTypeMut> for InputSet {}
impl Cast<dyn CategoryValueType> for InputSet {}
impl Cast<dyn CategoryValueTypeMut> for InputSet {}
impl Cast<dyn ChoreographyType> for InputSet {}
impl Cast<dyn ChoreographyTypeMut> for InputSet {}
impl Cast<dyn ChoreographyActivityType> for InputSet {}
impl Cast<dyn ChoreographyActivityTypeMut> for InputSet {}
impl Cast<dyn ChoreographyTaskType> for InputSet {}
impl Cast<dyn ChoreographyTaskTypeMut> for InputSet {}
impl Cast<dyn CollaborationType> for InputSet {}
impl Cast<dyn CollaborationTypeMut> for InputSet {}
impl Cast<dyn CompensateEventDefinitionType> for InputSet {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn ComplexBehaviorDefinitionType> for InputSet {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for InputSet {}
impl Cast<dyn ComplexGatewayType> for InputSet {}
impl Cast<dyn ComplexGatewayTypeMut> for InputSet {}
impl Cast<dyn ConditionalEventDefinitionType> for InputSet {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn ConversationType> for InputSet {}
impl Cast<dyn ConversationTypeMut> for InputSet {}
impl Cast<dyn ConversationAssociationType> for InputSet {}
impl Cast<dyn ConversationAssociationTypeMut> for InputSet {}
impl Cast<dyn ConversationLinkType> for InputSet {}
impl Cast<dyn ConversationLinkTypeMut> for InputSet {}
impl Cast<dyn ConversationNodeType> for InputSet {}
impl Cast<dyn ConversationNodeTypeMut> for InputSet {}
impl Cast<dyn CorrelationKeyType> for InputSet {}
impl Cast<dyn CorrelationKeyTypeMut> for InputSet {}
impl Cast<dyn CorrelationPropertyType> for InputSet {}
impl Cast<dyn CorrelationPropertyTypeMut> for InputSet {}
impl Cast<dyn CorrelationPropertyBindingType> for InputSet {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for InputSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for InputSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for InputSet {}
impl Cast<dyn CorrelationSubscriptionType> for InputSet {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for InputSet {}
impl Cast<dyn DataAssociationType> for InputSet {}
impl Cast<dyn DataAssociationTypeMut> for InputSet {}
impl Cast<dyn DataInputType> for InputSet {}
impl Cast<dyn DataInputTypeMut> for InputSet {}
impl Cast<dyn DataInputAssociationType> for InputSet {}
impl Cast<dyn DataInputAssociationTypeMut> for InputSet {}
impl Cast<dyn DataObjectType> for InputSet {}
impl Cast<dyn DataObjectTypeMut> for InputSet {}
impl Cast<dyn DataObjectReferenceType> for InputSet {}
impl Cast<dyn DataObjectReferenceTypeMut> for InputSet {}
impl Cast<dyn DataOutputType> for InputSet {}
impl Cast<dyn DataOutputTypeMut> for InputSet {}
impl Cast<dyn DataOutputAssociationType> for InputSet {}
impl Cast<dyn DataOutputAssociationTypeMut> for InputSet {}
impl Cast<dyn DataStateType> for InputSet {}
impl Cast<dyn DataStateTypeMut> for InputSet {}
impl Cast<dyn DataStoreType> for InputSet {}
impl Cast<dyn DataStoreTypeMut> for InputSet {}
impl Cast<dyn DataStoreReferenceType> for InputSet {}
impl Cast<dyn DataStoreReferenceTypeMut> for InputSet {}
impl Cast<dyn DocumentationType> for InputSet {}
impl Cast<dyn DocumentationTypeMut> for InputSet {}
impl Cast<dyn EndEventType> for InputSet {}
impl Cast<dyn EndEventTypeMut> for InputSet {}
impl Cast<dyn EndPointType> for InputSet {}
impl Cast<dyn EndPointTypeMut> for InputSet {}
impl Cast<dyn ErrorType> for InputSet {}
impl Cast<dyn ErrorTypeMut> for InputSet {}
impl Cast<dyn ErrorEventDefinitionType> for InputSet {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn EscalationType> for InputSet {}
impl Cast<dyn EscalationTypeMut> for InputSet {}
impl Cast<dyn EscalationEventDefinitionType> for InputSet {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn EventType> for InputSet {}
impl Cast<dyn EventTypeMut> for InputSet {}
impl Cast<dyn EventBasedGatewayType> for InputSet {}
impl Cast<dyn EventBasedGatewayTypeMut> for InputSet {}
impl Cast<dyn EventDefinitionType> for InputSet {}
impl Cast<dyn EventDefinitionTypeMut> for InputSet {}
impl Cast<dyn ExclusiveGatewayType> for InputSet {}
impl Cast<dyn ExclusiveGatewayTypeMut> for InputSet {}
impl Cast<dyn ExpressionType> for InputSet {}
impl Cast<dyn ExpressionTypeMut> for InputSet {}
impl Cast<dyn ExtensionType> for InputSet {}
impl Cast<dyn ExtensionTypeMut> for InputSet {}
impl Cast<dyn ExtensionElementsType> for InputSet {}
impl Cast<dyn ExtensionElementsTypeMut> for InputSet {}
impl Cast<dyn FlowElementType> for InputSet {}
impl Cast<dyn FlowElementTypeMut> for InputSet {}
impl Cast<dyn FlowNodeType> for InputSet {}
impl Cast<dyn FlowNodeTypeMut> for InputSet {}
impl Cast<dyn FormalExpressionType> for InputSet {}
impl Cast<dyn FormalExpressionTypeMut> for InputSet {}
impl Cast<dyn GatewayType> for InputSet {}
impl Cast<dyn GatewayTypeMut> for InputSet {}
impl Cast<dyn GlobalBusinessRuleTaskType> for InputSet {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for InputSet {}
impl Cast<dyn GlobalChoreographyTaskType> for InputSet {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for InputSet {}
impl Cast<dyn GlobalConversationType> for InputSet {}
impl Cast<dyn GlobalConversationTypeMut> for InputSet {}
impl Cast<dyn GlobalManualTaskType> for InputSet {}
impl Cast<dyn GlobalManualTaskTypeMut> for InputSet {}
impl Cast<dyn GlobalScriptTaskType> for InputSet {}
impl Cast<dyn GlobalScriptTaskTypeMut> for InputSet {}
impl Cast<dyn GlobalTaskType> for InputSet {}
impl Cast<dyn GlobalTaskTypeMut> for InputSet {}
impl Cast<dyn GlobalUserTaskType> for InputSet {}
impl Cast<dyn GlobalUserTaskTypeMut> for InputSet {}
impl Cast<dyn GroupType> for InputSet {}
impl Cast<dyn GroupTypeMut> for InputSet {}
impl Cast<dyn HumanPerformerType> for InputSet {}
impl Cast<dyn HumanPerformerTypeMut> for InputSet {}
impl Cast<dyn ImplicitThrowEventType> for InputSet {}
impl Cast<dyn ImplicitThrowEventTypeMut> for InputSet {}
impl Cast<dyn InclusiveGatewayType> for InputSet {}
impl Cast<dyn InclusiveGatewayTypeMut> for InputSet {}
impl Cast<dyn InputSetType> for InputSet {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputSetTypeMut> for InputSet {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InterfaceType> for InputSet {}
impl Cast<dyn InterfaceTypeMut> for InputSet {}
impl Cast<dyn IntermediateCatchEventType> for InputSet {}
impl Cast<dyn IntermediateCatchEventTypeMut> for InputSet {}
impl Cast<dyn IntermediateThrowEventType> for InputSet {}
impl Cast<dyn IntermediateThrowEventTypeMut> for InputSet {}
impl Cast<dyn InputOutputBindingType> for InputSet {}
impl Cast<dyn InputOutputBindingTypeMut> for InputSet {}
impl Cast<dyn InputOutputSpecificationType> for InputSet {}
impl Cast<dyn InputOutputSpecificationTypeMut> for InputSet {}
impl Cast<dyn ItemDefinitionType> for InputSet {}
impl Cast<dyn ItemDefinitionTypeMut> for InputSet {}
impl Cast<dyn LaneType> for InputSet {}
impl Cast<dyn LaneTypeMut> for InputSet {}
impl Cast<dyn LaneSetType> for InputSet {}
impl Cast<dyn LaneSetTypeMut> for InputSet {}
impl Cast<dyn LinkEventDefinitionType> for InputSet {}
impl Cast<dyn LinkEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn LoopCharacteristicsType> for InputSet {}
impl Cast<dyn LoopCharacteristicsTypeMut> for InputSet {}
impl Cast<dyn ManualTaskType> for InputSet {}
impl Cast<dyn ManualTaskTypeMut> for InputSet {}
impl Cast<dyn MessageType> for InputSet {}
impl Cast<dyn MessageTypeMut> for InputSet {}
impl Cast<dyn MessageEventDefinitionType> for InputSet {}
impl Cast<dyn MessageEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn MessageFlowType> for InputSet {}
impl Cast<dyn MessageFlowTypeMut> for InputSet {}
impl Cast<dyn MessageFlowAssociationType> for InputSet {}
impl Cast<dyn MessageFlowAssociationTypeMut> for InputSet {}
impl Cast<dyn MonitoringType> for InputSet {}
impl Cast<dyn MonitoringTypeMut> for InputSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for InputSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for InputSet {}
impl Cast<dyn OperationType> for InputSet {}
impl Cast<dyn OperationTypeMut> for InputSet {}
impl Cast<dyn OutputSetType> for InputSet {}
impl Cast<dyn OutputSetTypeMut> for InputSet {}
impl Cast<dyn ParallelGatewayType> for InputSet {}
impl Cast<dyn ParallelGatewayTypeMut> for InputSet {}
impl Cast<dyn ParticipantType> for InputSet {}
impl Cast<dyn ParticipantTypeMut> for InputSet {}
impl Cast<dyn ParticipantAssociationType> for InputSet {}
impl Cast<dyn ParticipantAssociationTypeMut> for InputSet {}
impl Cast<dyn ParticipantMultiplicityType> for InputSet {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for InputSet {}
impl Cast<dyn PartnerEntityType> for InputSet {}
impl Cast<dyn PartnerEntityTypeMut> for InputSet {}
impl Cast<dyn PartnerRoleType> for InputSet {}
impl Cast<dyn PartnerRoleTypeMut> for InputSet {}
impl Cast<dyn PerformerType> for InputSet {}
impl Cast<dyn PerformerTypeMut> for InputSet {}
impl Cast<dyn PotentialOwnerType> for InputSet {}
impl Cast<dyn PotentialOwnerTypeMut> for InputSet {}
impl Cast<dyn ProcessType> for InputSet {}
impl Cast<dyn ProcessTypeMut> for InputSet {}
impl Cast<dyn PropertyType> for InputSet {}
impl Cast<dyn PropertyTypeMut> for InputSet {}
impl Cast<dyn ReceiveTaskType> for InputSet {}
impl Cast<dyn ReceiveTaskTypeMut> for InputSet {}
impl Cast<dyn RelationshipType> for InputSet {}
impl Cast<dyn RelationshipTypeMut> for InputSet {}
impl Cast<dyn RenderingType> for InputSet {}
impl Cast<dyn RenderingTypeMut> for InputSet {}
impl Cast<dyn ResourceType> for InputSet {}
impl Cast<dyn ResourceTypeMut> for InputSet {}
impl Cast<dyn ResourceAssignmentExpressionType> for InputSet {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for InputSet {}
impl Cast<dyn ResourceParameterType> for InputSet {}
impl Cast<dyn ResourceParameterTypeMut> for InputSet {}
impl Cast<dyn ResourceParameterBindingType> for InputSet {}
impl Cast<dyn ResourceParameterBindingTypeMut> for InputSet {}
impl Cast<dyn ResourceRoleType> for InputSet {}
impl Cast<dyn ResourceRoleTypeMut> for InputSet {}
impl Cast<dyn RootElementType> for InputSet {}
impl Cast<dyn RootElementTypeMut> for InputSet {}
impl Cast<dyn ScriptTaskType> for InputSet {}
impl Cast<dyn ScriptTaskTypeMut> for InputSet {}
impl Cast<dyn ScriptType> for InputSet {}
impl Cast<dyn ScriptTypeMut> for InputSet {}
impl Cast<dyn SendTaskType> for InputSet {}
impl Cast<dyn SendTaskTypeMut> for InputSet {}
impl Cast<dyn SequenceFlowType> for InputSet {}
impl Cast<dyn SequenceFlowTypeMut> for InputSet {}
impl Cast<dyn ServiceTaskType> for InputSet {}
impl Cast<dyn ServiceTaskTypeMut> for InputSet {}
impl Cast<dyn SignalType> for InputSet {}
impl Cast<dyn SignalTypeMut> for InputSet {}
impl Cast<dyn SignalEventDefinitionType> for InputSet {}
impl Cast<dyn SignalEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn StandardLoopCharacteristicsType> for InputSet {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for InputSet {}
impl Cast<dyn StartEventType> for InputSet {}
impl Cast<dyn StartEventTypeMut> for InputSet {}
impl Cast<dyn SubChoreographyType> for InputSet {}
impl Cast<dyn SubChoreographyTypeMut> for InputSet {}
impl Cast<dyn SubConversationType> for InputSet {}
impl Cast<dyn SubConversationTypeMut> for InputSet {}
impl Cast<dyn SubProcessType> for InputSet {}
impl Cast<dyn SubProcessTypeMut> for InputSet {}
impl Cast<dyn TaskType> for InputSet {}
impl Cast<dyn TaskTypeMut> for InputSet {}
impl Cast<dyn TerminateEventDefinitionType> for InputSet {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn TextAnnotationType> for InputSet {}
impl Cast<dyn TextAnnotationTypeMut> for InputSet {}
impl Cast<dyn TextType> for InputSet {}
impl Cast<dyn TextTypeMut> for InputSet {}
impl Cast<dyn ThrowEventType> for InputSet {}
impl Cast<dyn ThrowEventTypeMut> for InputSet {}
impl Cast<dyn TimerEventDefinitionType> for InputSet {}
impl Cast<dyn TimerEventDefinitionTypeMut> for InputSet {}
impl Cast<dyn TransactionType> for InputSet {}
impl Cast<dyn TransactionTypeMut> for InputSet {}
impl Cast<dyn UserTaskType> for InputSet {}
impl Cast<dyn UserTaskTypeMut> for InputSet {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:interface")]
pub struct Interface {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("InterfaceType",rg*="name","InterfaceTypeMut",s)]
    pub name: String,
    #[xml(attr = "implementationRef")]
    #[tia("InterfaceType",rg*="implementation_ref","InterfaceTypeMut",s)]
    pub implementation_ref: Option<String>,
    #[xml(child = "bpmn:operation")]
    #[tia("InterfaceType",rg*="operations","InterfaceTypeMut",s,rmg*="operations_mut")]
    pub operations: Vec<Operation>,
}
impl DocumentElement for Interface {
    fn element(&self) -> Element {
        Element::Interface
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Interface {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.operations.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.operations.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Interface {}
impl RootElementTypeMut for Interface {}
//

/// Access to `interface`
pub trait InterfaceType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &String;
    /// Get value of attribute `implementationRef`
    fn implementation_ref(&self) -> &Option<String>;
    /// Get value of `operation` child
    fn operations(&self) -> &Vec<Operation>;
}
dyn_clone::clone_trait_object!(InterfaceType);
impl_downcast!(InterfaceType);
/// Mutable access to `interface`
pub trait InterfaceTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + InterfaceType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: String);
    /// Set value of attribute `implementationRef`
    fn set_implementation_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `operation` child
    fn operations_mut(&mut self) -> &mut Vec<Operation>;
    /// Set value of `operation` child
    fn set_operations(&mut self, value: Vec<Operation>);
}
dyn_clone::clone_trait_object!(InterfaceTypeMut);
impl_downcast!(InterfaceTypeMut);
impl Cast<dyn DefinitionsType> for Interface {}
impl Cast<dyn DefinitionsTypeMut> for Interface {}
impl Cast<dyn ImportType> for Interface {}
impl Cast<dyn ImportTypeMut> for Interface {}
impl Cast<dyn ActivityType> for Interface {}
impl Cast<dyn ActivityTypeMut> for Interface {}
impl Cast<dyn AdHocSubProcessType> for Interface {}
impl Cast<dyn AdHocSubProcessTypeMut> for Interface {}
impl Cast<dyn ArtifactType> for Interface {}
impl Cast<dyn ArtifactTypeMut> for Interface {}
impl Cast<dyn AssignmentType> for Interface {}
impl Cast<dyn AssignmentTypeMut> for Interface {}
impl Cast<dyn AssociationType> for Interface {}
impl Cast<dyn AssociationTypeMut> for Interface {}
impl Cast<dyn AuditingType> for Interface {}
impl Cast<dyn AuditingTypeMut> for Interface {}
impl Cast<dyn BaseElementType> for Interface {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Interface {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Interface {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Interface {}
impl Cast<dyn BoundaryEventType> for Interface {}
impl Cast<dyn BoundaryEventTypeMut> for Interface {}
impl Cast<dyn BusinessRuleTaskType> for Interface {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Interface {}
impl Cast<dyn CallableElementType> for Interface {}
impl Cast<dyn CallableElementTypeMut> for Interface {}
impl Cast<dyn CallActivityType> for Interface {}
impl Cast<dyn CallActivityTypeMut> for Interface {}
impl Cast<dyn CallChoreographyType> for Interface {}
impl Cast<dyn CallChoreographyTypeMut> for Interface {}
impl Cast<dyn CallConversationType> for Interface {}
impl Cast<dyn CallConversationTypeMut> for Interface {}
impl Cast<dyn CancelEventDefinitionType> for Interface {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Interface {}
impl Cast<dyn CatchEventType> for Interface {}
impl Cast<dyn CatchEventTypeMut> for Interface {}
impl Cast<dyn CategoryType> for Interface {}
impl Cast<dyn CategoryTypeMut> for Interface {}
impl Cast<dyn CategoryValueType> for Interface {}
impl Cast<dyn CategoryValueTypeMut> for Interface {}
impl Cast<dyn ChoreographyType> for Interface {}
impl Cast<dyn ChoreographyTypeMut> for Interface {}
impl Cast<dyn ChoreographyActivityType> for Interface {}
impl Cast<dyn ChoreographyActivityTypeMut> for Interface {}
impl Cast<dyn ChoreographyTaskType> for Interface {}
impl Cast<dyn ChoreographyTaskTypeMut> for Interface {}
impl Cast<dyn CollaborationType> for Interface {}
impl Cast<dyn CollaborationTypeMut> for Interface {}
impl Cast<dyn CompensateEventDefinitionType> for Interface {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Interface {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Interface {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Interface {}
impl Cast<dyn ComplexGatewayType> for Interface {}
impl Cast<dyn ComplexGatewayTypeMut> for Interface {}
impl Cast<dyn ConditionalEventDefinitionType> for Interface {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Interface {}
impl Cast<dyn ConversationType> for Interface {}
impl Cast<dyn ConversationTypeMut> for Interface {}
impl Cast<dyn ConversationAssociationType> for Interface {}
impl Cast<dyn ConversationAssociationTypeMut> for Interface {}
impl Cast<dyn ConversationLinkType> for Interface {}
impl Cast<dyn ConversationLinkTypeMut> for Interface {}
impl Cast<dyn ConversationNodeType> for Interface {}
impl Cast<dyn ConversationNodeTypeMut> for Interface {}
impl Cast<dyn CorrelationKeyType> for Interface {}
impl Cast<dyn CorrelationKeyTypeMut> for Interface {}
impl Cast<dyn CorrelationPropertyType> for Interface {}
impl Cast<dyn CorrelationPropertyTypeMut> for Interface {}
impl Cast<dyn CorrelationPropertyBindingType> for Interface {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Interface {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Interface {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Interface {}
impl Cast<dyn CorrelationSubscriptionType> for Interface {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Interface {}
impl Cast<dyn DataAssociationType> for Interface {}
impl Cast<dyn DataAssociationTypeMut> for Interface {}
impl Cast<dyn DataInputType> for Interface {}
impl Cast<dyn DataInputTypeMut> for Interface {}
impl Cast<dyn DataInputAssociationType> for Interface {}
impl Cast<dyn DataInputAssociationTypeMut> for Interface {}
impl Cast<dyn DataObjectType> for Interface {}
impl Cast<dyn DataObjectTypeMut> for Interface {}
impl Cast<dyn DataObjectReferenceType> for Interface {}
impl Cast<dyn DataObjectReferenceTypeMut> for Interface {}
impl Cast<dyn DataOutputType> for Interface {}
impl Cast<dyn DataOutputTypeMut> for Interface {}
impl Cast<dyn DataOutputAssociationType> for Interface {}
impl Cast<dyn DataOutputAssociationTypeMut> for Interface {}
impl Cast<dyn DataStateType> for Interface {}
impl Cast<dyn DataStateTypeMut> for Interface {}
impl Cast<dyn DataStoreType> for Interface {}
impl Cast<dyn DataStoreTypeMut> for Interface {}
impl Cast<dyn DataStoreReferenceType> for Interface {}
impl Cast<dyn DataStoreReferenceTypeMut> for Interface {}
impl Cast<dyn DocumentationType> for Interface {}
impl Cast<dyn DocumentationTypeMut> for Interface {}
impl Cast<dyn EndEventType> for Interface {}
impl Cast<dyn EndEventTypeMut> for Interface {}
impl Cast<dyn EndPointType> for Interface {}
impl Cast<dyn EndPointTypeMut> for Interface {}
impl Cast<dyn ErrorType> for Interface {}
impl Cast<dyn ErrorTypeMut> for Interface {}
impl Cast<dyn ErrorEventDefinitionType> for Interface {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Interface {}
impl Cast<dyn EscalationType> for Interface {}
impl Cast<dyn EscalationTypeMut> for Interface {}
impl Cast<dyn EscalationEventDefinitionType> for Interface {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Interface {}
impl Cast<dyn EventType> for Interface {}
impl Cast<dyn EventTypeMut> for Interface {}
impl Cast<dyn EventBasedGatewayType> for Interface {}
impl Cast<dyn EventBasedGatewayTypeMut> for Interface {}
impl Cast<dyn EventDefinitionType> for Interface {}
impl Cast<dyn EventDefinitionTypeMut> for Interface {}
impl Cast<dyn ExclusiveGatewayType> for Interface {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Interface {}
impl Cast<dyn ExpressionType> for Interface {}
impl Cast<dyn ExpressionTypeMut> for Interface {}
impl Cast<dyn ExtensionType> for Interface {}
impl Cast<dyn ExtensionTypeMut> for Interface {}
impl Cast<dyn ExtensionElementsType> for Interface {}
impl Cast<dyn ExtensionElementsTypeMut> for Interface {}
impl Cast<dyn FlowElementType> for Interface {}
impl Cast<dyn FlowElementTypeMut> for Interface {}
impl Cast<dyn FlowNodeType> for Interface {}
impl Cast<dyn FlowNodeTypeMut> for Interface {}
impl Cast<dyn FormalExpressionType> for Interface {}
impl Cast<dyn FormalExpressionTypeMut> for Interface {}
impl Cast<dyn GatewayType> for Interface {}
impl Cast<dyn GatewayTypeMut> for Interface {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Interface {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Interface {}
impl Cast<dyn GlobalChoreographyTaskType> for Interface {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Interface {}
impl Cast<dyn GlobalConversationType> for Interface {}
impl Cast<dyn GlobalConversationTypeMut> for Interface {}
impl Cast<dyn GlobalManualTaskType> for Interface {}
impl Cast<dyn GlobalManualTaskTypeMut> for Interface {}
impl Cast<dyn GlobalScriptTaskType> for Interface {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Interface {}
impl Cast<dyn GlobalTaskType> for Interface {}
impl Cast<dyn GlobalTaskTypeMut> for Interface {}
impl Cast<dyn GlobalUserTaskType> for Interface {}
impl Cast<dyn GlobalUserTaskTypeMut> for Interface {}
impl Cast<dyn GroupType> for Interface {}
impl Cast<dyn GroupTypeMut> for Interface {}
impl Cast<dyn HumanPerformerType> for Interface {}
impl Cast<dyn HumanPerformerTypeMut> for Interface {}
impl Cast<dyn ImplicitThrowEventType> for Interface {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Interface {}
impl Cast<dyn InclusiveGatewayType> for Interface {}
impl Cast<dyn InclusiveGatewayTypeMut> for Interface {}
impl Cast<dyn InputSetType> for Interface {}
impl Cast<dyn InputSetTypeMut> for Interface {}
impl Cast<dyn InterfaceType> for Interface {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InterfaceTypeMut> for Interface {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn IntermediateCatchEventType> for Interface {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Interface {}
impl Cast<dyn IntermediateThrowEventType> for Interface {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Interface {}
impl Cast<dyn InputOutputBindingType> for Interface {}
impl Cast<dyn InputOutputBindingTypeMut> for Interface {}
impl Cast<dyn InputOutputSpecificationType> for Interface {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Interface {}
impl Cast<dyn ItemDefinitionType> for Interface {}
impl Cast<dyn ItemDefinitionTypeMut> for Interface {}
impl Cast<dyn LaneType> for Interface {}
impl Cast<dyn LaneTypeMut> for Interface {}
impl Cast<dyn LaneSetType> for Interface {}
impl Cast<dyn LaneSetTypeMut> for Interface {}
impl Cast<dyn LinkEventDefinitionType> for Interface {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Interface {}
impl Cast<dyn LoopCharacteristicsType> for Interface {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Interface {}
impl Cast<dyn ManualTaskType> for Interface {}
impl Cast<dyn ManualTaskTypeMut> for Interface {}
impl Cast<dyn MessageType> for Interface {}
impl Cast<dyn MessageTypeMut> for Interface {}
impl Cast<dyn MessageEventDefinitionType> for Interface {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Interface {}
impl Cast<dyn MessageFlowType> for Interface {}
impl Cast<dyn MessageFlowTypeMut> for Interface {}
impl Cast<dyn MessageFlowAssociationType> for Interface {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Interface {}
impl Cast<dyn MonitoringType> for Interface {}
impl Cast<dyn MonitoringTypeMut> for Interface {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Interface {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Interface {}
impl Cast<dyn OperationType> for Interface {}
impl Cast<dyn OperationTypeMut> for Interface {}
impl Cast<dyn OutputSetType> for Interface {}
impl Cast<dyn OutputSetTypeMut> for Interface {}
impl Cast<dyn ParallelGatewayType> for Interface {}
impl Cast<dyn ParallelGatewayTypeMut> for Interface {}
impl Cast<dyn ParticipantType> for Interface {}
impl Cast<dyn ParticipantTypeMut> for Interface {}
impl Cast<dyn ParticipantAssociationType> for Interface {}
impl Cast<dyn ParticipantAssociationTypeMut> for Interface {}
impl Cast<dyn ParticipantMultiplicityType> for Interface {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Interface {}
impl Cast<dyn PartnerEntityType> for Interface {}
impl Cast<dyn PartnerEntityTypeMut> for Interface {}
impl Cast<dyn PartnerRoleType> for Interface {}
impl Cast<dyn PartnerRoleTypeMut> for Interface {}
impl Cast<dyn PerformerType> for Interface {}
impl Cast<dyn PerformerTypeMut> for Interface {}
impl Cast<dyn PotentialOwnerType> for Interface {}
impl Cast<dyn PotentialOwnerTypeMut> for Interface {}
impl Cast<dyn ProcessType> for Interface {}
impl Cast<dyn ProcessTypeMut> for Interface {}
impl Cast<dyn PropertyType> for Interface {}
impl Cast<dyn PropertyTypeMut> for Interface {}
impl Cast<dyn ReceiveTaskType> for Interface {}
impl Cast<dyn ReceiveTaskTypeMut> for Interface {}
impl Cast<dyn RelationshipType> for Interface {}
impl Cast<dyn RelationshipTypeMut> for Interface {}
impl Cast<dyn RenderingType> for Interface {}
impl Cast<dyn RenderingTypeMut> for Interface {}
impl Cast<dyn ResourceType> for Interface {}
impl Cast<dyn ResourceTypeMut> for Interface {}
impl Cast<dyn ResourceAssignmentExpressionType> for Interface {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Interface {}
impl Cast<dyn ResourceParameterType> for Interface {}
impl Cast<dyn ResourceParameterTypeMut> for Interface {}
impl Cast<dyn ResourceParameterBindingType> for Interface {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Interface {}
impl Cast<dyn ResourceRoleType> for Interface {}
impl Cast<dyn ResourceRoleTypeMut> for Interface {}
impl Cast<dyn RootElementType> for Interface {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Interface {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Interface {}
impl Cast<dyn ScriptTaskTypeMut> for Interface {}
impl Cast<dyn ScriptType> for Interface {}
impl Cast<dyn ScriptTypeMut> for Interface {}
impl Cast<dyn SendTaskType> for Interface {}
impl Cast<dyn SendTaskTypeMut> for Interface {}
impl Cast<dyn SequenceFlowType> for Interface {}
impl Cast<dyn SequenceFlowTypeMut> for Interface {}
impl Cast<dyn ServiceTaskType> for Interface {}
impl Cast<dyn ServiceTaskTypeMut> for Interface {}
impl Cast<dyn SignalType> for Interface {}
impl Cast<dyn SignalTypeMut> for Interface {}
impl Cast<dyn SignalEventDefinitionType> for Interface {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Interface {}
impl Cast<dyn StandardLoopCharacteristicsType> for Interface {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Interface {}
impl Cast<dyn StartEventType> for Interface {}
impl Cast<dyn StartEventTypeMut> for Interface {}
impl Cast<dyn SubChoreographyType> for Interface {}
impl Cast<dyn SubChoreographyTypeMut> for Interface {}
impl Cast<dyn SubConversationType> for Interface {}
impl Cast<dyn SubConversationTypeMut> for Interface {}
impl Cast<dyn SubProcessType> for Interface {}
impl Cast<dyn SubProcessTypeMut> for Interface {}
impl Cast<dyn TaskType> for Interface {}
impl Cast<dyn TaskTypeMut> for Interface {}
impl Cast<dyn TerminateEventDefinitionType> for Interface {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Interface {}
impl Cast<dyn TextAnnotationType> for Interface {}
impl Cast<dyn TextAnnotationTypeMut> for Interface {}
impl Cast<dyn TextType> for Interface {}
impl Cast<dyn TextTypeMut> for Interface {}
impl Cast<dyn ThrowEventType> for Interface {}
impl Cast<dyn ThrowEventTypeMut> for Interface {}
impl Cast<dyn TimerEventDefinitionType> for Interface {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Interface {}
impl Cast<dyn TransactionType> for Interface {}
impl Cast<dyn TransactionTypeMut> for Interface {}
impl Cast<dyn UserTaskType> for Interface {}
impl Cast<dyn UserTaskTypeMut> for Interface {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:intermediateCatchEvent")]
pub struct IntermediateCatchEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(attr = "parallelMultiple")]
    #[tia("CatchEventType",rg*="parallel_multiple","CatchEventTypeMut",s)]
    pub parallel_multiple: Option<bool>,
    #[xml(child = "bpmn:dataOutput")]
    #[tia("CatchEventType",rg*="data_outputs","CatchEventTypeMut",s,rmg*="data_outputs_mut")]
    pub data_outputs: Vec<DataOutput>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("CatchEventType",rg*="data_output_associations","CatchEventTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:outputSet")]
    #[tia("CatchEventType",rg*="output_set","CatchEventTypeMut",s,rmg*="output_set_mut")]
    pub output_set: Option<OutputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("CatchEventType",rg*="event_definitions","CatchEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("CatchEventType",rg*="event_definition_refs","CatchEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
}
impl DocumentElement for IntermediateCatchEvent {
    fn element(&self) -> Element {
        Element::IntermediateCatchEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for IntermediateCatchEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl IntermediateCatchEventType for IntermediateCatchEvent {}
impl IntermediateCatchEventTypeMut for IntermediateCatchEvent {}
//

/// Access to `intermediateCatchEvent`
pub trait IntermediateCatchEventType: CatchEventType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(IntermediateCatchEventType);
impl_downcast!(IntermediateCatchEventType);
/// Mutable access to `intermediateCatchEvent`
pub trait IntermediateCatchEventTypeMut:
    CatchEventTypeMut + Downcast + Debug + Send + DynClone + IntermediateCatchEventType
{
}
dyn_clone::clone_trait_object!(IntermediateCatchEventTypeMut);
impl_downcast!(IntermediateCatchEventTypeMut);
impl Cast<dyn DefinitionsType> for IntermediateCatchEvent {}
impl Cast<dyn DefinitionsTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ImportType> for IntermediateCatchEvent {}
impl Cast<dyn ImportTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ActivityType> for IntermediateCatchEvent {}
impl Cast<dyn ActivityTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn AdHocSubProcessType> for IntermediateCatchEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ArtifactType> for IntermediateCatchEvent {}
impl Cast<dyn ArtifactTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn AssignmentType> for IntermediateCatchEvent {}
impl Cast<dyn AssignmentTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn AssociationType> for IntermediateCatchEvent {}
impl Cast<dyn AssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn AuditingType> for IntermediateCatchEvent {}
impl Cast<dyn AuditingTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn BaseElementType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for IntermediateCatchEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn BoundaryEventType> for IntermediateCatchEvent {}
impl Cast<dyn BoundaryEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn BusinessRuleTaskType> for IntermediateCatchEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CallableElementType> for IntermediateCatchEvent {}
impl Cast<dyn CallableElementTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CallActivityType> for IntermediateCatchEvent {}
impl Cast<dyn CallActivityTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CallChoreographyType> for IntermediateCatchEvent {}
impl Cast<dyn CallChoreographyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CallConversationType> for IntermediateCatchEvent {}
impl Cast<dyn CallConversationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CancelEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CatchEventType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CatchEventTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryType> for IntermediateCatchEvent {}
impl Cast<dyn CategoryTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CategoryValueType> for IntermediateCatchEvent {}
impl Cast<dyn CategoryValueTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyType> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyActivityType> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyTaskType> for IntermediateCatchEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CollaborationType> for IntermediateCatchEvent {}
impl Cast<dyn CollaborationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CompensateEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ComplexGatewayType> for IntermediateCatchEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ConversationType> for IntermediateCatchEvent {}
impl Cast<dyn ConversationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ConversationAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ConversationLinkType> for IntermediateCatchEvent {}
impl Cast<dyn ConversationLinkTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ConversationNodeType> for IntermediateCatchEvent {}
impl Cast<dyn ConversationNodeTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationKeyType> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyType> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationSubscriptionType> for IntermediateCatchEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn DataAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataInputType> for IntermediateCatchEvent {}
impl Cast<dyn DataInputTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataInputAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataObjectType> for IntermediateCatchEvent {}
impl Cast<dyn DataObjectTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataObjectReferenceType> for IntermediateCatchEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataOutputType> for IntermediateCatchEvent {}
impl Cast<dyn DataOutputTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataOutputAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataStateType> for IntermediateCatchEvent {}
impl Cast<dyn DataStateTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataStoreType> for IntermediateCatchEvent {}
impl Cast<dyn DataStoreTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DataStoreReferenceType> for IntermediateCatchEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn DocumentationType> for IntermediateCatchEvent {}
impl Cast<dyn DocumentationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EndEventType> for IntermediateCatchEvent {}
impl Cast<dyn EndEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EndPointType> for IntermediateCatchEvent {}
impl Cast<dyn EndPointTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ErrorType> for IntermediateCatchEvent {}
impl Cast<dyn ErrorTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ErrorEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EscalationType> for IntermediateCatchEvent {}
impl Cast<dyn EscalationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EscalationEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EventType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for IntermediateCatchEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn EventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn EventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ExclusiveGatewayType> for IntermediateCatchEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ExpressionType> for IntermediateCatchEvent {}
impl Cast<dyn ExpressionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ExtensionType> for IntermediateCatchEvent {}
impl Cast<dyn ExtensionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ExtensionElementsType> for IntermediateCatchEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn FlowElementType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for IntermediateCatchEvent {}
impl Cast<dyn FormalExpressionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GatewayType> for IntermediateCatchEvent {}
impl Cast<dyn GatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalConversationType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalConversationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalManualTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalScriptTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GlobalUserTaskType> for IntermediateCatchEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn GroupType> for IntermediateCatchEvent {}
impl Cast<dyn GroupTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn HumanPerformerType> for IntermediateCatchEvent {}
impl Cast<dyn HumanPerformerTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ImplicitThrowEventType> for IntermediateCatchEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn InclusiveGatewayType> for IntermediateCatchEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn InputSetType> for IntermediateCatchEvent {}
impl Cast<dyn InputSetTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn InterfaceType> for IntermediateCatchEvent {}
impl Cast<dyn InterfaceTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn IntermediateCatchEventType> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for IntermediateCatchEvent {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn IntermediateThrowEventType> for IntermediateCatchEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn InputOutputBindingType> for IntermediateCatchEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn InputOutputSpecificationType> for IntermediateCatchEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ItemDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn LaneType> for IntermediateCatchEvent {}
impl Cast<dyn LaneTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn LaneSetType> for IntermediateCatchEvent {}
impl Cast<dyn LaneSetTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn LinkEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn LoopCharacteristicsType> for IntermediateCatchEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ManualTaskType> for IntermediateCatchEvent {}
impl Cast<dyn ManualTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MessageType> for IntermediateCatchEvent {}
impl Cast<dyn MessageTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MessageEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MessageFlowType> for IntermediateCatchEvent {}
impl Cast<dyn MessageFlowTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MessageFlowAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MonitoringType> for IntermediateCatchEvent {}
impl Cast<dyn MonitoringTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for IntermediateCatchEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn OperationType> for IntermediateCatchEvent {}
impl Cast<dyn OperationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn OutputSetType> for IntermediateCatchEvent {}
impl Cast<dyn OutputSetTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ParallelGatewayType> for IntermediateCatchEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantType> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantAssociationType> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantMultiplicityType> for IntermediateCatchEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn PartnerEntityType> for IntermediateCatchEvent {}
impl Cast<dyn PartnerEntityTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn PartnerRoleType> for IntermediateCatchEvent {}
impl Cast<dyn PartnerRoleTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn PerformerType> for IntermediateCatchEvent {}
impl Cast<dyn PerformerTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn PotentialOwnerType> for IntermediateCatchEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ProcessType> for IntermediateCatchEvent {}
impl Cast<dyn ProcessTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn PropertyType> for IntermediateCatchEvent {}
impl Cast<dyn PropertyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ReceiveTaskType> for IntermediateCatchEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn RelationshipType> for IntermediateCatchEvent {}
impl Cast<dyn RelationshipTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn RenderingType> for IntermediateCatchEvent {}
impl Cast<dyn RenderingTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ResourceType> for IntermediateCatchEvent {}
impl Cast<dyn ResourceTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for IntermediateCatchEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ResourceParameterType> for IntermediateCatchEvent {}
impl Cast<dyn ResourceParameterTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ResourceParameterBindingType> for IntermediateCatchEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ResourceRoleType> for IntermediateCatchEvent {}
impl Cast<dyn ResourceRoleTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn RootElementType> for IntermediateCatchEvent {}
impl Cast<dyn RootElementTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ScriptTaskType> for IntermediateCatchEvent {}
impl Cast<dyn ScriptTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ScriptType> for IntermediateCatchEvent {}
impl Cast<dyn ScriptTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SendTaskType> for IntermediateCatchEvent {}
impl Cast<dyn SendTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SequenceFlowType> for IntermediateCatchEvent {}
impl Cast<dyn SequenceFlowTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ServiceTaskType> for IntermediateCatchEvent {}
impl Cast<dyn ServiceTaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SignalType> for IntermediateCatchEvent {}
impl Cast<dyn SignalTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SignalEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for IntermediateCatchEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn StartEventType> for IntermediateCatchEvent {}
impl Cast<dyn StartEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SubChoreographyType> for IntermediateCatchEvent {}
impl Cast<dyn SubChoreographyTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SubConversationType> for IntermediateCatchEvent {}
impl Cast<dyn SubConversationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn SubProcessType> for IntermediateCatchEvent {}
impl Cast<dyn SubProcessTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TaskType> for IntermediateCatchEvent {}
impl Cast<dyn TaskTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TerminateEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TextAnnotationType> for IntermediateCatchEvent {}
impl Cast<dyn TextAnnotationTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TextType> for IntermediateCatchEvent {}
impl Cast<dyn TextTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn ThrowEventType> for IntermediateCatchEvent {}
impl Cast<dyn ThrowEventTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TimerEventDefinitionType> for IntermediateCatchEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn TransactionType> for IntermediateCatchEvent {}
impl Cast<dyn TransactionTypeMut> for IntermediateCatchEvent {}
impl Cast<dyn UserTaskType> for IntermediateCatchEvent {}
impl Cast<dyn UserTaskTypeMut> for IntermediateCatchEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:intermediateThrowEvent")]
pub struct IntermediateThrowEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInput")]
    #[tia("ThrowEventType",rg*="data_inputs","ThrowEventTypeMut",s,rmg*="data_inputs_mut")]
    pub data_inputs: Vec<DataInput>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ThrowEventType",rg*="data_input_associations","ThrowEventTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:inputSet")]
    #[tia("ThrowEventType",rg*="input_set","ThrowEventTypeMut",s,rmg*="input_set_mut")]
    pub input_set: Option<InputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("ThrowEventType",rg*="event_definitions","ThrowEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("ThrowEventType",rg*="event_definition_refs","ThrowEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
}
impl DocumentElement for IntermediateThrowEvent {
    fn element(&self) -> Element {
        Element::IntermediateThrowEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for IntermediateThrowEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl IntermediateThrowEventType for IntermediateThrowEvent {}
impl IntermediateThrowEventTypeMut for IntermediateThrowEvent {}
//

/// Access to `intermediateThrowEvent`
pub trait IntermediateThrowEventType: ThrowEventType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(IntermediateThrowEventType);
impl_downcast!(IntermediateThrowEventType);
/// Mutable access to `intermediateThrowEvent`
pub trait IntermediateThrowEventTypeMut:
    ThrowEventTypeMut + Downcast + Debug + Send + DynClone + IntermediateThrowEventType
{
}
dyn_clone::clone_trait_object!(IntermediateThrowEventTypeMut);
impl_downcast!(IntermediateThrowEventTypeMut);
impl Cast<dyn DefinitionsType> for IntermediateThrowEvent {}
impl Cast<dyn DefinitionsTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ImportType> for IntermediateThrowEvent {}
impl Cast<dyn ImportTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ActivityType> for IntermediateThrowEvent {}
impl Cast<dyn ActivityTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn AdHocSubProcessType> for IntermediateThrowEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ArtifactType> for IntermediateThrowEvent {}
impl Cast<dyn ArtifactTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn AssignmentType> for IntermediateThrowEvent {}
impl Cast<dyn AssignmentTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn AssociationType> for IntermediateThrowEvent {}
impl Cast<dyn AssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn AuditingType> for IntermediateThrowEvent {}
impl Cast<dyn AuditingTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn BaseElementType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for IntermediateThrowEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn BoundaryEventType> for IntermediateThrowEvent {}
impl Cast<dyn BoundaryEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn BusinessRuleTaskType> for IntermediateThrowEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CallableElementType> for IntermediateThrowEvent {}
impl Cast<dyn CallableElementTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CallActivityType> for IntermediateThrowEvent {}
impl Cast<dyn CallActivityTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CallChoreographyType> for IntermediateThrowEvent {}
impl Cast<dyn CallChoreographyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CallConversationType> for IntermediateThrowEvent {}
impl Cast<dyn CallConversationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CancelEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CatchEventType> for IntermediateThrowEvent {}
impl Cast<dyn CatchEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CategoryType> for IntermediateThrowEvent {}
impl Cast<dyn CategoryTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CategoryValueType> for IntermediateThrowEvent {}
impl Cast<dyn CategoryValueTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyType> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyActivityType> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyTaskType> for IntermediateThrowEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CollaborationType> for IntermediateThrowEvent {}
impl Cast<dyn CollaborationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CompensateEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ComplexGatewayType> for IntermediateThrowEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ConversationType> for IntermediateThrowEvent {}
impl Cast<dyn ConversationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ConversationAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ConversationLinkType> for IntermediateThrowEvent {}
impl Cast<dyn ConversationLinkTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ConversationNodeType> for IntermediateThrowEvent {}
impl Cast<dyn ConversationNodeTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationKeyType> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyType> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationSubscriptionType> for IntermediateThrowEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn DataAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataInputType> for IntermediateThrowEvent {}
impl Cast<dyn DataInputTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataInputAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataObjectType> for IntermediateThrowEvent {}
impl Cast<dyn DataObjectTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataObjectReferenceType> for IntermediateThrowEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataOutputType> for IntermediateThrowEvent {}
impl Cast<dyn DataOutputTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataOutputAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataStateType> for IntermediateThrowEvent {}
impl Cast<dyn DataStateTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataStoreType> for IntermediateThrowEvent {}
impl Cast<dyn DataStoreTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DataStoreReferenceType> for IntermediateThrowEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn DocumentationType> for IntermediateThrowEvent {}
impl Cast<dyn DocumentationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EndEventType> for IntermediateThrowEvent {}
impl Cast<dyn EndEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EndPointType> for IntermediateThrowEvent {}
impl Cast<dyn EndPointTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ErrorType> for IntermediateThrowEvent {}
impl Cast<dyn ErrorTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ErrorEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EscalationType> for IntermediateThrowEvent {}
impl Cast<dyn EscalationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EscalationEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EventType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for IntermediateThrowEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn EventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn EventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ExclusiveGatewayType> for IntermediateThrowEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ExpressionType> for IntermediateThrowEvent {}
impl Cast<dyn ExpressionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ExtensionType> for IntermediateThrowEvent {}
impl Cast<dyn ExtensionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ExtensionElementsType> for IntermediateThrowEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn FlowElementType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for IntermediateThrowEvent {}
impl Cast<dyn FormalExpressionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GatewayType> for IntermediateThrowEvent {}
impl Cast<dyn GatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalConversationType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalConversationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalManualTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalScriptTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GlobalUserTaskType> for IntermediateThrowEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn GroupType> for IntermediateThrowEvent {}
impl Cast<dyn GroupTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn HumanPerformerType> for IntermediateThrowEvent {}
impl Cast<dyn HumanPerformerTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ImplicitThrowEventType> for IntermediateThrowEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn InclusiveGatewayType> for IntermediateThrowEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn InputSetType> for IntermediateThrowEvent {}
impl Cast<dyn InputSetTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn InterfaceType> for IntermediateThrowEvent {}
impl Cast<dyn InterfaceTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn IntermediateCatchEventType> for IntermediateThrowEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn IntermediateThrowEventType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputOutputBindingType> for IntermediateThrowEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn InputOutputSpecificationType> for IntermediateThrowEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ItemDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn LaneType> for IntermediateThrowEvent {}
impl Cast<dyn LaneTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn LaneSetType> for IntermediateThrowEvent {}
impl Cast<dyn LaneSetTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn LinkEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn LoopCharacteristicsType> for IntermediateThrowEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ManualTaskType> for IntermediateThrowEvent {}
impl Cast<dyn ManualTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MessageType> for IntermediateThrowEvent {}
impl Cast<dyn MessageTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MessageEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MessageFlowType> for IntermediateThrowEvent {}
impl Cast<dyn MessageFlowTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MessageFlowAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MonitoringType> for IntermediateThrowEvent {}
impl Cast<dyn MonitoringTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for IntermediateThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn OperationType> for IntermediateThrowEvent {}
impl Cast<dyn OperationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn OutputSetType> for IntermediateThrowEvent {}
impl Cast<dyn OutputSetTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ParallelGatewayType> for IntermediateThrowEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantType> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantAssociationType> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantMultiplicityType> for IntermediateThrowEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn PartnerEntityType> for IntermediateThrowEvent {}
impl Cast<dyn PartnerEntityTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn PartnerRoleType> for IntermediateThrowEvent {}
impl Cast<dyn PartnerRoleTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn PerformerType> for IntermediateThrowEvent {}
impl Cast<dyn PerformerTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn PotentialOwnerType> for IntermediateThrowEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ProcessType> for IntermediateThrowEvent {}
impl Cast<dyn ProcessTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn PropertyType> for IntermediateThrowEvent {}
impl Cast<dyn PropertyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ReceiveTaskType> for IntermediateThrowEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn RelationshipType> for IntermediateThrowEvent {}
impl Cast<dyn RelationshipTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn RenderingType> for IntermediateThrowEvent {}
impl Cast<dyn RenderingTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ResourceType> for IntermediateThrowEvent {}
impl Cast<dyn ResourceTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for IntermediateThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ResourceParameterType> for IntermediateThrowEvent {}
impl Cast<dyn ResourceParameterTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ResourceParameterBindingType> for IntermediateThrowEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ResourceRoleType> for IntermediateThrowEvent {}
impl Cast<dyn ResourceRoleTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn RootElementType> for IntermediateThrowEvent {}
impl Cast<dyn RootElementTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ScriptTaskType> for IntermediateThrowEvent {}
impl Cast<dyn ScriptTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ScriptType> for IntermediateThrowEvent {}
impl Cast<dyn ScriptTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SendTaskType> for IntermediateThrowEvent {}
impl Cast<dyn SendTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SequenceFlowType> for IntermediateThrowEvent {}
impl Cast<dyn SequenceFlowTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ServiceTaskType> for IntermediateThrowEvent {}
impl Cast<dyn ServiceTaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SignalType> for IntermediateThrowEvent {}
impl Cast<dyn SignalTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SignalEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for IntermediateThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn StartEventType> for IntermediateThrowEvent {}
impl Cast<dyn StartEventTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SubChoreographyType> for IntermediateThrowEvent {}
impl Cast<dyn SubChoreographyTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SubConversationType> for IntermediateThrowEvent {}
impl Cast<dyn SubConversationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn SubProcessType> for IntermediateThrowEvent {}
impl Cast<dyn SubProcessTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn TaskType> for IntermediateThrowEvent {}
impl Cast<dyn TaskTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn TerminateEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn TextAnnotationType> for IntermediateThrowEvent {}
impl Cast<dyn TextAnnotationTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn TextType> for IntermediateThrowEvent {}
impl Cast<dyn TextTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn ThrowEventType> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ThrowEventTypeMut> for IntermediateThrowEvent {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TimerEventDefinitionType> for IntermediateThrowEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn TransactionType> for IntermediateThrowEvent {}
impl Cast<dyn TransactionTypeMut> for IntermediateThrowEvent {}
impl Cast<dyn UserTaskType> for IntermediateThrowEvent {}
impl Cast<dyn UserTaskTypeMut> for IntermediateThrowEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:ioBinding")]
pub struct InputOutputBinding {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "operationRef")]
    #[tia("InputOutputBindingType",rg*="operation_ref","InputOutputBindingTypeMut",s)]
    pub operation_ref: String,
    #[xml(attr = "inputDataRef")]
    #[tia("InputOutputBindingType",rg*="input_data_ref","InputOutputBindingTypeMut",s)]
    pub input_data_ref: String,
    #[xml(attr = "outputDataRef")]
    #[tia("InputOutputBindingType",rg*="output_data_ref","InputOutputBindingTypeMut",s)]
    pub output_data_ref: String,
}
impl DocumentElement for InputOutputBinding {
    fn element(&self) -> Element {
        Element::IoBinding
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for InputOutputBinding {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `ioBinding`
pub trait InputOutputBindingType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `operationRef`
    fn operation_ref(&self) -> &String;
    /// Get value of attribute `inputDataRef`
    fn input_data_ref(&self) -> &String;
    /// Get value of attribute `outputDataRef`
    fn output_data_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(InputOutputBindingType);
impl_downcast!(InputOutputBindingType);
/// Mutable access to `ioBinding`
pub trait InputOutputBindingTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + InputOutputBindingType
{
    /// Set value of attribute `operationRef`
    fn set_operation_ref(&mut self, value: String);
    /// Set value of attribute `inputDataRef`
    fn set_input_data_ref(&mut self, value: String);
    /// Set value of attribute `outputDataRef`
    fn set_output_data_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(InputOutputBindingTypeMut);
impl_downcast!(InputOutputBindingTypeMut);
impl Cast<dyn DefinitionsType> for InputOutputBinding {}
impl Cast<dyn DefinitionsTypeMut> for InputOutputBinding {}
impl Cast<dyn ImportType> for InputOutputBinding {}
impl Cast<dyn ImportTypeMut> for InputOutputBinding {}
impl Cast<dyn ActivityType> for InputOutputBinding {}
impl Cast<dyn ActivityTypeMut> for InputOutputBinding {}
impl Cast<dyn AdHocSubProcessType> for InputOutputBinding {}
impl Cast<dyn AdHocSubProcessTypeMut> for InputOutputBinding {}
impl Cast<dyn ArtifactType> for InputOutputBinding {}
impl Cast<dyn ArtifactTypeMut> for InputOutputBinding {}
impl Cast<dyn AssignmentType> for InputOutputBinding {}
impl Cast<dyn AssignmentTypeMut> for InputOutputBinding {}
impl Cast<dyn AssociationType> for InputOutputBinding {}
impl Cast<dyn AssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn AuditingType> for InputOutputBinding {}
impl Cast<dyn AuditingTypeMut> for InputOutputBinding {}
impl Cast<dyn BaseElementType> for InputOutputBinding {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for InputOutputBinding {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for InputOutputBinding {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for InputOutputBinding {}
impl Cast<dyn BoundaryEventType> for InputOutputBinding {}
impl Cast<dyn BoundaryEventTypeMut> for InputOutputBinding {}
impl Cast<dyn BusinessRuleTaskType> for InputOutputBinding {}
impl Cast<dyn BusinessRuleTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn CallableElementType> for InputOutputBinding {}
impl Cast<dyn CallableElementTypeMut> for InputOutputBinding {}
impl Cast<dyn CallActivityType> for InputOutputBinding {}
impl Cast<dyn CallActivityTypeMut> for InputOutputBinding {}
impl Cast<dyn CallChoreographyType> for InputOutputBinding {}
impl Cast<dyn CallChoreographyTypeMut> for InputOutputBinding {}
impl Cast<dyn CallConversationType> for InputOutputBinding {}
impl Cast<dyn CallConversationTypeMut> for InputOutputBinding {}
impl Cast<dyn CancelEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn CancelEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn CatchEventType> for InputOutputBinding {}
impl Cast<dyn CatchEventTypeMut> for InputOutputBinding {}
impl Cast<dyn CategoryType> for InputOutputBinding {}
impl Cast<dyn CategoryTypeMut> for InputOutputBinding {}
impl Cast<dyn CategoryValueType> for InputOutputBinding {}
impl Cast<dyn CategoryValueTypeMut> for InputOutputBinding {}
impl Cast<dyn ChoreographyType> for InputOutputBinding {}
impl Cast<dyn ChoreographyTypeMut> for InputOutputBinding {}
impl Cast<dyn ChoreographyActivityType> for InputOutputBinding {}
impl Cast<dyn ChoreographyActivityTypeMut> for InputOutputBinding {}
impl Cast<dyn ChoreographyTaskType> for InputOutputBinding {}
impl Cast<dyn ChoreographyTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn CollaborationType> for InputOutputBinding {}
impl Cast<dyn CollaborationTypeMut> for InputOutputBinding {}
impl Cast<dyn CompensateEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn ComplexBehaviorDefinitionType> for InputOutputBinding {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn ComplexGatewayType> for InputOutputBinding {}
impl Cast<dyn ComplexGatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn ConditionalEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn ConversationType> for InputOutputBinding {}
impl Cast<dyn ConversationTypeMut> for InputOutputBinding {}
impl Cast<dyn ConversationAssociationType> for InputOutputBinding {}
impl Cast<dyn ConversationAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn ConversationLinkType> for InputOutputBinding {}
impl Cast<dyn ConversationLinkTypeMut> for InputOutputBinding {}
impl Cast<dyn ConversationNodeType> for InputOutputBinding {}
impl Cast<dyn ConversationNodeTypeMut> for InputOutputBinding {}
impl Cast<dyn CorrelationKeyType> for InputOutputBinding {}
impl Cast<dyn CorrelationKeyTypeMut> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyType> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyTypeMut> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyBindingType> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for InputOutputBinding {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for InputOutputBinding {}
impl Cast<dyn CorrelationSubscriptionType> for InputOutputBinding {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for InputOutputBinding {}
impl Cast<dyn DataAssociationType> for InputOutputBinding {}
impl Cast<dyn DataAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn DataInputType> for InputOutputBinding {}
impl Cast<dyn DataInputTypeMut> for InputOutputBinding {}
impl Cast<dyn DataInputAssociationType> for InputOutputBinding {}
impl Cast<dyn DataInputAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn DataObjectType> for InputOutputBinding {}
impl Cast<dyn DataObjectTypeMut> for InputOutputBinding {}
impl Cast<dyn DataObjectReferenceType> for InputOutputBinding {}
impl Cast<dyn DataObjectReferenceTypeMut> for InputOutputBinding {}
impl Cast<dyn DataOutputType> for InputOutputBinding {}
impl Cast<dyn DataOutputTypeMut> for InputOutputBinding {}
impl Cast<dyn DataOutputAssociationType> for InputOutputBinding {}
impl Cast<dyn DataOutputAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn DataStateType> for InputOutputBinding {}
impl Cast<dyn DataStateTypeMut> for InputOutputBinding {}
impl Cast<dyn DataStoreType> for InputOutputBinding {}
impl Cast<dyn DataStoreTypeMut> for InputOutputBinding {}
impl Cast<dyn DataStoreReferenceType> for InputOutputBinding {}
impl Cast<dyn DataStoreReferenceTypeMut> for InputOutputBinding {}
impl Cast<dyn DocumentationType> for InputOutputBinding {}
impl Cast<dyn DocumentationTypeMut> for InputOutputBinding {}
impl Cast<dyn EndEventType> for InputOutputBinding {}
impl Cast<dyn EndEventTypeMut> for InputOutputBinding {}
impl Cast<dyn EndPointType> for InputOutputBinding {}
impl Cast<dyn EndPointTypeMut> for InputOutputBinding {}
impl Cast<dyn ErrorType> for InputOutputBinding {}
impl Cast<dyn ErrorTypeMut> for InputOutputBinding {}
impl Cast<dyn ErrorEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn EscalationType> for InputOutputBinding {}
impl Cast<dyn EscalationTypeMut> for InputOutputBinding {}
impl Cast<dyn EscalationEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn EventType> for InputOutputBinding {}
impl Cast<dyn EventTypeMut> for InputOutputBinding {}
impl Cast<dyn EventBasedGatewayType> for InputOutputBinding {}
impl Cast<dyn EventBasedGatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn EventDefinitionType> for InputOutputBinding {}
impl Cast<dyn EventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn ExclusiveGatewayType> for InputOutputBinding {}
impl Cast<dyn ExclusiveGatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn ExpressionType> for InputOutputBinding {}
impl Cast<dyn ExpressionTypeMut> for InputOutputBinding {}
impl Cast<dyn ExtensionType> for InputOutputBinding {}
impl Cast<dyn ExtensionTypeMut> for InputOutputBinding {}
impl Cast<dyn ExtensionElementsType> for InputOutputBinding {}
impl Cast<dyn ExtensionElementsTypeMut> for InputOutputBinding {}
impl Cast<dyn FlowElementType> for InputOutputBinding {}
impl Cast<dyn FlowElementTypeMut> for InputOutputBinding {}
impl Cast<dyn FlowNodeType> for InputOutputBinding {}
impl Cast<dyn FlowNodeTypeMut> for InputOutputBinding {}
impl Cast<dyn FormalExpressionType> for InputOutputBinding {}
impl Cast<dyn FormalExpressionTypeMut> for InputOutputBinding {}
impl Cast<dyn GatewayType> for InputOutputBinding {}
impl Cast<dyn GatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalBusinessRuleTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalChoreographyTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalConversationType> for InputOutputBinding {}
impl Cast<dyn GlobalConversationTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalManualTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalManualTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalScriptTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalScriptTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GlobalUserTaskType> for InputOutputBinding {}
impl Cast<dyn GlobalUserTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn GroupType> for InputOutputBinding {}
impl Cast<dyn GroupTypeMut> for InputOutputBinding {}
impl Cast<dyn HumanPerformerType> for InputOutputBinding {}
impl Cast<dyn HumanPerformerTypeMut> for InputOutputBinding {}
impl Cast<dyn ImplicitThrowEventType> for InputOutputBinding {}
impl Cast<dyn ImplicitThrowEventTypeMut> for InputOutputBinding {}
impl Cast<dyn InclusiveGatewayType> for InputOutputBinding {}
impl Cast<dyn InclusiveGatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn InputSetType> for InputOutputBinding {}
impl Cast<dyn InputSetTypeMut> for InputOutputBinding {}
impl Cast<dyn InterfaceType> for InputOutputBinding {}
impl Cast<dyn InterfaceTypeMut> for InputOutputBinding {}
impl Cast<dyn IntermediateCatchEventType> for InputOutputBinding {}
impl Cast<dyn IntermediateCatchEventTypeMut> for InputOutputBinding {}
impl Cast<dyn IntermediateThrowEventType> for InputOutputBinding {}
impl Cast<dyn IntermediateThrowEventTypeMut> for InputOutputBinding {}
impl Cast<dyn InputOutputBindingType> for InputOutputBinding {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for InputOutputBinding {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputOutputSpecificationType> for InputOutputBinding {}
impl Cast<dyn InputOutputSpecificationTypeMut> for InputOutputBinding {}
impl Cast<dyn ItemDefinitionType> for InputOutputBinding {}
impl Cast<dyn ItemDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn LaneType> for InputOutputBinding {}
impl Cast<dyn LaneTypeMut> for InputOutputBinding {}
impl Cast<dyn LaneSetType> for InputOutputBinding {}
impl Cast<dyn LaneSetTypeMut> for InputOutputBinding {}
impl Cast<dyn LinkEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn LinkEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn LoopCharacteristicsType> for InputOutputBinding {}
impl Cast<dyn LoopCharacteristicsTypeMut> for InputOutputBinding {}
impl Cast<dyn ManualTaskType> for InputOutputBinding {}
impl Cast<dyn ManualTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn MessageType> for InputOutputBinding {}
impl Cast<dyn MessageTypeMut> for InputOutputBinding {}
impl Cast<dyn MessageEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn MessageEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn MessageFlowType> for InputOutputBinding {}
impl Cast<dyn MessageFlowTypeMut> for InputOutputBinding {}
impl Cast<dyn MessageFlowAssociationType> for InputOutputBinding {}
impl Cast<dyn MessageFlowAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn MonitoringType> for InputOutputBinding {}
impl Cast<dyn MonitoringTypeMut> for InputOutputBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for InputOutputBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for InputOutputBinding {}
impl Cast<dyn OperationType> for InputOutputBinding {}
impl Cast<dyn OperationTypeMut> for InputOutputBinding {}
impl Cast<dyn OutputSetType> for InputOutputBinding {}
impl Cast<dyn OutputSetTypeMut> for InputOutputBinding {}
impl Cast<dyn ParallelGatewayType> for InputOutputBinding {}
impl Cast<dyn ParallelGatewayTypeMut> for InputOutputBinding {}
impl Cast<dyn ParticipantType> for InputOutputBinding {}
impl Cast<dyn ParticipantTypeMut> for InputOutputBinding {}
impl Cast<dyn ParticipantAssociationType> for InputOutputBinding {}
impl Cast<dyn ParticipantAssociationTypeMut> for InputOutputBinding {}
impl Cast<dyn ParticipantMultiplicityType> for InputOutputBinding {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for InputOutputBinding {}
impl Cast<dyn PartnerEntityType> for InputOutputBinding {}
impl Cast<dyn PartnerEntityTypeMut> for InputOutputBinding {}
impl Cast<dyn PartnerRoleType> for InputOutputBinding {}
impl Cast<dyn PartnerRoleTypeMut> for InputOutputBinding {}
impl Cast<dyn PerformerType> for InputOutputBinding {}
impl Cast<dyn PerformerTypeMut> for InputOutputBinding {}
impl Cast<dyn PotentialOwnerType> for InputOutputBinding {}
impl Cast<dyn PotentialOwnerTypeMut> for InputOutputBinding {}
impl Cast<dyn ProcessType> for InputOutputBinding {}
impl Cast<dyn ProcessTypeMut> for InputOutputBinding {}
impl Cast<dyn PropertyType> for InputOutputBinding {}
impl Cast<dyn PropertyTypeMut> for InputOutputBinding {}
impl Cast<dyn ReceiveTaskType> for InputOutputBinding {}
impl Cast<dyn ReceiveTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn RelationshipType> for InputOutputBinding {}
impl Cast<dyn RelationshipTypeMut> for InputOutputBinding {}
impl Cast<dyn RenderingType> for InputOutputBinding {}
impl Cast<dyn RenderingTypeMut> for InputOutputBinding {}
impl Cast<dyn ResourceType> for InputOutputBinding {}
impl Cast<dyn ResourceTypeMut> for InputOutputBinding {}
impl Cast<dyn ResourceAssignmentExpressionType> for InputOutputBinding {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for InputOutputBinding {}
impl Cast<dyn ResourceParameterType> for InputOutputBinding {}
impl Cast<dyn ResourceParameterTypeMut> for InputOutputBinding {}
impl Cast<dyn ResourceParameterBindingType> for InputOutputBinding {}
impl Cast<dyn ResourceParameterBindingTypeMut> for InputOutputBinding {}
impl Cast<dyn ResourceRoleType> for InputOutputBinding {}
impl Cast<dyn ResourceRoleTypeMut> for InputOutputBinding {}
impl Cast<dyn RootElementType> for InputOutputBinding {}
impl Cast<dyn RootElementTypeMut> for InputOutputBinding {}
impl Cast<dyn ScriptTaskType> for InputOutputBinding {}
impl Cast<dyn ScriptTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn ScriptType> for InputOutputBinding {}
impl Cast<dyn ScriptTypeMut> for InputOutputBinding {}
impl Cast<dyn SendTaskType> for InputOutputBinding {}
impl Cast<dyn SendTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn SequenceFlowType> for InputOutputBinding {}
impl Cast<dyn SequenceFlowTypeMut> for InputOutputBinding {}
impl Cast<dyn ServiceTaskType> for InputOutputBinding {}
impl Cast<dyn ServiceTaskTypeMut> for InputOutputBinding {}
impl Cast<dyn SignalType> for InputOutputBinding {}
impl Cast<dyn SignalTypeMut> for InputOutputBinding {}
impl Cast<dyn SignalEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn SignalEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn StandardLoopCharacteristicsType> for InputOutputBinding {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for InputOutputBinding {}
impl Cast<dyn StartEventType> for InputOutputBinding {}
impl Cast<dyn StartEventTypeMut> for InputOutputBinding {}
impl Cast<dyn SubChoreographyType> for InputOutputBinding {}
impl Cast<dyn SubChoreographyTypeMut> for InputOutputBinding {}
impl Cast<dyn SubConversationType> for InputOutputBinding {}
impl Cast<dyn SubConversationTypeMut> for InputOutputBinding {}
impl Cast<dyn SubProcessType> for InputOutputBinding {}
impl Cast<dyn SubProcessTypeMut> for InputOutputBinding {}
impl Cast<dyn TaskType> for InputOutputBinding {}
impl Cast<dyn TaskTypeMut> for InputOutputBinding {}
impl Cast<dyn TerminateEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn TextAnnotationType> for InputOutputBinding {}
impl Cast<dyn TextAnnotationTypeMut> for InputOutputBinding {}
impl Cast<dyn TextType> for InputOutputBinding {}
impl Cast<dyn TextTypeMut> for InputOutputBinding {}
impl Cast<dyn ThrowEventType> for InputOutputBinding {}
impl Cast<dyn ThrowEventTypeMut> for InputOutputBinding {}
impl Cast<dyn TimerEventDefinitionType> for InputOutputBinding {}
impl Cast<dyn TimerEventDefinitionTypeMut> for InputOutputBinding {}
impl Cast<dyn TransactionType> for InputOutputBinding {}
impl Cast<dyn TransactionTypeMut> for InputOutputBinding {}
impl Cast<dyn UserTaskType> for InputOutputBinding {}
impl Cast<dyn UserTaskTypeMut> for InputOutputBinding {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:ioSpecification")]
pub struct InputOutputSpecification {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:dataInput")]
    #[tia("InputOutputSpecificationType",rg*="data_inputs","InputOutputSpecificationTypeMut",s,rmg*="data_inputs_mut")]
    pub data_inputs: Vec<DataInput>,
    #[xml(child = "bpmn:dataOutput")]
    #[tia("InputOutputSpecificationType",rg*="data_outputs","InputOutputSpecificationTypeMut",s,rmg*="data_outputs_mut")]
    pub data_outputs: Vec<DataOutput>,
    #[xml(child = "bpmn:inputSet")]
    #[tia("InputOutputSpecificationType",rg*="input_sets","InputOutputSpecificationTypeMut",s,rmg*="input_sets_mut")]
    pub input_sets: Vec<InputSet>,
    #[xml(child = "bpmn:outputSet")]
    #[tia("InputOutputSpecificationType",rg*="output_sets","InputOutputSpecificationTypeMut",s,rmg*="output_sets_mut")]
    pub output_sets: Vec<OutputSet>,
}
impl DocumentElement for InputOutputSpecification {
    fn element(&self) -> Element {
        Element::IoSpecification
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for InputOutputSpecification {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_inputs.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.data_outputs.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.input_sets.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.output_sets.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_inputs.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.data_outputs.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.input_sets.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.output_sets.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `ioSpecification`
pub trait InputOutputSpecificationType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of `dataInput` child
    fn data_inputs(&self) -> &Vec<DataInput>;
    /// Get value of `dataOutput` child
    fn data_outputs(&self) -> &Vec<DataOutput>;
    /// Get value of `inputSet` child
    fn input_sets(&self) -> &Vec<InputSet>;
    /// Get value of `outputSet` child
    fn output_sets(&self) -> &Vec<OutputSet>;
}
dyn_clone::clone_trait_object!(InputOutputSpecificationType);
impl_downcast!(InputOutputSpecificationType);
/// Mutable access to `ioSpecification`
pub trait InputOutputSpecificationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + InputOutputSpecificationType
{
    /// Get a mutable value of `dataInput` child
    fn data_inputs_mut(&mut self) -> &mut Vec<DataInput>;
    /// Set value of `dataInput` child
    fn set_data_inputs(&mut self, value: Vec<DataInput>);
    /// Get a mutable value of `dataOutput` child
    fn data_outputs_mut(&mut self) -> &mut Vec<DataOutput>;
    /// Set value of `dataOutput` child
    fn set_data_outputs(&mut self, value: Vec<DataOutput>);
    /// Get a mutable value of `inputSet` child
    fn input_sets_mut(&mut self) -> &mut Vec<InputSet>;
    /// Set value of `inputSet` child
    fn set_input_sets(&mut self, value: Vec<InputSet>);
    /// Get a mutable value of `outputSet` child
    fn output_sets_mut(&mut self) -> &mut Vec<OutputSet>;
    /// Set value of `outputSet` child
    fn set_output_sets(&mut self, value: Vec<OutputSet>);
}
dyn_clone::clone_trait_object!(InputOutputSpecificationTypeMut);
impl_downcast!(InputOutputSpecificationTypeMut);
impl Cast<dyn DefinitionsType> for InputOutputSpecification {}
impl Cast<dyn DefinitionsTypeMut> for InputOutputSpecification {}
impl Cast<dyn ImportType> for InputOutputSpecification {}
impl Cast<dyn ImportTypeMut> for InputOutputSpecification {}
impl Cast<dyn ActivityType> for InputOutputSpecification {}
impl Cast<dyn ActivityTypeMut> for InputOutputSpecification {}
impl Cast<dyn AdHocSubProcessType> for InputOutputSpecification {}
impl Cast<dyn AdHocSubProcessTypeMut> for InputOutputSpecification {}
impl Cast<dyn ArtifactType> for InputOutputSpecification {}
impl Cast<dyn ArtifactTypeMut> for InputOutputSpecification {}
impl Cast<dyn AssignmentType> for InputOutputSpecification {}
impl Cast<dyn AssignmentTypeMut> for InputOutputSpecification {}
impl Cast<dyn AssociationType> for InputOutputSpecification {}
impl Cast<dyn AssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn AuditingType> for InputOutputSpecification {}
impl Cast<dyn AuditingTypeMut> for InputOutputSpecification {}
impl Cast<dyn BaseElementType> for InputOutputSpecification {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for InputOutputSpecification {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for InputOutputSpecification {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for InputOutputSpecification {}
impl Cast<dyn BoundaryEventType> for InputOutputSpecification {}
impl Cast<dyn BoundaryEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn BusinessRuleTaskType> for InputOutputSpecification {}
impl Cast<dyn BusinessRuleTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn CallableElementType> for InputOutputSpecification {}
impl Cast<dyn CallableElementTypeMut> for InputOutputSpecification {}
impl Cast<dyn CallActivityType> for InputOutputSpecification {}
impl Cast<dyn CallActivityTypeMut> for InputOutputSpecification {}
impl Cast<dyn CallChoreographyType> for InputOutputSpecification {}
impl Cast<dyn CallChoreographyTypeMut> for InputOutputSpecification {}
impl Cast<dyn CallConversationType> for InputOutputSpecification {}
impl Cast<dyn CallConversationTypeMut> for InputOutputSpecification {}
impl Cast<dyn CancelEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn CancelEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn CatchEventType> for InputOutputSpecification {}
impl Cast<dyn CatchEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn CategoryType> for InputOutputSpecification {}
impl Cast<dyn CategoryTypeMut> for InputOutputSpecification {}
impl Cast<dyn CategoryValueType> for InputOutputSpecification {}
impl Cast<dyn CategoryValueTypeMut> for InputOutputSpecification {}
impl Cast<dyn ChoreographyType> for InputOutputSpecification {}
impl Cast<dyn ChoreographyTypeMut> for InputOutputSpecification {}
impl Cast<dyn ChoreographyActivityType> for InputOutputSpecification {}
impl Cast<dyn ChoreographyActivityTypeMut> for InputOutputSpecification {}
impl Cast<dyn ChoreographyTaskType> for InputOutputSpecification {}
impl Cast<dyn ChoreographyTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn CollaborationType> for InputOutputSpecification {}
impl Cast<dyn CollaborationTypeMut> for InputOutputSpecification {}
impl Cast<dyn CompensateEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ComplexBehaviorDefinitionType> for InputOutputSpecification {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ComplexGatewayType> for InputOutputSpecification {}
impl Cast<dyn ComplexGatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn ConditionalEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ConversationType> for InputOutputSpecification {}
impl Cast<dyn ConversationTypeMut> for InputOutputSpecification {}
impl Cast<dyn ConversationAssociationType> for InputOutputSpecification {}
impl Cast<dyn ConversationAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn ConversationLinkType> for InputOutputSpecification {}
impl Cast<dyn ConversationLinkTypeMut> for InputOutputSpecification {}
impl Cast<dyn ConversationNodeType> for InputOutputSpecification {}
impl Cast<dyn ConversationNodeTypeMut> for InputOutputSpecification {}
impl Cast<dyn CorrelationKeyType> for InputOutputSpecification {}
impl Cast<dyn CorrelationKeyTypeMut> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyType> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyTypeMut> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyBindingType> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for InputOutputSpecification {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for InputOutputSpecification {}
impl Cast<dyn CorrelationSubscriptionType> for InputOutputSpecification {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataAssociationType> for InputOutputSpecification {}
impl Cast<dyn DataAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataInputType> for InputOutputSpecification {}
impl Cast<dyn DataInputTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataInputAssociationType> for InputOutputSpecification {}
impl Cast<dyn DataInputAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataObjectType> for InputOutputSpecification {}
impl Cast<dyn DataObjectTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataObjectReferenceType> for InputOutputSpecification {}
impl Cast<dyn DataObjectReferenceTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataOutputType> for InputOutputSpecification {}
impl Cast<dyn DataOutputTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataOutputAssociationType> for InputOutputSpecification {}
impl Cast<dyn DataOutputAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataStateType> for InputOutputSpecification {}
impl Cast<dyn DataStateTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataStoreType> for InputOutputSpecification {}
impl Cast<dyn DataStoreTypeMut> for InputOutputSpecification {}
impl Cast<dyn DataStoreReferenceType> for InputOutputSpecification {}
impl Cast<dyn DataStoreReferenceTypeMut> for InputOutputSpecification {}
impl Cast<dyn DocumentationType> for InputOutputSpecification {}
impl Cast<dyn DocumentationTypeMut> for InputOutputSpecification {}
impl Cast<dyn EndEventType> for InputOutputSpecification {}
impl Cast<dyn EndEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn EndPointType> for InputOutputSpecification {}
impl Cast<dyn EndPointTypeMut> for InputOutputSpecification {}
impl Cast<dyn ErrorType> for InputOutputSpecification {}
impl Cast<dyn ErrorTypeMut> for InputOutputSpecification {}
impl Cast<dyn ErrorEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn EscalationType> for InputOutputSpecification {}
impl Cast<dyn EscalationTypeMut> for InputOutputSpecification {}
impl Cast<dyn EscalationEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn EventType> for InputOutputSpecification {}
impl Cast<dyn EventTypeMut> for InputOutputSpecification {}
impl Cast<dyn EventBasedGatewayType> for InputOutputSpecification {}
impl Cast<dyn EventBasedGatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn EventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn EventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ExclusiveGatewayType> for InputOutputSpecification {}
impl Cast<dyn ExclusiveGatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn ExpressionType> for InputOutputSpecification {}
impl Cast<dyn ExpressionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ExtensionType> for InputOutputSpecification {}
impl Cast<dyn ExtensionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ExtensionElementsType> for InputOutputSpecification {}
impl Cast<dyn ExtensionElementsTypeMut> for InputOutputSpecification {}
impl Cast<dyn FlowElementType> for InputOutputSpecification {}
impl Cast<dyn FlowElementTypeMut> for InputOutputSpecification {}
impl Cast<dyn FlowNodeType> for InputOutputSpecification {}
impl Cast<dyn FlowNodeTypeMut> for InputOutputSpecification {}
impl Cast<dyn FormalExpressionType> for InputOutputSpecification {}
impl Cast<dyn FormalExpressionTypeMut> for InputOutputSpecification {}
impl Cast<dyn GatewayType> for InputOutputSpecification {}
impl Cast<dyn GatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalBusinessRuleTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalChoreographyTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalConversationType> for InputOutputSpecification {}
impl Cast<dyn GlobalConversationTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalManualTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalManualTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalScriptTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalScriptTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GlobalUserTaskType> for InputOutputSpecification {}
impl Cast<dyn GlobalUserTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn GroupType> for InputOutputSpecification {}
impl Cast<dyn GroupTypeMut> for InputOutputSpecification {}
impl Cast<dyn HumanPerformerType> for InputOutputSpecification {}
impl Cast<dyn HumanPerformerTypeMut> for InputOutputSpecification {}
impl Cast<dyn ImplicitThrowEventType> for InputOutputSpecification {}
impl Cast<dyn ImplicitThrowEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn InclusiveGatewayType> for InputOutputSpecification {}
impl Cast<dyn InclusiveGatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn InputSetType> for InputOutputSpecification {}
impl Cast<dyn InputSetTypeMut> for InputOutputSpecification {}
impl Cast<dyn InterfaceType> for InputOutputSpecification {}
impl Cast<dyn InterfaceTypeMut> for InputOutputSpecification {}
impl Cast<dyn IntermediateCatchEventType> for InputOutputSpecification {}
impl Cast<dyn IntermediateCatchEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn IntermediateThrowEventType> for InputOutputSpecification {}
impl Cast<dyn IntermediateThrowEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn InputOutputBindingType> for InputOutputSpecification {}
impl Cast<dyn InputOutputBindingTypeMut> for InputOutputSpecification {}
impl Cast<dyn InputOutputSpecificationType> for InputOutputSpecification {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for InputOutputSpecification {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ItemDefinitionType> for InputOutputSpecification {}
impl Cast<dyn ItemDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn LaneType> for InputOutputSpecification {}
impl Cast<dyn LaneTypeMut> for InputOutputSpecification {}
impl Cast<dyn LaneSetType> for InputOutputSpecification {}
impl Cast<dyn LaneSetTypeMut> for InputOutputSpecification {}
impl Cast<dyn LinkEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn LinkEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn LoopCharacteristicsType> for InputOutputSpecification {}
impl Cast<dyn LoopCharacteristicsTypeMut> for InputOutputSpecification {}
impl Cast<dyn ManualTaskType> for InputOutputSpecification {}
impl Cast<dyn ManualTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn MessageType> for InputOutputSpecification {}
impl Cast<dyn MessageTypeMut> for InputOutputSpecification {}
impl Cast<dyn MessageEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn MessageEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn MessageFlowType> for InputOutputSpecification {}
impl Cast<dyn MessageFlowTypeMut> for InputOutputSpecification {}
impl Cast<dyn MessageFlowAssociationType> for InputOutputSpecification {}
impl Cast<dyn MessageFlowAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn MonitoringType> for InputOutputSpecification {}
impl Cast<dyn MonitoringTypeMut> for InputOutputSpecification {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for InputOutputSpecification {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for InputOutputSpecification {}
impl Cast<dyn OperationType> for InputOutputSpecification {}
impl Cast<dyn OperationTypeMut> for InputOutputSpecification {}
impl Cast<dyn OutputSetType> for InputOutputSpecification {}
impl Cast<dyn OutputSetTypeMut> for InputOutputSpecification {}
impl Cast<dyn ParallelGatewayType> for InputOutputSpecification {}
impl Cast<dyn ParallelGatewayTypeMut> for InputOutputSpecification {}
impl Cast<dyn ParticipantType> for InputOutputSpecification {}
impl Cast<dyn ParticipantTypeMut> for InputOutputSpecification {}
impl Cast<dyn ParticipantAssociationType> for InputOutputSpecification {}
impl Cast<dyn ParticipantAssociationTypeMut> for InputOutputSpecification {}
impl Cast<dyn ParticipantMultiplicityType> for InputOutputSpecification {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for InputOutputSpecification {}
impl Cast<dyn PartnerEntityType> for InputOutputSpecification {}
impl Cast<dyn PartnerEntityTypeMut> for InputOutputSpecification {}
impl Cast<dyn PartnerRoleType> for InputOutputSpecification {}
impl Cast<dyn PartnerRoleTypeMut> for InputOutputSpecification {}
impl Cast<dyn PerformerType> for InputOutputSpecification {}
impl Cast<dyn PerformerTypeMut> for InputOutputSpecification {}
impl Cast<dyn PotentialOwnerType> for InputOutputSpecification {}
impl Cast<dyn PotentialOwnerTypeMut> for InputOutputSpecification {}
impl Cast<dyn ProcessType> for InputOutputSpecification {}
impl Cast<dyn ProcessTypeMut> for InputOutputSpecification {}
impl Cast<dyn PropertyType> for InputOutputSpecification {}
impl Cast<dyn PropertyTypeMut> for InputOutputSpecification {}
impl Cast<dyn ReceiveTaskType> for InputOutputSpecification {}
impl Cast<dyn ReceiveTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn RelationshipType> for InputOutputSpecification {}
impl Cast<dyn RelationshipTypeMut> for InputOutputSpecification {}
impl Cast<dyn RenderingType> for InputOutputSpecification {}
impl Cast<dyn RenderingTypeMut> for InputOutputSpecification {}
impl Cast<dyn ResourceType> for InputOutputSpecification {}
impl Cast<dyn ResourceTypeMut> for InputOutputSpecification {}
impl Cast<dyn ResourceAssignmentExpressionType> for InputOutputSpecification {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for InputOutputSpecification {}
impl Cast<dyn ResourceParameterType> for InputOutputSpecification {}
impl Cast<dyn ResourceParameterTypeMut> for InputOutputSpecification {}
impl Cast<dyn ResourceParameterBindingType> for InputOutputSpecification {}
impl Cast<dyn ResourceParameterBindingTypeMut> for InputOutputSpecification {}
impl Cast<dyn ResourceRoleType> for InputOutputSpecification {}
impl Cast<dyn ResourceRoleTypeMut> for InputOutputSpecification {}
impl Cast<dyn RootElementType> for InputOutputSpecification {}
impl Cast<dyn RootElementTypeMut> for InputOutputSpecification {}
impl Cast<dyn ScriptTaskType> for InputOutputSpecification {}
impl Cast<dyn ScriptTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn ScriptType> for InputOutputSpecification {}
impl Cast<dyn ScriptTypeMut> for InputOutputSpecification {}
impl Cast<dyn SendTaskType> for InputOutputSpecification {}
impl Cast<dyn SendTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn SequenceFlowType> for InputOutputSpecification {}
impl Cast<dyn SequenceFlowTypeMut> for InputOutputSpecification {}
impl Cast<dyn ServiceTaskType> for InputOutputSpecification {}
impl Cast<dyn ServiceTaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn SignalType> for InputOutputSpecification {}
impl Cast<dyn SignalTypeMut> for InputOutputSpecification {}
impl Cast<dyn SignalEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn SignalEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn StandardLoopCharacteristicsType> for InputOutputSpecification {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for InputOutputSpecification {}
impl Cast<dyn StartEventType> for InputOutputSpecification {}
impl Cast<dyn StartEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn SubChoreographyType> for InputOutputSpecification {}
impl Cast<dyn SubChoreographyTypeMut> for InputOutputSpecification {}
impl Cast<dyn SubConversationType> for InputOutputSpecification {}
impl Cast<dyn SubConversationTypeMut> for InputOutputSpecification {}
impl Cast<dyn SubProcessType> for InputOutputSpecification {}
impl Cast<dyn SubProcessTypeMut> for InputOutputSpecification {}
impl Cast<dyn TaskType> for InputOutputSpecification {}
impl Cast<dyn TaskTypeMut> for InputOutputSpecification {}
impl Cast<dyn TerminateEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn TextAnnotationType> for InputOutputSpecification {}
impl Cast<dyn TextAnnotationTypeMut> for InputOutputSpecification {}
impl Cast<dyn TextType> for InputOutputSpecification {}
impl Cast<dyn TextTypeMut> for InputOutputSpecification {}
impl Cast<dyn ThrowEventType> for InputOutputSpecification {}
impl Cast<dyn ThrowEventTypeMut> for InputOutputSpecification {}
impl Cast<dyn TimerEventDefinitionType> for InputOutputSpecification {}
impl Cast<dyn TimerEventDefinitionTypeMut> for InputOutputSpecification {}
impl Cast<dyn TransactionType> for InputOutputSpecification {}
impl Cast<dyn TransactionTypeMut> for InputOutputSpecification {}
impl Cast<dyn UserTaskType> for InputOutputSpecification {}
impl Cast<dyn UserTaskTypeMut> for InputOutputSpecification {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:itemDefinition")]
pub struct ItemDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "structureRef")]
    #[tia("ItemDefinitionType",rg*="structure_ref","ItemDefinitionTypeMut",s)]
    pub structure_ref: Option<String>,
    #[xml(attr = "isCollection")]
    #[tia("ItemDefinitionType",rg*="is_collection","ItemDefinitionTypeMut",s)]
    pub is_collection: Option<bool>,
    #[xml(attr = "itemKind")]
    #[tia("ItemDefinitionType",rg*="item_kind","ItemDefinitionTypeMut",s)]
    pub item_kind: Option<String>,
}
impl DocumentElement for ItemDefinition {
    fn element(&self) -> Element {
        Element::ItemDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ItemDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for ItemDefinition {}
impl RootElementTypeMut for ItemDefinition {}
//

/// Access to `itemDefinition`
pub trait ItemDefinitionType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `structureRef`
    fn structure_ref(&self) -> &Option<String>;
    /// Get value of attribute `isCollection`
    fn is_collection(&self) -> &Option<bool>;
    /// Get value of attribute `itemKind`
    fn item_kind(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ItemDefinitionType);
impl_downcast!(ItemDefinitionType);
/// Mutable access to `itemDefinition`
pub trait ItemDefinitionTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + ItemDefinitionType
{
    /// Set value of attribute `structureRef`
    fn set_structure_ref(&mut self, value: Option<String>);
    /// Set value of attribute `isCollection`
    fn set_is_collection(&mut self, value: Option<bool>);
    /// Set value of attribute `itemKind`
    fn set_item_kind(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ItemDefinitionTypeMut);
impl_downcast!(ItemDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for ItemDefinition {}
impl Cast<dyn DefinitionsTypeMut> for ItemDefinition {}
impl Cast<dyn ImportType> for ItemDefinition {}
impl Cast<dyn ImportTypeMut> for ItemDefinition {}
impl Cast<dyn ActivityType> for ItemDefinition {}
impl Cast<dyn ActivityTypeMut> for ItemDefinition {}
impl Cast<dyn AdHocSubProcessType> for ItemDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for ItemDefinition {}
impl Cast<dyn ArtifactType> for ItemDefinition {}
impl Cast<dyn ArtifactTypeMut> for ItemDefinition {}
impl Cast<dyn AssignmentType> for ItemDefinition {}
impl Cast<dyn AssignmentTypeMut> for ItemDefinition {}
impl Cast<dyn AssociationType> for ItemDefinition {}
impl Cast<dyn AssociationTypeMut> for ItemDefinition {}
impl Cast<dyn AuditingType> for ItemDefinition {}
impl Cast<dyn AuditingTypeMut> for ItemDefinition {}
impl Cast<dyn BaseElementType> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ItemDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ItemDefinition {}
impl Cast<dyn BoundaryEventType> for ItemDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for ItemDefinition {}
impl Cast<dyn BusinessRuleTaskType> for ItemDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ItemDefinition {}
impl Cast<dyn CallableElementType> for ItemDefinition {}
impl Cast<dyn CallableElementTypeMut> for ItemDefinition {}
impl Cast<dyn CallActivityType> for ItemDefinition {}
impl Cast<dyn CallActivityTypeMut> for ItemDefinition {}
impl Cast<dyn CallChoreographyType> for ItemDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for ItemDefinition {}
impl Cast<dyn CallConversationType> for ItemDefinition {}
impl Cast<dyn CallConversationTypeMut> for ItemDefinition {}
impl Cast<dyn CancelEventDefinitionType> for ItemDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn CatchEventType> for ItemDefinition {}
impl Cast<dyn CatchEventTypeMut> for ItemDefinition {}
impl Cast<dyn CategoryType> for ItemDefinition {}
impl Cast<dyn CategoryTypeMut> for ItemDefinition {}
impl Cast<dyn CategoryValueType> for ItemDefinition {}
impl Cast<dyn CategoryValueTypeMut> for ItemDefinition {}
impl Cast<dyn ChoreographyType> for ItemDefinition {}
impl Cast<dyn ChoreographyTypeMut> for ItemDefinition {}
impl Cast<dyn ChoreographyActivityType> for ItemDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for ItemDefinition {}
impl Cast<dyn ChoreographyTaskType> for ItemDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for ItemDefinition {}
impl Cast<dyn CollaborationType> for ItemDefinition {}
impl Cast<dyn CollaborationTypeMut> for ItemDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for ItemDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ItemDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn ComplexGatewayType> for ItemDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for ItemDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for ItemDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn ConversationType> for ItemDefinition {}
impl Cast<dyn ConversationTypeMut> for ItemDefinition {}
impl Cast<dyn ConversationAssociationType> for ItemDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn ConversationLinkType> for ItemDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for ItemDefinition {}
impl Cast<dyn ConversationNodeType> for ItemDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for ItemDefinition {}
impl Cast<dyn CorrelationKeyType> for ItemDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyType> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ItemDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ItemDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for ItemDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ItemDefinition {}
impl Cast<dyn DataAssociationType> for ItemDefinition {}
impl Cast<dyn DataAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn DataInputType> for ItemDefinition {}
impl Cast<dyn DataInputTypeMut> for ItemDefinition {}
impl Cast<dyn DataInputAssociationType> for ItemDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn DataObjectType> for ItemDefinition {}
impl Cast<dyn DataObjectTypeMut> for ItemDefinition {}
impl Cast<dyn DataObjectReferenceType> for ItemDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for ItemDefinition {}
impl Cast<dyn DataOutputType> for ItemDefinition {}
impl Cast<dyn DataOutputTypeMut> for ItemDefinition {}
impl Cast<dyn DataOutputAssociationType> for ItemDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn DataStateType> for ItemDefinition {}
impl Cast<dyn DataStateTypeMut> for ItemDefinition {}
impl Cast<dyn DataStoreType> for ItemDefinition {}
impl Cast<dyn DataStoreTypeMut> for ItemDefinition {}
impl Cast<dyn DataStoreReferenceType> for ItemDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for ItemDefinition {}
impl Cast<dyn DocumentationType> for ItemDefinition {}
impl Cast<dyn DocumentationTypeMut> for ItemDefinition {}
impl Cast<dyn EndEventType> for ItemDefinition {}
impl Cast<dyn EndEventTypeMut> for ItemDefinition {}
impl Cast<dyn EndPointType> for ItemDefinition {}
impl Cast<dyn EndPointTypeMut> for ItemDefinition {}
impl Cast<dyn ErrorType> for ItemDefinition {}
impl Cast<dyn ErrorTypeMut> for ItemDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for ItemDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn EscalationType> for ItemDefinition {}
impl Cast<dyn EscalationTypeMut> for ItemDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for ItemDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn EventType> for ItemDefinition {}
impl Cast<dyn EventTypeMut> for ItemDefinition {}
impl Cast<dyn EventBasedGatewayType> for ItemDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for ItemDefinition {}
impl Cast<dyn EventDefinitionType> for ItemDefinition {}
impl Cast<dyn EventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn ExclusiveGatewayType> for ItemDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ItemDefinition {}
impl Cast<dyn ExpressionType> for ItemDefinition {}
impl Cast<dyn ExpressionTypeMut> for ItemDefinition {}
impl Cast<dyn ExtensionType> for ItemDefinition {}
impl Cast<dyn ExtensionTypeMut> for ItemDefinition {}
impl Cast<dyn ExtensionElementsType> for ItemDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for ItemDefinition {}
impl Cast<dyn FlowElementType> for ItemDefinition {}
impl Cast<dyn FlowElementTypeMut> for ItemDefinition {}
impl Cast<dyn FlowNodeType> for ItemDefinition {}
impl Cast<dyn FlowNodeTypeMut> for ItemDefinition {}
impl Cast<dyn FormalExpressionType> for ItemDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for ItemDefinition {}
impl Cast<dyn GatewayType> for ItemDefinition {}
impl Cast<dyn GatewayTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ItemDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for ItemDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalConversationType> for ItemDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalManualTaskType> for ItemDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalScriptTaskType> for ItemDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalTaskType> for ItemDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GlobalUserTaskType> for ItemDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for ItemDefinition {}
impl Cast<dyn GroupType> for ItemDefinition {}
impl Cast<dyn GroupTypeMut> for ItemDefinition {}
impl Cast<dyn HumanPerformerType> for ItemDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for ItemDefinition {}
impl Cast<dyn ImplicitThrowEventType> for ItemDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ItemDefinition {}
impl Cast<dyn InclusiveGatewayType> for ItemDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for ItemDefinition {}
impl Cast<dyn InputSetType> for ItemDefinition {}
impl Cast<dyn InputSetTypeMut> for ItemDefinition {}
impl Cast<dyn InterfaceType> for ItemDefinition {}
impl Cast<dyn InterfaceTypeMut> for ItemDefinition {}
impl Cast<dyn IntermediateCatchEventType> for ItemDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ItemDefinition {}
impl Cast<dyn IntermediateThrowEventType> for ItemDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ItemDefinition {}
impl Cast<dyn InputOutputBindingType> for ItemDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for ItemDefinition {}
impl Cast<dyn InputOutputSpecificationType> for ItemDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ItemDefinition {}
impl Cast<dyn ItemDefinitionType> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LaneType> for ItemDefinition {}
impl Cast<dyn LaneTypeMut> for ItemDefinition {}
impl Cast<dyn LaneSetType> for ItemDefinition {}
impl Cast<dyn LaneSetTypeMut> for ItemDefinition {}
impl Cast<dyn LinkEventDefinitionType> for ItemDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn LoopCharacteristicsType> for ItemDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ItemDefinition {}
impl Cast<dyn ManualTaskType> for ItemDefinition {}
impl Cast<dyn ManualTaskTypeMut> for ItemDefinition {}
impl Cast<dyn MessageType> for ItemDefinition {}
impl Cast<dyn MessageTypeMut> for ItemDefinition {}
impl Cast<dyn MessageEventDefinitionType> for ItemDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn MessageFlowType> for ItemDefinition {}
impl Cast<dyn MessageFlowTypeMut> for ItemDefinition {}
impl Cast<dyn MessageFlowAssociationType> for ItemDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn MonitoringType> for ItemDefinition {}
impl Cast<dyn MonitoringTypeMut> for ItemDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ItemDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ItemDefinition {}
impl Cast<dyn OperationType> for ItemDefinition {}
impl Cast<dyn OperationTypeMut> for ItemDefinition {}
impl Cast<dyn OutputSetType> for ItemDefinition {}
impl Cast<dyn OutputSetTypeMut> for ItemDefinition {}
impl Cast<dyn ParallelGatewayType> for ItemDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for ItemDefinition {}
impl Cast<dyn ParticipantType> for ItemDefinition {}
impl Cast<dyn ParticipantTypeMut> for ItemDefinition {}
impl Cast<dyn ParticipantAssociationType> for ItemDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for ItemDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for ItemDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ItemDefinition {}
impl Cast<dyn PartnerEntityType> for ItemDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for ItemDefinition {}
impl Cast<dyn PartnerRoleType> for ItemDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for ItemDefinition {}
impl Cast<dyn PerformerType> for ItemDefinition {}
impl Cast<dyn PerformerTypeMut> for ItemDefinition {}
impl Cast<dyn PotentialOwnerType> for ItemDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for ItemDefinition {}
impl Cast<dyn ProcessType> for ItemDefinition {}
impl Cast<dyn ProcessTypeMut> for ItemDefinition {}
impl Cast<dyn PropertyType> for ItemDefinition {}
impl Cast<dyn PropertyTypeMut> for ItemDefinition {}
impl Cast<dyn ReceiveTaskType> for ItemDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for ItemDefinition {}
impl Cast<dyn RelationshipType> for ItemDefinition {}
impl Cast<dyn RelationshipTypeMut> for ItemDefinition {}
impl Cast<dyn RenderingType> for ItemDefinition {}
impl Cast<dyn RenderingTypeMut> for ItemDefinition {}
impl Cast<dyn ResourceType> for ItemDefinition {}
impl Cast<dyn ResourceTypeMut> for ItemDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for ItemDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ItemDefinition {}
impl Cast<dyn ResourceParameterType> for ItemDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for ItemDefinition {}
impl Cast<dyn ResourceParameterBindingType> for ItemDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ItemDefinition {}
impl Cast<dyn ResourceRoleType> for ItemDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for ItemDefinition {}
impl Cast<dyn RootElementType> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for ItemDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for ItemDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for ItemDefinition {}
impl Cast<dyn ScriptType> for ItemDefinition {}
impl Cast<dyn ScriptTypeMut> for ItemDefinition {}
impl Cast<dyn SendTaskType> for ItemDefinition {}
impl Cast<dyn SendTaskTypeMut> for ItemDefinition {}
impl Cast<dyn SequenceFlowType> for ItemDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for ItemDefinition {}
impl Cast<dyn ServiceTaskType> for ItemDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for ItemDefinition {}
impl Cast<dyn SignalType> for ItemDefinition {}
impl Cast<dyn SignalTypeMut> for ItemDefinition {}
impl Cast<dyn SignalEventDefinitionType> for ItemDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for ItemDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ItemDefinition {}
impl Cast<dyn StartEventType> for ItemDefinition {}
impl Cast<dyn StartEventTypeMut> for ItemDefinition {}
impl Cast<dyn SubChoreographyType> for ItemDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for ItemDefinition {}
impl Cast<dyn SubConversationType> for ItemDefinition {}
impl Cast<dyn SubConversationTypeMut> for ItemDefinition {}
impl Cast<dyn SubProcessType> for ItemDefinition {}
impl Cast<dyn SubProcessTypeMut> for ItemDefinition {}
impl Cast<dyn TaskType> for ItemDefinition {}
impl Cast<dyn TaskTypeMut> for ItemDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for ItemDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn TextAnnotationType> for ItemDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for ItemDefinition {}
impl Cast<dyn TextType> for ItemDefinition {}
impl Cast<dyn TextTypeMut> for ItemDefinition {}
impl Cast<dyn ThrowEventType> for ItemDefinition {}
impl Cast<dyn ThrowEventTypeMut> for ItemDefinition {}
impl Cast<dyn TimerEventDefinitionType> for ItemDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ItemDefinition {}
impl Cast<dyn TransactionType> for ItemDefinition {}
impl Cast<dyn TransactionTypeMut> for ItemDefinition {}
impl Cast<dyn UserTaskType> for ItemDefinition {}
impl Cast<dyn UserTaskTypeMut> for ItemDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:lane")]
pub struct Lane {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("LaneType",rg*="name","LaneTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "partitionElementRef")]
    #[tia("LaneType",rg*="partition_element_ref","LaneTypeMut",s)]
    pub partition_element_ref: Option<String>,
    #[xml(child = "bpmn:partitionElement")]
    #[tia("LaneType",rg*="partition_element","LaneTypeMut",s,rmg*="partition_element_mut")]
    pub partition_element: Option<BaseElement>,
    #[xml(flatten_text = "bpmn:flowNodeRef")]
    #[tia("LaneType",rg*="flow_node_refs","LaneTypeMut",s,rmg*="flow_node_refs_mut")]
    pub flow_node_refs: Vec<String>,
    #[xml(child = "bpmn:childLaneSet")]
    #[tia("LaneType",rg*="child_lane_set","LaneTypeMut",s,rmg*="child_lane_set_mut")]
    pub child_lane_set: Option<LaneChildLaneSet>,
}
impl DocumentElement for Lane {
    fn element(&self) -> Element {
        Element::Lane
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Lane {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.partition_element.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.child_lane_set.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.partition_element.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.child_lane_set.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `lane`
pub trait LaneType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `partitionElementRef`
    fn partition_element_ref(&self) -> &Option<String>;
    /// Get value of `partitionElement` child
    fn partition_element(&self) -> &Option<BaseElement>;
    /// Get value of `flowNodeRef` child
    fn flow_node_refs(&self) -> &Vec<String>;
    /// Get value of `childLaneSet` child
    fn child_lane_set(&self) -> &Option<LaneChildLaneSet>;
}
dyn_clone::clone_trait_object!(LaneType);
impl_downcast!(LaneType);
/// Mutable access to `lane`
pub trait LaneTypeMut: BaseElementTypeMut + Downcast + Debug + Send + DynClone + LaneType {
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `partitionElementRef`
    fn set_partition_element_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `partitionElement` child
    fn partition_element_mut(&mut self) -> &mut Option<BaseElement>;
    /// Set value of `partitionElement` child
    fn set_partition_element(&mut self, value: Option<BaseElement>);
    /// Get a mutable value of `flowNodeRef` child
    fn flow_node_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `flowNodeRef` child
    fn set_flow_node_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `childLaneSet` child
    fn child_lane_set_mut(&mut self) -> &mut Option<LaneChildLaneSet>;
    /// Set value of `childLaneSet` child
    fn set_child_lane_set(&mut self, value: Option<LaneChildLaneSet>);
}
dyn_clone::clone_trait_object!(LaneTypeMut);
impl_downcast!(LaneTypeMut);
impl Cast<dyn DefinitionsType> for Lane {}
impl Cast<dyn DefinitionsTypeMut> for Lane {}
impl Cast<dyn ImportType> for Lane {}
impl Cast<dyn ImportTypeMut> for Lane {}
impl Cast<dyn ActivityType> for Lane {}
impl Cast<dyn ActivityTypeMut> for Lane {}
impl Cast<dyn AdHocSubProcessType> for Lane {}
impl Cast<dyn AdHocSubProcessTypeMut> for Lane {}
impl Cast<dyn ArtifactType> for Lane {}
impl Cast<dyn ArtifactTypeMut> for Lane {}
impl Cast<dyn AssignmentType> for Lane {}
impl Cast<dyn AssignmentTypeMut> for Lane {}
impl Cast<dyn AssociationType> for Lane {}
impl Cast<dyn AssociationTypeMut> for Lane {}
impl Cast<dyn AuditingType> for Lane {}
impl Cast<dyn AuditingTypeMut> for Lane {}
impl Cast<dyn BaseElementType> for Lane {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Lane {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Lane {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Lane {}
impl Cast<dyn BoundaryEventType> for Lane {}
impl Cast<dyn BoundaryEventTypeMut> for Lane {}
impl Cast<dyn BusinessRuleTaskType> for Lane {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Lane {}
impl Cast<dyn CallableElementType> for Lane {}
impl Cast<dyn CallableElementTypeMut> for Lane {}
impl Cast<dyn CallActivityType> for Lane {}
impl Cast<dyn CallActivityTypeMut> for Lane {}
impl Cast<dyn CallChoreographyType> for Lane {}
impl Cast<dyn CallChoreographyTypeMut> for Lane {}
impl Cast<dyn CallConversationType> for Lane {}
impl Cast<dyn CallConversationTypeMut> for Lane {}
impl Cast<dyn CancelEventDefinitionType> for Lane {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Lane {}
impl Cast<dyn CatchEventType> for Lane {}
impl Cast<dyn CatchEventTypeMut> for Lane {}
impl Cast<dyn CategoryType> for Lane {}
impl Cast<dyn CategoryTypeMut> for Lane {}
impl Cast<dyn CategoryValueType> for Lane {}
impl Cast<dyn CategoryValueTypeMut> for Lane {}
impl Cast<dyn ChoreographyType> for Lane {}
impl Cast<dyn ChoreographyTypeMut> for Lane {}
impl Cast<dyn ChoreographyActivityType> for Lane {}
impl Cast<dyn ChoreographyActivityTypeMut> for Lane {}
impl Cast<dyn ChoreographyTaskType> for Lane {}
impl Cast<dyn ChoreographyTaskTypeMut> for Lane {}
impl Cast<dyn CollaborationType> for Lane {}
impl Cast<dyn CollaborationTypeMut> for Lane {}
impl Cast<dyn CompensateEventDefinitionType> for Lane {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Lane {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Lane {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Lane {}
impl Cast<dyn ComplexGatewayType> for Lane {}
impl Cast<dyn ComplexGatewayTypeMut> for Lane {}
impl Cast<dyn ConditionalEventDefinitionType> for Lane {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Lane {}
impl Cast<dyn ConversationType> for Lane {}
impl Cast<dyn ConversationTypeMut> for Lane {}
impl Cast<dyn ConversationAssociationType> for Lane {}
impl Cast<dyn ConversationAssociationTypeMut> for Lane {}
impl Cast<dyn ConversationLinkType> for Lane {}
impl Cast<dyn ConversationLinkTypeMut> for Lane {}
impl Cast<dyn ConversationNodeType> for Lane {}
impl Cast<dyn ConversationNodeTypeMut> for Lane {}
impl Cast<dyn CorrelationKeyType> for Lane {}
impl Cast<dyn CorrelationKeyTypeMut> for Lane {}
impl Cast<dyn CorrelationPropertyType> for Lane {}
impl Cast<dyn CorrelationPropertyTypeMut> for Lane {}
impl Cast<dyn CorrelationPropertyBindingType> for Lane {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Lane {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Lane {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Lane {}
impl Cast<dyn CorrelationSubscriptionType> for Lane {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Lane {}
impl Cast<dyn DataAssociationType> for Lane {}
impl Cast<dyn DataAssociationTypeMut> for Lane {}
impl Cast<dyn DataInputType> for Lane {}
impl Cast<dyn DataInputTypeMut> for Lane {}
impl Cast<dyn DataInputAssociationType> for Lane {}
impl Cast<dyn DataInputAssociationTypeMut> for Lane {}
impl Cast<dyn DataObjectType> for Lane {}
impl Cast<dyn DataObjectTypeMut> for Lane {}
impl Cast<dyn DataObjectReferenceType> for Lane {}
impl Cast<dyn DataObjectReferenceTypeMut> for Lane {}
impl Cast<dyn DataOutputType> for Lane {}
impl Cast<dyn DataOutputTypeMut> for Lane {}
impl Cast<dyn DataOutputAssociationType> for Lane {}
impl Cast<dyn DataOutputAssociationTypeMut> for Lane {}
impl Cast<dyn DataStateType> for Lane {}
impl Cast<dyn DataStateTypeMut> for Lane {}
impl Cast<dyn DataStoreType> for Lane {}
impl Cast<dyn DataStoreTypeMut> for Lane {}
impl Cast<dyn DataStoreReferenceType> for Lane {}
impl Cast<dyn DataStoreReferenceTypeMut> for Lane {}
impl Cast<dyn DocumentationType> for Lane {}
impl Cast<dyn DocumentationTypeMut> for Lane {}
impl Cast<dyn EndEventType> for Lane {}
impl Cast<dyn EndEventTypeMut> for Lane {}
impl Cast<dyn EndPointType> for Lane {}
impl Cast<dyn EndPointTypeMut> for Lane {}
impl Cast<dyn ErrorType> for Lane {}
impl Cast<dyn ErrorTypeMut> for Lane {}
impl Cast<dyn ErrorEventDefinitionType> for Lane {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Lane {}
impl Cast<dyn EscalationType> for Lane {}
impl Cast<dyn EscalationTypeMut> for Lane {}
impl Cast<dyn EscalationEventDefinitionType> for Lane {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Lane {}
impl Cast<dyn EventType> for Lane {}
impl Cast<dyn EventTypeMut> for Lane {}
impl Cast<dyn EventBasedGatewayType> for Lane {}
impl Cast<dyn EventBasedGatewayTypeMut> for Lane {}
impl Cast<dyn EventDefinitionType> for Lane {}
impl Cast<dyn EventDefinitionTypeMut> for Lane {}
impl Cast<dyn ExclusiveGatewayType> for Lane {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Lane {}
impl Cast<dyn ExpressionType> for Lane {}
impl Cast<dyn ExpressionTypeMut> for Lane {}
impl Cast<dyn ExtensionType> for Lane {}
impl Cast<dyn ExtensionTypeMut> for Lane {}
impl Cast<dyn ExtensionElementsType> for Lane {}
impl Cast<dyn ExtensionElementsTypeMut> for Lane {}
impl Cast<dyn FlowElementType> for Lane {}
impl Cast<dyn FlowElementTypeMut> for Lane {}
impl Cast<dyn FlowNodeType> for Lane {}
impl Cast<dyn FlowNodeTypeMut> for Lane {}
impl Cast<dyn FormalExpressionType> for Lane {}
impl Cast<dyn FormalExpressionTypeMut> for Lane {}
impl Cast<dyn GatewayType> for Lane {}
impl Cast<dyn GatewayTypeMut> for Lane {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Lane {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Lane {}
impl Cast<dyn GlobalChoreographyTaskType> for Lane {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Lane {}
impl Cast<dyn GlobalConversationType> for Lane {}
impl Cast<dyn GlobalConversationTypeMut> for Lane {}
impl Cast<dyn GlobalManualTaskType> for Lane {}
impl Cast<dyn GlobalManualTaskTypeMut> for Lane {}
impl Cast<dyn GlobalScriptTaskType> for Lane {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Lane {}
impl Cast<dyn GlobalTaskType> for Lane {}
impl Cast<dyn GlobalTaskTypeMut> for Lane {}
impl Cast<dyn GlobalUserTaskType> for Lane {}
impl Cast<dyn GlobalUserTaskTypeMut> for Lane {}
impl Cast<dyn GroupType> for Lane {}
impl Cast<dyn GroupTypeMut> for Lane {}
impl Cast<dyn HumanPerformerType> for Lane {}
impl Cast<dyn HumanPerformerTypeMut> for Lane {}
impl Cast<dyn ImplicitThrowEventType> for Lane {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Lane {}
impl Cast<dyn InclusiveGatewayType> for Lane {}
impl Cast<dyn InclusiveGatewayTypeMut> for Lane {}
impl Cast<dyn InputSetType> for Lane {}
impl Cast<dyn InputSetTypeMut> for Lane {}
impl Cast<dyn InterfaceType> for Lane {}
impl Cast<dyn InterfaceTypeMut> for Lane {}
impl Cast<dyn IntermediateCatchEventType> for Lane {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Lane {}
impl Cast<dyn IntermediateThrowEventType> for Lane {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Lane {}
impl Cast<dyn InputOutputBindingType> for Lane {}
impl Cast<dyn InputOutputBindingTypeMut> for Lane {}
impl Cast<dyn InputOutputSpecificationType> for Lane {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Lane {}
impl Cast<dyn ItemDefinitionType> for Lane {}
impl Cast<dyn ItemDefinitionTypeMut> for Lane {}
impl Cast<dyn LaneType> for Lane {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LaneTypeMut> for Lane {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LaneSetType> for Lane {}
impl Cast<dyn LaneSetTypeMut> for Lane {}
impl Cast<dyn LinkEventDefinitionType> for Lane {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Lane {}
impl Cast<dyn LoopCharacteristicsType> for Lane {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Lane {}
impl Cast<dyn ManualTaskType> for Lane {}
impl Cast<dyn ManualTaskTypeMut> for Lane {}
impl Cast<dyn MessageType> for Lane {}
impl Cast<dyn MessageTypeMut> for Lane {}
impl Cast<dyn MessageEventDefinitionType> for Lane {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Lane {}
impl Cast<dyn MessageFlowType> for Lane {}
impl Cast<dyn MessageFlowTypeMut> for Lane {}
impl Cast<dyn MessageFlowAssociationType> for Lane {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Lane {}
impl Cast<dyn MonitoringType> for Lane {}
impl Cast<dyn MonitoringTypeMut> for Lane {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Lane {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Lane {}
impl Cast<dyn OperationType> for Lane {}
impl Cast<dyn OperationTypeMut> for Lane {}
impl Cast<dyn OutputSetType> for Lane {}
impl Cast<dyn OutputSetTypeMut> for Lane {}
impl Cast<dyn ParallelGatewayType> for Lane {}
impl Cast<dyn ParallelGatewayTypeMut> for Lane {}
impl Cast<dyn ParticipantType> for Lane {}
impl Cast<dyn ParticipantTypeMut> for Lane {}
impl Cast<dyn ParticipantAssociationType> for Lane {}
impl Cast<dyn ParticipantAssociationTypeMut> for Lane {}
impl Cast<dyn ParticipantMultiplicityType> for Lane {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Lane {}
impl Cast<dyn PartnerEntityType> for Lane {}
impl Cast<dyn PartnerEntityTypeMut> for Lane {}
impl Cast<dyn PartnerRoleType> for Lane {}
impl Cast<dyn PartnerRoleTypeMut> for Lane {}
impl Cast<dyn PerformerType> for Lane {}
impl Cast<dyn PerformerTypeMut> for Lane {}
impl Cast<dyn PotentialOwnerType> for Lane {}
impl Cast<dyn PotentialOwnerTypeMut> for Lane {}
impl Cast<dyn ProcessType> for Lane {}
impl Cast<dyn ProcessTypeMut> for Lane {}
impl Cast<dyn PropertyType> for Lane {}
impl Cast<dyn PropertyTypeMut> for Lane {}
impl Cast<dyn ReceiveTaskType> for Lane {}
impl Cast<dyn ReceiveTaskTypeMut> for Lane {}
impl Cast<dyn RelationshipType> for Lane {}
impl Cast<dyn RelationshipTypeMut> for Lane {}
impl Cast<dyn RenderingType> for Lane {}
impl Cast<dyn RenderingTypeMut> for Lane {}
impl Cast<dyn ResourceType> for Lane {}
impl Cast<dyn ResourceTypeMut> for Lane {}
impl Cast<dyn ResourceAssignmentExpressionType> for Lane {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Lane {}
impl Cast<dyn ResourceParameterType> for Lane {}
impl Cast<dyn ResourceParameterTypeMut> for Lane {}
impl Cast<dyn ResourceParameterBindingType> for Lane {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Lane {}
impl Cast<dyn ResourceRoleType> for Lane {}
impl Cast<dyn ResourceRoleTypeMut> for Lane {}
impl Cast<dyn RootElementType> for Lane {}
impl Cast<dyn RootElementTypeMut> for Lane {}
impl Cast<dyn ScriptTaskType> for Lane {}
impl Cast<dyn ScriptTaskTypeMut> for Lane {}
impl Cast<dyn ScriptType> for Lane {}
impl Cast<dyn ScriptTypeMut> for Lane {}
impl Cast<dyn SendTaskType> for Lane {}
impl Cast<dyn SendTaskTypeMut> for Lane {}
impl Cast<dyn SequenceFlowType> for Lane {}
impl Cast<dyn SequenceFlowTypeMut> for Lane {}
impl Cast<dyn ServiceTaskType> for Lane {}
impl Cast<dyn ServiceTaskTypeMut> for Lane {}
impl Cast<dyn SignalType> for Lane {}
impl Cast<dyn SignalTypeMut> for Lane {}
impl Cast<dyn SignalEventDefinitionType> for Lane {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Lane {}
impl Cast<dyn StandardLoopCharacteristicsType> for Lane {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Lane {}
impl Cast<dyn StartEventType> for Lane {}
impl Cast<dyn StartEventTypeMut> for Lane {}
impl Cast<dyn SubChoreographyType> for Lane {}
impl Cast<dyn SubChoreographyTypeMut> for Lane {}
impl Cast<dyn SubConversationType> for Lane {}
impl Cast<dyn SubConversationTypeMut> for Lane {}
impl Cast<dyn SubProcessType> for Lane {}
impl Cast<dyn SubProcessTypeMut> for Lane {}
impl Cast<dyn TaskType> for Lane {}
impl Cast<dyn TaskTypeMut> for Lane {}
impl Cast<dyn TerminateEventDefinitionType> for Lane {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Lane {}
impl Cast<dyn TextAnnotationType> for Lane {}
impl Cast<dyn TextAnnotationTypeMut> for Lane {}
impl Cast<dyn TextType> for Lane {}
impl Cast<dyn TextTypeMut> for Lane {}
impl Cast<dyn ThrowEventType> for Lane {}
impl Cast<dyn ThrowEventTypeMut> for Lane {}
impl Cast<dyn TimerEventDefinitionType> for Lane {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Lane {}
impl Cast<dyn TransactionType> for Lane {}
impl Cast<dyn TransactionTypeMut> for Lane {}
impl Cast<dyn UserTaskType> for Lane {}
impl Cast<dyn UserTaskTypeMut> for Lane {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:laneSet")]
pub struct LaneSet {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("LaneSetType",rg*="name","LaneSetTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:lane")]
    #[tia("LaneSetType",rg*="lanes","LaneSetTypeMut",s,rmg*="lanes_mut")]
    pub lanes: Vec<Lane>,
}
impl DocumentElement for LaneSet {
    fn element(&self) -> Element {
        Element::LaneSet
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for LaneSet {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.lanes.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.lanes.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `laneSet`
pub trait LaneSetType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `lane` child
    fn lanes(&self) -> &Vec<Lane>;
}
dyn_clone::clone_trait_object!(LaneSetType);
impl_downcast!(LaneSetType);
/// Mutable access to `laneSet`
pub trait LaneSetTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + LaneSetType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `lane` child
    fn lanes_mut(&mut self) -> &mut Vec<Lane>;
    /// Set value of `lane` child
    fn set_lanes(&mut self, value: Vec<Lane>);
}
dyn_clone::clone_trait_object!(LaneSetTypeMut);
impl_downcast!(LaneSetTypeMut);
impl Cast<dyn DefinitionsType> for LaneSet {}
impl Cast<dyn DefinitionsTypeMut> for LaneSet {}
impl Cast<dyn ImportType> for LaneSet {}
impl Cast<dyn ImportTypeMut> for LaneSet {}
impl Cast<dyn ActivityType> for LaneSet {}
impl Cast<dyn ActivityTypeMut> for LaneSet {}
impl Cast<dyn AdHocSubProcessType> for LaneSet {}
impl Cast<dyn AdHocSubProcessTypeMut> for LaneSet {}
impl Cast<dyn ArtifactType> for LaneSet {}
impl Cast<dyn ArtifactTypeMut> for LaneSet {}
impl Cast<dyn AssignmentType> for LaneSet {}
impl Cast<dyn AssignmentTypeMut> for LaneSet {}
impl Cast<dyn AssociationType> for LaneSet {}
impl Cast<dyn AssociationTypeMut> for LaneSet {}
impl Cast<dyn AuditingType> for LaneSet {}
impl Cast<dyn AuditingTypeMut> for LaneSet {}
impl Cast<dyn BaseElementType> for LaneSet {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for LaneSet {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for LaneSet {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for LaneSet {}
impl Cast<dyn BoundaryEventType> for LaneSet {}
impl Cast<dyn BoundaryEventTypeMut> for LaneSet {}
impl Cast<dyn BusinessRuleTaskType> for LaneSet {}
impl Cast<dyn BusinessRuleTaskTypeMut> for LaneSet {}
impl Cast<dyn CallableElementType> for LaneSet {}
impl Cast<dyn CallableElementTypeMut> for LaneSet {}
impl Cast<dyn CallActivityType> for LaneSet {}
impl Cast<dyn CallActivityTypeMut> for LaneSet {}
impl Cast<dyn CallChoreographyType> for LaneSet {}
impl Cast<dyn CallChoreographyTypeMut> for LaneSet {}
impl Cast<dyn CallConversationType> for LaneSet {}
impl Cast<dyn CallConversationTypeMut> for LaneSet {}
impl Cast<dyn CancelEventDefinitionType> for LaneSet {}
impl Cast<dyn CancelEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn CatchEventType> for LaneSet {}
impl Cast<dyn CatchEventTypeMut> for LaneSet {}
impl Cast<dyn CategoryType> for LaneSet {}
impl Cast<dyn CategoryTypeMut> for LaneSet {}
impl Cast<dyn CategoryValueType> for LaneSet {}
impl Cast<dyn CategoryValueTypeMut> for LaneSet {}
impl Cast<dyn ChoreographyType> for LaneSet {}
impl Cast<dyn ChoreographyTypeMut> for LaneSet {}
impl Cast<dyn ChoreographyActivityType> for LaneSet {}
impl Cast<dyn ChoreographyActivityTypeMut> for LaneSet {}
impl Cast<dyn ChoreographyTaskType> for LaneSet {}
impl Cast<dyn ChoreographyTaskTypeMut> for LaneSet {}
impl Cast<dyn CollaborationType> for LaneSet {}
impl Cast<dyn CollaborationTypeMut> for LaneSet {}
impl Cast<dyn CompensateEventDefinitionType> for LaneSet {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn ComplexBehaviorDefinitionType> for LaneSet {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for LaneSet {}
impl Cast<dyn ComplexGatewayType> for LaneSet {}
impl Cast<dyn ComplexGatewayTypeMut> for LaneSet {}
impl Cast<dyn ConditionalEventDefinitionType> for LaneSet {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn ConversationType> for LaneSet {}
impl Cast<dyn ConversationTypeMut> for LaneSet {}
impl Cast<dyn ConversationAssociationType> for LaneSet {}
impl Cast<dyn ConversationAssociationTypeMut> for LaneSet {}
impl Cast<dyn ConversationLinkType> for LaneSet {}
impl Cast<dyn ConversationLinkTypeMut> for LaneSet {}
impl Cast<dyn ConversationNodeType> for LaneSet {}
impl Cast<dyn ConversationNodeTypeMut> for LaneSet {}
impl Cast<dyn CorrelationKeyType> for LaneSet {}
impl Cast<dyn CorrelationKeyTypeMut> for LaneSet {}
impl Cast<dyn CorrelationPropertyType> for LaneSet {}
impl Cast<dyn CorrelationPropertyTypeMut> for LaneSet {}
impl Cast<dyn CorrelationPropertyBindingType> for LaneSet {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for LaneSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for LaneSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for LaneSet {}
impl Cast<dyn CorrelationSubscriptionType> for LaneSet {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for LaneSet {}
impl Cast<dyn DataAssociationType> for LaneSet {}
impl Cast<dyn DataAssociationTypeMut> for LaneSet {}
impl Cast<dyn DataInputType> for LaneSet {}
impl Cast<dyn DataInputTypeMut> for LaneSet {}
impl Cast<dyn DataInputAssociationType> for LaneSet {}
impl Cast<dyn DataInputAssociationTypeMut> for LaneSet {}
impl Cast<dyn DataObjectType> for LaneSet {}
impl Cast<dyn DataObjectTypeMut> for LaneSet {}
impl Cast<dyn DataObjectReferenceType> for LaneSet {}
impl Cast<dyn DataObjectReferenceTypeMut> for LaneSet {}
impl Cast<dyn DataOutputType> for LaneSet {}
impl Cast<dyn DataOutputTypeMut> for LaneSet {}
impl Cast<dyn DataOutputAssociationType> for LaneSet {}
impl Cast<dyn DataOutputAssociationTypeMut> for LaneSet {}
impl Cast<dyn DataStateType> for LaneSet {}
impl Cast<dyn DataStateTypeMut> for LaneSet {}
impl Cast<dyn DataStoreType> for LaneSet {}
impl Cast<dyn DataStoreTypeMut> for LaneSet {}
impl Cast<dyn DataStoreReferenceType> for LaneSet {}
impl Cast<dyn DataStoreReferenceTypeMut> for LaneSet {}
impl Cast<dyn DocumentationType> for LaneSet {}
impl Cast<dyn DocumentationTypeMut> for LaneSet {}
impl Cast<dyn EndEventType> for LaneSet {}
impl Cast<dyn EndEventTypeMut> for LaneSet {}
impl Cast<dyn EndPointType> for LaneSet {}
impl Cast<dyn EndPointTypeMut> for LaneSet {}
impl Cast<dyn ErrorType> for LaneSet {}
impl Cast<dyn ErrorTypeMut> for LaneSet {}
impl Cast<dyn ErrorEventDefinitionType> for LaneSet {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn EscalationType> for LaneSet {}
impl Cast<dyn EscalationTypeMut> for LaneSet {}
impl Cast<dyn EscalationEventDefinitionType> for LaneSet {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn EventType> for LaneSet {}
impl Cast<dyn EventTypeMut> for LaneSet {}
impl Cast<dyn EventBasedGatewayType> for LaneSet {}
impl Cast<dyn EventBasedGatewayTypeMut> for LaneSet {}
impl Cast<dyn EventDefinitionType> for LaneSet {}
impl Cast<dyn EventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn ExclusiveGatewayType> for LaneSet {}
impl Cast<dyn ExclusiveGatewayTypeMut> for LaneSet {}
impl Cast<dyn ExpressionType> for LaneSet {}
impl Cast<dyn ExpressionTypeMut> for LaneSet {}
impl Cast<dyn ExtensionType> for LaneSet {}
impl Cast<dyn ExtensionTypeMut> for LaneSet {}
impl Cast<dyn ExtensionElementsType> for LaneSet {}
impl Cast<dyn ExtensionElementsTypeMut> for LaneSet {}
impl Cast<dyn FlowElementType> for LaneSet {}
impl Cast<dyn FlowElementTypeMut> for LaneSet {}
impl Cast<dyn FlowNodeType> for LaneSet {}
impl Cast<dyn FlowNodeTypeMut> for LaneSet {}
impl Cast<dyn FormalExpressionType> for LaneSet {}
impl Cast<dyn FormalExpressionTypeMut> for LaneSet {}
impl Cast<dyn GatewayType> for LaneSet {}
impl Cast<dyn GatewayTypeMut> for LaneSet {}
impl Cast<dyn GlobalBusinessRuleTaskType> for LaneSet {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for LaneSet {}
impl Cast<dyn GlobalChoreographyTaskType> for LaneSet {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for LaneSet {}
impl Cast<dyn GlobalConversationType> for LaneSet {}
impl Cast<dyn GlobalConversationTypeMut> for LaneSet {}
impl Cast<dyn GlobalManualTaskType> for LaneSet {}
impl Cast<dyn GlobalManualTaskTypeMut> for LaneSet {}
impl Cast<dyn GlobalScriptTaskType> for LaneSet {}
impl Cast<dyn GlobalScriptTaskTypeMut> for LaneSet {}
impl Cast<dyn GlobalTaskType> for LaneSet {}
impl Cast<dyn GlobalTaskTypeMut> for LaneSet {}
impl Cast<dyn GlobalUserTaskType> for LaneSet {}
impl Cast<dyn GlobalUserTaskTypeMut> for LaneSet {}
impl Cast<dyn GroupType> for LaneSet {}
impl Cast<dyn GroupTypeMut> for LaneSet {}
impl Cast<dyn HumanPerformerType> for LaneSet {}
impl Cast<dyn HumanPerformerTypeMut> for LaneSet {}
impl Cast<dyn ImplicitThrowEventType> for LaneSet {}
impl Cast<dyn ImplicitThrowEventTypeMut> for LaneSet {}
impl Cast<dyn InclusiveGatewayType> for LaneSet {}
impl Cast<dyn InclusiveGatewayTypeMut> for LaneSet {}
impl Cast<dyn InputSetType> for LaneSet {}
impl Cast<dyn InputSetTypeMut> for LaneSet {}
impl Cast<dyn InterfaceType> for LaneSet {}
impl Cast<dyn InterfaceTypeMut> for LaneSet {}
impl Cast<dyn IntermediateCatchEventType> for LaneSet {}
impl Cast<dyn IntermediateCatchEventTypeMut> for LaneSet {}
impl Cast<dyn IntermediateThrowEventType> for LaneSet {}
impl Cast<dyn IntermediateThrowEventTypeMut> for LaneSet {}
impl Cast<dyn InputOutputBindingType> for LaneSet {}
impl Cast<dyn InputOutputBindingTypeMut> for LaneSet {}
impl Cast<dyn InputOutputSpecificationType> for LaneSet {}
impl Cast<dyn InputOutputSpecificationTypeMut> for LaneSet {}
impl Cast<dyn ItemDefinitionType> for LaneSet {}
impl Cast<dyn ItemDefinitionTypeMut> for LaneSet {}
impl Cast<dyn LaneType> for LaneSet {}
impl Cast<dyn LaneTypeMut> for LaneSet {}
impl Cast<dyn LaneSetType> for LaneSet {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LaneSetTypeMut> for LaneSet {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LinkEventDefinitionType> for LaneSet {}
impl Cast<dyn LinkEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn LoopCharacteristicsType> for LaneSet {}
impl Cast<dyn LoopCharacteristicsTypeMut> for LaneSet {}
impl Cast<dyn ManualTaskType> for LaneSet {}
impl Cast<dyn ManualTaskTypeMut> for LaneSet {}
impl Cast<dyn MessageType> for LaneSet {}
impl Cast<dyn MessageTypeMut> for LaneSet {}
impl Cast<dyn MessageEventDefinitionType> for LaneSet {}
impl Cast<dyn MessageEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn MessageFlowType> for LaneSet {}
impl Cast<dyn MessageFlowTypeMut> for LaneSet {}
impl Cast<dyn MessageFlowAssociationType> for LaneSet {}
impl Cast<dyn MessageFlowAssociationTypeMut> for LaneSet {}
impl Cast<dyn MonitoringType> for LaneSet {}
impl Cast<dyn MonitoringTypeMut> for LaneSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for LaneSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for LaneSet {}
impl Cast<dyn OperationType> for LaneSet {}
impl Cast<dyn OperationTypeMut> for LaneSet {}
impl Cast<dyn OutputSetType> for LaneSet {}
impl Cast<dyn OutputSetTypeMut> for LaneSet {}
impl Cast<dyn ParallelGatewayType> for LaneSet {}
impl Cast<dyn ParallelGatewayTypeMut> for LaneSet {}
impl Cast<dyn ParticipantType> for LaneSet {}
impl Cast<dyn ParticipantTypeMut> for LaneSet {}
impl Cast<dyn ParticipantAssociationType> for LaneSet {}
impl Cast<dyn ParticipantAssociationTypeMut> for LaneSet {}
impl Cast<dyn ParticipantMultiplicityType> for LaneSet {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for LaneSet {}
impl Cast<dyn PartnerEntityType> for LaneSet {}
impl Cast<dyn PartnerEntityTypeMut> for LaneSet {}
impl Cast<dyn PartnerRoleType> for LaneSet {}
impl Cast<dyn PartnerRoleTypeMut> for LaneSet {}
impl Cast<dyn PerformerType> for LaneSet {}
impl Cast<dyn PerformerTypeMut> for LaneSet {}
impl Cast<dyn PotentialOwnerType> for LaneSet {}
impl Cast<dyn PotentialOwnerTypeMut> for LaneSet {}
impl Cast<dyn ProcessType> for LaneSet {}
impl Cast<dyn ProcessTypeMut> for LaneSet {}
impl Cast<dyn PropertyType> for LaneSet {}
impl Cast<dyn PropertyTypeMut> for LaneSet {}
impl Cast<dyn ReceiveTaskType> for LaneSet {}
impl Cast<dyn ReceiveTaskTypeMut> for LaneSet {}
impl Cast<dyn RelationshipType> for LaneSet {}
impl Cast<dyn RelationshipTypeMut> for LaneSet {}
impl Cast<dyn RenderingType> for LaneSet {}
impl Cast<dyn RenderingTypeMut> for LaneSet {}
impl Cast<dyn ResourceType> for LaneSet {}
impl Cast<dyn ResourceTypeMut> for LaneSet {}
impl Cast<dyn ResourceAssignmentExpressionType> for LaneSet {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for LaneSet {}
impl Cast<dyn ResourceParameterType> for LaneSet {}
impl Cast<dyn ResourceParameterTypeMut> for LaneSet {}
impl Cast<dyn ResourceParameterBindingType> for LaneSet {}
impl Cast<dyn ResourceParameterBindingTypeMut> for LaneSet {}
impl Cast<dyn ResourceRoleType> for LaneSet {}
impl Cast<dyn ResourceRoleTypeMut> for LaneSet {}
impl Cast<dyn RootElementType> for LaneSet {}
impl Cast<dyn RootElementTypeMut> for LaneSet {}
impl Cast<dyn ScriptTaskType> for LaneSet {}
impl Cast<dyn ScriptTaskTypeMut> for LaneSet {}
impl Cast<dyn ScriptType> for LaneSet {}
impl Cast<dyn ScriptTypeMut> for LaneSet {}
impl Cast<dyn SendTaskType> for LaneSet {}
impl Cast<dyn SendTaskTypeMut> for LaneSet {}
impl Cast<dyn SequenceFlowType> for LaneSet {}
impl Cast<dyn SequenceFlowTypeMut> for LaneSet {}
impl Cast<dyn ServiceTaskType> for LaneSet {}
impl Cast<dyn ServiceTaskTypeMut> for LaneSet {}
impl Cast<dyn SignalType> for LaneSet {}
impl Cast<dyn SignalTypeMut> for LaneSet {}
impl Cast<dyn SignalEventDefinitionType> for LaneSet {}
impl Cast<dyn SignalEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn StandardLoopCharacteristicsType> for LaneSet {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for LaneSet {}
impl Cast<dyn StartEventType> for LaneSet {}
impl Cast<dyn StartEventTypeMut> for LaneSet {}
impl Cast<dyn SubChoreographyType> for LaneSet {}
impl Cast<dyn SubChoreographyTypeMut> for LaneSet {}
impl Cast<dyn SubConversationType> for LaneSet {}
impl Cast<dyn SubConversationTypeMut> for LaneSet {}
impl Cast<dyn SubProcessType> for LaneSet {}
impl Cast<dyn SubProcessTypeMut> for LaneSet {}
impl Cast<dyn TaskType> for LaneSet {}
impl Cast<dyn TaskTypeMut> for LaneSet {}
impl Cast<dyn TerminateEventDefinitionType> for LaneSet {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn TextAnnotationType> for LaneSet {}
impl Cast<dyn TextAnnotationTypeMut> for LaneSet {}
impl Cast<dyn TextType> for LaneSet {}
impl Cast<dyn TextTypeMut> for LaneSet {}
impl Cast<dyn ThrowEventType> for LaneSet {}
impl Cast<dyn ThrowEventTypeMut> for LaneSet {}
impl Cast<dyn TimerEventDefinitionType> for LaneSet {}
impl Cast<dyn TimerEventDefinitionTypeMut> for LaneSet {}
impl Cast<dyn TransactionType> for LaneSet {}
impl Cast<dyn TransactionTypeMut> for LaneSet {}
impl Cast<dyn UserTaskType> for LaneSet {}
impl Cast<dyn UserTaskTypeMut> for LaneSet {}
/// Wrapper for lane::childLaneSet element
#[serde(transparent)]
#[derive(Hash, Default, From, Clone, PartialEq, Debug, Serialize, Deserialize, Deref, DerefMut)]
pub struct LaneChildLaneSet(pub LaneSet);
impl<'a> XmlRead<'a> for LaneChildLaneSet {
    fn from_reader(reader: &mut XmlReader<'a>) -> XmlResult<Self> {
        Ok(LaneChildLaneSet(LaneSet::from_reader(
            &mut XmlReader::new(&reader.read_source_till_end("childLaneSet", "laneSet")?),
        )?))
    }
}

impl DocumentElementContainer for LaneChildLaneSet {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        self.0.find_by_id_mut(id)
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        self.0.find_by_id(id)
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:linkEventDefinition")]
pub struct LinkEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("LinkEventDefinitionType",rg*="name","LinkEventDefinitionTypeMut",s)]
    pub name: String,
    #[xml(flatten_text = "bpmn:source")]
    #[tia("LinkEventDefinitionType",rg*="sources","LinkEventDefinitionTypeMut",s,rmg*="sources_mut")]
    pub sources: Vec<String>,
    #[xml(flatten_text = "bpmn:target")]
    #[tia("LinkEventDefinitionType",rg*="target","LinkEventDefinitionTypeMut",s,rmg*="target_mut")]
    pub target: Option<String>,
}
impl DocumentElement for LinkEventDefinition {
    fn element(&self) -> Element {
        Element::LinkEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for LinkEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for LinkEventDefinition {}
impl EventDefinitionTypeMut for LinkEventDefinition {}
impl RootElementType for LinkEventDefinition {}
impl RootElementTypeMut for LinkEventDefinition {}
//

/// Access to `linkEventDefinition`
pub trait LinkEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `name`
    fn name(&self) -> &String;
    /// Get value of `source` child
    fn sources(&self) -> &Vec<String>;
    /// Get value of `target` child
    fn target(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(LinkEventDefinitionType);
impl_downcast!(LinkEventDefinitionType);
/// Mutable access to `linkEventDefinition`
pub trait LinkEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + LinkEventDefinitionType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: String);
    /// Get a mutable value of `source` child
    fn sources_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `source` child
    fn set_sources(&mut self, value: Vec<String>);
    /// Get a mutable value of `target` child
    fn target_mut(&mut self) -> &mut Option<String>;
    /// Set value of `target` child
    fn set_target(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(LinkEventDefinitionTypeMut);
impl_downcast!(LinkEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for LinkEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for LinkEventDefinition {}
impl Cast<dyn ImportType> for LinkEventDefinition {}
impl Cast<dyn ImportTypeMut> for LinkEventDefinition {}
impl Cast<dyn ActivityType> for LinkEventDefinition {}
impl Cast<dyn ActivityTypeMut> for LinkEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for LinkEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for LinkEventDefinition {}
impl Cast<dyn ArtifactType> for LinkEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for LinkEventDefinition {}
impl Cast<dyn AssignmentType> for LinkEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for LinkEventDefinition {}
impl Cast<dyn AssociationType> for LinkEventDefinition {}
impl Cast<dyn AssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn AuditingType> for LinkEventDefinition {}
impl Cast<dyn AuditingTypeMut> for LinkEventDefinition {}
impl Cast<dyn BaseElementType> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for LinkEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for LinkEventDefinition {}
impl Cast<dyn BoundaryEventType> for LinkEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for LinkEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn CallableElementType> for LinkEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for LinkEventDefinition {}
impl Cast<dyn CallActivityType> for LinkEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for LinkEventDefinition {}
impl Cast<dyn CallChoreographyType> for LinkEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for LinkEventDefinition {}
impl Cast<dyn CallConversationType> for LinkEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for LinkEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn CatchEventType> for LinkEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn CategoryType> for LinkEventDefinition {}
impl Cast<dyn CategoryTypeMut> for LinkEventDefinition {}
impl Cast<dyn CategoryValueType> for LinkEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for LinkEventDefinition {}
impl Cast<dyn ChoreographyType> for LinkEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for LinkEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for LinkEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for LinkEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for LinkEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn CollaborationType> for LinkEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for LinkEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for LinkEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ComplexGatewayType> for LinkEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ConversationType> for LinkEventDefinition {}
impl Cast<dyn ConversationTypeMut> for LinkEventDefinition {}
impl Cast<dyn ConversationAssociationType> for LinkEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn ConversationLinkType> for LinkEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for LinkEventDefinition {}
impl Cast<dyn ConversationNodeType> for LinkEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for LinkEventDefinition {}
impl Cast<dyn CorrelationKeyType> for LinkEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for LinkEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for LinkEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for LinkEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataAssociationType> for LinkEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataInputType> for LinkEventDefinition {}
impl Cast<dyn DataInputTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataInputAssociationType> for LinkEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataObjectType> for LinkEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for LinkEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataOutputType> for LinkEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for LinkEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataStateType> for LinkEventDefinition {}
impl Cast<dyn DataStateTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataStoreType> for LinkEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for LinkEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for LinkEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for LinkEventDefinition {}
impl Cast<dyn DocumentationType> for LinkEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for LinkEventDefinition {}
impl Cast<dyn EndEventType> for LinkEventDefinition {}
impl Cast<dyn EndEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn EndPointType> for LinkEventDefinition {}
impl Cast<dyn EndPointTypeMut> for LinkEventDefinition {}
impl Cast<dyn ErrorType> for LinkEventDefinition {}
impl Cast<dyn ErrorTypeMut> for LinkEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn EscalationType> for LinkEventDefinition {}
impl Cast<dyn EscalationTypeMut> for LinkEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn EventType> for LinkEventDefinition {}
impl Cast<dyn EventTypeMut> for LinkEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for LinkEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn EventDefinitionType> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for LinkEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn ExpressionType> for LinkEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ExtensionType> for LinkEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ExtensionElementsType> for LinkEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for LinkEventDefinition {}
impl Cast<dyn FlowElementType> for LinkEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for LinkEventDefinition {}
impl Cast<dyn FlowNodeType> for LinkEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for LinkEventDefinition {}
impl Cast<dyn FormalExpressionType> for LinkEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for LinkEventDefinition {}
impl Cast<dyn GatewayType> for LinkEventDefinition {}
impl Cast<dyn GatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalConversationType> for LinkEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for LinkEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn GroupType> for LinkEventDefinition {}
impl Cast<dyn GroupTypeMut> for LinkEventDefinition {}
impl Cast<dyn HumanPerformerType> for LinkEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for LinkEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for LinkEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for LinkEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn InputSetType> for LinkEventDefinition {}
impl Cast<dyn InputSetTypeMut> for LinkEventDefinition {}
impl Cast<dyn InterfaceType> for LinkEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for LinkEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for LinkEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for LinkEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn InputOutputBindingType> for LinkEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for LinkEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for LinkEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for LinkEventDefinition {}
impl Cast<dyn ItemDefinitionType> for LinkEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn LaneType> for LinkEventDefinition {}
impl Cast<dyn LaneTypeMut> for LinkEventDefinition {}
impl Cast<dyn LaneSetType> for LinkEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for LinkEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LoopCharacteristicsType> for LinkEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for LinkEventDefinition {}
impl Cast<dyn ManualTaskType> for LinkEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn MessageType> for LinkEventDefinition {}
impl Cast<dyn MessageTypeMut> for LinkEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn MessageFlowType> for LinkEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for LinkEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for LinkEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn MonitoringType> for LinkEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for LinkEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for LinkEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for LinkEventDefinition {}
impl Cast<dyn OperationType> for LinkEventDefinition {}
impl Cast<dyn OperationTypeMut> for LinkEventDefinition {}
impl Cast<dyn OutputSetType> for LinkEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for LinkEventDefinition {}
impl Cast<dyn ParallelGatewayType> for LinkEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for LinkEventDefinition {}
impl Cast<dyn ParticipantType> for LinkEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for LinkEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for LinkEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for LinkEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for LinkEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for LinkEventDefinition {}
impl Cast<dyn PartnerEntityType> for LinkEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for LinkEventDefinition {}
impl Cast<dyn PartnerRoleType> for LinkEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for LinkEventDefinition {}
impl Cast<dyn PerformerType> for LinkEventDefinition {}
impl Cast<dyn PerformerTypeMut> for LinkEventDefinition {}
impl Cast<dyn PotentialOwnerType> for LinkEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for LinkEventDefinition {}
impl Cast<dyn ProcessType> for LinkEventDefinition {}
impl Cast<dyn ProcessTypeMut> for LinkEventDefinition {}
impl Cast<dyn PropertyType> for LinkEventDefinition {}
impl Cast<dyn PropertyTypeMut> for LinkEventDefinition {}
impl Cast<dyn ReceiveTaskType> for LinkEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn RelationshipType> for LinkEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for LinkEventDefinition {}
impl Cast<dyn RenderingType> for LinkEventDefinition {}
impl Cast<dyn RenderingTypeMut> for LinkEventDefinition {}
impl Cast<dyn ResourceType> for LinkEventDefinition {}
impl Cast<dyn ResourceTypeMut> for LinkEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for LinkEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for LinkEventDefinition {}
impl Cast<dyn ResourceParameterType> for LinkEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for LinkEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for LinkEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for LinkEventDefinition {}
impl Cast<dyn ResourceRoleType> for LinkEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for LinkEventDefinition {}
impl Cast<dyn RootElementType> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for LinkEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for LinkEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn ScriptType> for LinkEventDefinition {}
impl Cast<dyn ScriptTypeMut> for LinkEventDefinition {}
impl Cast<dyn SendTaskType> for LinkEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn SequenceFlowType> for LinkEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for LinkEventDefinition {}
impl Cast<dyn ServiceTaskType> for LinkEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn SignalType> for LinkEventDefinition {}
impl Cast<dyn SignalTypeMut> for LinkEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for LinkEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for LinkEventDefinition {}
impl Cast<dyn StartEventType> for LinkEventDefinition {}
impl Cast<dyn StartEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn SubChoreographyType> for LinkEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for LinkEventDefinition {}
impl Cast<dyn SubConversationType> for LinkEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for LinkEventDefinition {}
impl Cast<dyn SubProcessType> for LinkEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for LinkEventDefinition {}
impl Cast<dyn TaskType> for LinkEventDefinition {}
impl Cast<dyn TaskTypeMut> for LinkEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn TextAnnotationType> for LinkEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for LinkEventDefinition {}
impl Cast<dyn TextType> for LinkEventDefinition {}
impl Cast<dyn TextTypeMut> for LinkEventDefinition {}
impl Cast<dyn ThrowEventType> for LinkEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for LinkEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for LinkEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for LinkEventDefinition {}
impl Cast<dyn TransactionType> for LinkEventDefinition {}
impl Cast<dyn TransactionTypeMut> for LinkEventDefinition {}
impl Cast<dyn UserTaskType> for LinkEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for LinkEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:loopCharacteristics")]
#[serde(tag = "type")]
pub enum LoopCharacteristics {
    #[xml(tag = "bpmn:multiInstanceLoopCharacteristics")]
    MultiInstanceLoopCharacteristics(MultiInstanceLoopCharacteristics),
    #[xml(tag = "bpmn:standardLoopCharacteristics")]
    StandardLoopCharacteristics(StandardLoopCharacteristics),
}
impl LoopCharacteristics {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Box::new(e) as Box<dyn DocumentElement>
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Box::new(e) as Box<dyn DocumentElement>
            }
        }
    }
}
impl DocumentElementContainer for LoopCharacteristics {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => e.find_by_id_mut(id),
            LoopCharacteristics::StandardLoopCharacteristics(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => e.find_by_id(id),
            LoopCharacteristics::StandardLoopCharacteristics(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for LoopCharacteristics {
    fn element(&self) -> Element {
        Element::LoopCharacteristics
    }
}
/// Access to `loopCharacteristics`
pub trait LoopCharacteristicsType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(LoopCharacteristicsType);
impl_downcast!(LoopCharacteristicsType);
/// Mutable access to `loopCharacteristics`
pub trait LoopCharacteristicsTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + LoopCharacteristicsType
{
}
dyn_clone::clone_trait_object!(LoopCharacteristicsTypeMut);
impl_downcast!(LoopCharacteristicsTypeMut);
impl Cast<dyn DefinitionsType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DefinitionsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImportType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImportType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImportType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImportType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImportTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImportTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImportTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImportTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImportTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ActivityType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ActivityType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ActivityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ActivityType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ActivityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ActivityTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ActivityTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ActivityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ArtifactType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ArtifactType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ArtifactType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ArtifactType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ArtifactType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ArtifactTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ArtifactTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ArtifactTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AssignmentType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssignmentType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssignmentType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssignmentType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssignmentType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssignmentTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssignmentTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssignmentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AuditingType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AuditingType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AuditingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AuditingType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AuditingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn AuditingTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AuditingTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AuditingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn AuditingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BoundaryEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallableElementType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallableElementType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallableElementType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallableElementTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallActivityType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallActivityType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallActivityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallActivityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallActivityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallChoreographyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallConversationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallConversationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CatchEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CatchEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CatchEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CatchEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CatchEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CatchEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CatchEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CatchEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CategoryType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CategoryTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CategoryValueType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CategoryValueTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CollaborationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CollaborationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CollaborationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CollaborationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CollaborationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CollaborationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexGatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationLinkType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationNodeType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationKeyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStateType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStateType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStateType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStateType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStateType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStateTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStateTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStateTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStateTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStoreType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DocumentationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DocumentationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DocumentationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DocumentationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DocumentationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn DocumentationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EndEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EndEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EndPointType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndPointType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndPointType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndPointType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndPointType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EndPointTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndPointTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndPointTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EndPointTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExpressionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExpressionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExpressionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExpressionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExtensionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExtensionElementsType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowElementType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowElementType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowElementType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowElementType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowElementTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowElementTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowElementTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowNodeType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FlowNodeTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FormalExpressionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalConversationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GroupType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GroupType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GroupType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GroupType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn GroupTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GroupTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GroupTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn GroupTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn GroupTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn HumanPerformerType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputSetType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputSetType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputSetType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputSetType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputSetType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputSetTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputSetTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputSetTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputSetTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InterfaceType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InterfaceType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InterfaceType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InterfaceType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InterfaceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InterfaceTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InterfaceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InterfaceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputBindingType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ItemDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LaneType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LaneType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LaneTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LaneTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LaneSetType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneSetType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneSetType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LaneSetType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneSetTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LaneSetTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LaneSetTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LaneSetTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ManualTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ManualTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MonitoringType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MonitoringType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MonitoringType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MonitoringType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MonitoringType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MonitoringTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MonitoringTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MonitoringTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OperationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OperationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OperationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OperationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OperationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OperationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OperationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OutputSetType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OutputSetType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OutputSetType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OutputSetType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OutputSetType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OutputSetTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OutputSetTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn OutputSetTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParallelGatewayType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerEntityType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerEntityTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerRoleType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PartnerRoleTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PerformerType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PerformerType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PerformerType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PerformerType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PerformerType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PerformerTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PerformerTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PerformerTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PerformerTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PotentialOwnerType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ProcessType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ProcessType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ProcessType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ProcessType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ProcessTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ProcessTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ProcessTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ProcessTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ProcessTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PropertyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PropertyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PropertyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PropertyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PropertyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn PropertyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PropertyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PropertyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn PropertyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ReceiveTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RelationshipType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RelationshipType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RelationshipType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RelationshipType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RelationshipTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RelationshipTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RenderingType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RenderingType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RenderingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RenderingType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RenderingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RenderingTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RenderingTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RenderingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RenderingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceRoleType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ResourceRoleTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RootElementType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RootElementType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RootElementType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RootElementType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn RootElementTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RootElementTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RootElementTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn RootElementTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ScriptTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ScriptType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ScriptTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ScriptTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ScriptTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SendTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SendTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SendTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SendTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SendTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SendTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SendTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SendTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SequenceFlowType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SequenceFlowTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ServiceTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ServiceTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StartEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StartEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StartEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StartEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StartEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StartEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn StartEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubChoreographyType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubConversationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubConversationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubConversationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubConversationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubProcessType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubProcessType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubProcessType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubProcessType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubProcessType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubProcessTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubProcessTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn SubProcessTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TaskTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextAnnotationType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TextTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TextTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TextTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ThrowEventType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn ThrowEventTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TransactionType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TransactionType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TransactionType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TransactionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn TransactionTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TransactionTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TransactionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn TransactionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn UserTaskType> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn UserTaskType>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn UserTaskType>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn UserTaskType>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn UserTaskType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for LoopCharacteristics {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn UserTaskTypeMut>::cast(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn UserTaskTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            LoopCharacteristics::MultiInstanceLoopCharacteristics(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
            LoopCharacteristics::StandardLoopCharacteristics(e) => {
                Cast::<dyn UserTaskTypeMut>::cast_mut(e)
            }
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:manualTask")]
pub struct ManualTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
}
impl DocumentElement for ManualTask {
    fn element(&self) -> Element {
        Element::ManualTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ManualTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ManualTaskType for ManualTask {}
impl ManualTaskTypeMut for ManualTask {}
impl TaskType for ManualTask {}
impl TaskTypeMut for ManualTask {}
//

/// Access to `manualTask`
pub trait ManualTaskType: TaskType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ManualTaskType);
impl_downcast!(ManualTaskType);
/// Mutable access to `manualTask`
pub trait ManualTaskTypeMut:
    TaskTypeMut + Downcast + Debug + Send + DynClone + ManualTaskType
{
}
dyn_clone::clone_trait_object!(ManualTaskTypeMut);
impl_downcast!(ManualTaskTypeMut);
impl Cast<dyn DefinitionsType> for ManualTask {}
impl Cast<dyn DefinitionsTypeMut> for ManualTask {}
impl Cast<dyn ImportType> for ManualTask {}
impl Cast<dyn ImportTypeMut> for ManualTask {}
impl Cast<dyn ActivityType> for ManualTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for ManualTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for ManualTask {}
impl Cast<dyn ArtifactType> for ManualTask {}
impl Cast<dyn ArtifactTypeMut> for ManualTask {}
impl Cast<dyn AssignmentType> for ManualTask {}
impl Cast<dyn AssignmentTypeMut> for ManualTask {}
impl Cast<dyn AssociationType> for ManualTask {}
impl Cast<dyn AssociationTypeMut> for ManualTask {}
impl Cast<dyn AuditingType> for ManualTask {}
impl Cast<dyn AuditingTypeMut> for ManualTask {}
impl Cast<dyn BaseElementType> for ManualTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ManualTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ManualTask {}
impl Cast<dyn BoundaryEventType> for ManualTask {}
impl Cast<dyn BoundaryEventTypeMut> for ManualTask {}
impl Cast<dyn BusinessRuleTaskType> for ManualTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ManualTask {}
impl Cast<dyn CallableElementType> for ManualTask {}
impl Cast<dyn CallableElementTypeMut> for ManualTask {}
impl Cast<dyn CallActivityType> for ManualTask {}
impl Cast<dyn CallActivityTypeMut> for ManualTask {}
impl Cast<dyn CallChoreographyType> for ManualTask {}
impl Cast<dyn CallChoreographyTypeMut> for ManualTask {}
impl Cast<dyn CallConversationType> for ManualTask {}
impl Cast<dyn CallConversationTypeMut> for ManualTask {}
impl Cast<dyn CancelEventDefinitionType> for ManualTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn CatchEventType> for ManualTask {}
impl Cast<dyn CatchEventTypeMut> for ManualTask {}
impl Cast<dyn CategoryType> for ManualTask {}
impl Cast<dyn CategoryTypeMut> for ManualTask {}
impl Cast<dyn CategoryValueType> for ManualTask {}
impl Cast<dyn CategoryValueTypeMut> for ManualTask {}
impl Cast<dyn ChoreographyType> for ManualTask {}
impl Cast<dyn ChoreographyTypeMut> for ManualTask {}
impl Cast<dyn ChoreographyActivityType> for ManualTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for ManualTask {}
impl Cast<dyn ChoreographyTaskType> for ManualTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for ManualTask {}
impl Cast<dyn CollaborationType> for ManualTask {}
impl Cast<dyn CollaborationTypeMut> for ManualTask {}
impl Cast<dyn CompensateEventDefinitionType> for ManualTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ManualTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ManualTask {}
impl Cast<dyn ComplexGatewayType> for ManualTask {}
impl Cast<dyn ComplexGatewayTypeMut> for ManualTask {}
impl Cast<dyn ConditionalEventDefinitionType> for ManualTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn ConversationType> for ManualTask {}
impl Cast<dyn ConversationTypeMut> for ManualTask {}
impl Cast<dyn ConversationAssociationType> for ManualTask {}
impl Cast<dyn ConversationAssociationTypeMut> for ManualTask {}
impl Cast<dyn ConversationLinkType> for ManualTask {}
impl Cast<dyn ConversationLinkTypeMut> for ManualTask {}
impl Cast<dyn ConversationNodeType> for ManualTask {}
impl Cast<dyn ConversationNodeTypeMut> for ManualTask {}
impl Cast<dyn CorrelationKeyType> for ManualTask {}
impl Cast<dyn CorrelationKeyTypeMut> for ManualTask {}
impl Cast<dyn CorrelationPropertyType> for ManualTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for ManualTask {}
impl Cast<dyn CorrelationPropertyBindingType> for ManualTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ManualTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ManualTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ManualTask {}
impl Cast<dyn CorrelationSubscriptionType> for ManualTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ManualTask {}
impl Cast<dyn DataAssociationType> for ManualTask {}
impl Cast<dyn DataAssociationTypeMut> for ManualTask {}
impl Cast<dyn DataInputType> for ManualTask {}
impl Cast<dyn DataInputTypeMut> for ManualTask {}
impl Cast<dyn DataInputAssociationType> for ManualTask {}
impl Cast<dyn DataInputAssociationTypeMut> for ManualTask {}
impl Cast<dyn DataObjectType> for ManualTask {}
impl Cast<dyn DataObjectTypeMut> for ManualTask {}
impl Cast<dyn DataObjectReferenceType> for ManualTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for ManualTask {}
impl Cast<dyn DataOutputType> for ManualTask {}
impl Cast<dyn DataOutputTypeMut> for ManualTask {}
impl Cast<dyn DataOutputAssociationType> for ManualTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for ManualTask {}
impl Cast<dyn DataStateType> for ManualTask {}
impl Cast<dyn DataStateTypeMut> for ManualTask {}
impl Cast<dyn DataStoreType> for ManualTask {}
impl Cast<dyn DataStoreTypeMut> for ManualTask {}
impl Cast<dyn DataStoreReferenceType> for ManualTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for ManualTask {}
impl Cast<dyn DocumentationType> for ManualTask {}
impl Cast<dyn DocumentationTypeMut> for ManualTask {}
impl Cast<dyn EndEventType> for ManualTask {}
impl Cast<dyn EndEventTypeMut> for ManualTask {}
impl Cast<dyn EndPointType> for ManualTask {}
impl Cast<dyn EndPointTypeMut> for ManualTask {}
impl Cast<dyn ErrorType> for ManualTask {}
impl Cast<dyn ErrorTypeMut> for ManualTask {}
impl Cast<dyn ErrorEventDefinitionType> for ManualTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn EscalationType> for ManualTask {}
impl Cast<dyn EscalationTypeMut> for ManualTask {}
impl Cast<dyn EscalationEventDefinitionType> for ManualTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn EventType> for ManualTask {}
impl Cast<dyn EventTypeMut> for ManualTask {}
impl Cast<dyn EventBasedGatewayType> for ManualTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for ManualTask {}
impl Cast<dyn EventDefinitionType> for ManualTask {}
impl Cast<dyn EventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn ExclusiveGatewayType> for ManualTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ManualTask {}
impl Cast<dyn ExpressionType> for ManualTask {}
impl Cast<dyn ExpressionTypeMut> for ManualTask {}
impl Cast<dyn ExtensionType> for ManualTask {}
impl Cast<dyn ExtensionTypeMut> for ManualTask {}
impl Cast<dyn ExtensionElementsType> for ManualTask {}
impl Cast<dyn ExtensionElementsTypeMut> for ManualTask {}
impl Cast<dyn FlowElementType> for ManualTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ManualTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ManualTask {}
impl Cast<dyn FormalExpressionTypeMut> for ManualTask {}
impl Cast<dyn GatewayType> for ManualTask {}
impl Cast<dyn GatewayTypeMut> for ManualTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ManualTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ManualTask {}
impl Cast<dyn GlobalChoreographyTaskType> for ManualTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ManualTask {}
impl Cast<dyn GlobalConversationType> for ManualTask {}
impl Cast<dyn GlobalConversationTypeMut> for ManualTask {}
impl Cast<dyn GlobalManualTaskType> for ManualTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for ManualTask {}
impl Cast<dyn GlobalScriptTaskType> for ManualTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ManualTask {}
impl Cast<dyn GlobalTaskType> for ManualTask {}
impl Cast<dyn GlobalTaskTypeMut> for ManualTask {}
impl Cast<dyn GlobalUserTaskType> for ManualTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for ManualTask {}
impl Cast<dyn GroupType> for ManualTask {}
impl Cast<dyn GroupTypeMut> for ManualTask {}
impl Cast<dyn HumanPerformerType> for ManualTask {}
impl Cast<dyn HumanPerformerTypeMut> for ManualTask {}
impl Cast<dyn ImplicitThrowEventType> for ManualTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ManualTask {}
impl Cast<dyn InclusiveGatewayType> for ManualTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for ManualTask {}
impl Cast<dyn InputSetType> for ManualTask {}
impl Cast<dyn InputSetTypeMut> for ManualTask {}
impl Cast<dyn InterfaceType> for ManualTask {}
impl Cast<dyn InterfaceTypeMut> for ManualTask {}
impl Cast<dyn IntermediateCatchEventType> for ManualTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ManualTask {}
impl Cast<dyn IntermediateThrowEventType> for ManualTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ManualTask {}
impl Cast<dyn InputOutputBindingType> for ManualTask {}
impl Cast<dyn InputOutputBindingTypeMut> for ManualTask {}
impl Cast<dyn InputOutputSpecificationType> for ManualTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ManualTask {}
impl Cast<dyn ItemDefinitionType> for ManualTask {}
impl Cast<dyn ItemDefinitionTypeMut> for ManualTask {}
impl Cast<dyn LaneType> for ManualTask {}
impl Cast<dyn LaneTypeMut> for ManualTask {}
impl Cast<dyn LaneSetType> for ManualTask {}
impl Cast<dyn LaneSetTypeMut> for ManualTask {}
impl Cast<dyn LinkEventDefinitionType> for ManualTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn LoopCharacteristicsType> for ManualTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ManualTask {}
impl Cast<dyn ManualTaskType> for ManualTask {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ManualTaskTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageType> for ManualTask {}
impl Cast<dyn MessageTypeMut> for ManualTask {}
impl Cast<dyn MessageEventDefinitionType> for ManualTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn MessageFlowType> for ManualTask {}
impl Cast<dyn MessageFlowTypeMut> for ManualTask {}
impl Cast<dyn MessageFlowAssociationType> for ManualTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ManualTask {}
impl Cast<dyn MonitoringType> for ManualTask {}
impl Cast<dyn MonitoringTypeMut> for ManualTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ManualTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ManualTask {}
impl Cast<dyn OperationType> for ManualTask {}
impl Cast<dyn OperationTypeMut> for ManualTask {}
impl Cast<dyn OutputSetType> for ManualTask {}
impl Cast<dyn OutputSetTypeMut> for ManualTask {}
impl Cast<dyn ParallelGatewayType> for ManualTask {}
impl Cast<dyn ParallelGatewayTypeMut> for ManualTask {}
impl Cast<dyn ParticipantType> for ManualTask {}
impl Cast<dyn ParticipantTypeMut> for ManualTask {}
impl Cast<dyn ParticipantAssociationType> for ManualTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for ManualTask {}
impl Cast<dyn ParticipantMultiplicityType> for ManualTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ManualTask {}
impl Cast<dyn PartnerEntityType> for ManualTask {}
impl Cast<dyn PartnerEntityTypeMut> for ManualTask {}
impl Cast<dyn PartnerRoleType> for ManualTask {}
impl Cast<dyn PartnerRoleTypeMut> for ManualTask {}
impl Cast<dyn PerformerType> for ManualTask {}
impl Cast<dyn PerformerTypeMut> for ManualTask {}
impl Cast<dyn PotentialOwnerType> for ManualTask {}
impl Cast<dyn PotentialOwnerTypeMut> for ManualTask {}
impl Cast<dyn ProcessType> for ManualTask {}
impl Cast<dyn ProcessTypeMut> for ManualTask {}
impl Cast<dyn PropertyType> for ManualTask {}
impl Cast<dyn PropertyTypeMut> for ManualTask {}
impl Cast<dyn ReceiveTaskType> for ManualTask {}
impl Cast<dyn ReceiveTaskTypeMut> for ManualTask {}
impl Cast<dyn RelationshipType> for ManualTask {}
impl Cast<dyn RelationshipTypeMut> for ManualTask {}
impl Cast<dyn RenderingType> for ManualTask {}
impl Cast<dyn RenderingTypeMut> for ManualTask {}
impl Cast<dyn ResourceType> for ManualTask {}
impl Cast<dyn ResourceTypeMut> for ManualTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for ManualTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ManualTask {}
impl Cast<dyn ResourceParameterType> for ManualTask {}
impl Cast<dyn ResourceParameterTypeMut> for ManualTask {}
impl Cast<dyn ResourceParameterBindingType> for ManualTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ManualTask {}
impl Cast<dyn ResourceRoleType> for ManualTask {}
impl Cast<dyn ResourceRoleTypeMut> for ManualTask {}
impl Cast<dyn RootElementType> for ManualTask {}
impl Cast<dyn RootElementTypeMut> for ManualTask {}
impl Cast<dyn ScriptTaskType> for ManualTask {}
impl Cast<dyn ScriptTaskTypeMut> for ManualTask {}
impl Cast<dyn ScriptType> for ManualTask {}
impl Cast<dyn ScriptTypeMut> for ManualTask {}
impl Cast<dyn SendTaskType> for ManualTask {}
impl Cast<dyn SendTaskTypeMut> for ManualTask {}
impl Cast<dyn SequenceFlowType> for ManualTask {}
impl Cast<dyn SequenceFlowTypeMut> for ManualTask {}
impl Cast<dyn ServiceTaskType> for ManualTask {}
impl Cast<dyn ServiceTaskTypeMut> for ManualTask {}
impl Cast<dyn SignalType> for ManualTask {}
impl Cast<dyn SignalTypeMut> for ManualTask {}
impl Cast<dyn SignalEventDefinitionType> for ManualTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for ManualTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ManualTask {}
impl Cast<dyn StartEventType> for ManualTask {}
impl Cast<dyn StartEventTypeMut> for ManualTask {}
impl Cast<dyn SubChoreographyType> for ManualTask {}
impl Cast<dyn SubChoreographyTypeMut> for ManualTask {}
impl Cast<dyn SubConversationType> for ManualTask {}
impl Cast<dyn SubConversationTypeMut> for ManualTask {}
impl Cast<dyn SubProcessType> for ManualTask {}
impl Cast<dyn SubProcessTypeMut> for ManualTask {}
impl Cast<dyn TaskType> for ManualTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for ManualTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for ManualTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn TextAnnotationType> for ManualTask {}
impl Cast<dyn TextAnnotationTypeMut> for ManualTask {}
impl Cast<dyn TextType> for ManualTask {}
impl Cast<dyn TextTypeMut> for ManualTask {}
impl Cast<dyn ThrowEventType> for ManualTask {}
impl Cast<dyn ThrowEventTypeMut> for ManualTask {}
impl Cast<dyn TimerEventDefinitionType> for ManualTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ManualTask {}
impl Cast<dyn TransactionType> for ManualTask {}
impl Cast<dyn TransactionTypeMut> for ManualTask {}
impl Cast<dyn UserTaskType> for ManualTask {}
impl Cast<dyn UserTaskTypeMut> for ManualTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:message")]
pub struct Message {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("MessageType",rg*="name","MessageTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "itemRef")]
    #[tia("MessageType",rg*="item_ref","MessageTypeMut",s)]
    pub item_ref: Option<String>,
}
impl DocumentElement for Message {
    fn element(&self) -> Element {
        Element::Message
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Message {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for Message {}
impl RootElementTypeMut for Message {}
//

/// Access to `message`
pub trait MessageType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `itemRef`
    fn item_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(MessageType);
impl_downcast!(MessageType);
/// Mutable access to `message`
pub trait MessageTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + MessageType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `itemRef`
    fn set_item_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(MessageTypeMut);
impl_downcast!(MessageTypeMut);
impl Cast<dyn DefinitionsType> for Message {}
impl Cast<dyn DefinitionsTypeMut> for Message {}
impl Cast<dyn ImportType> for Message {}
impl Cast<dyn ImportTypeMut> for Message {}
impl Cast<dyn ActivityType> for Message {}
impl Cast<dyn ActivityTypeMut> for Message {}
impl Cast<dyn AdHocSubProcessType> for Message {}
impl Cast<dyn AdHocSubProcessTypeMut> for Message {}
impl Cast<dyn ArtifactType> for Message {}
impl Cast<dyn ArtifactTypeMut> for Message {}
impl Cast<dyn AssignmentType> for Message {}
impl Cast<dyn AssignmentTypeMut> for Message {}
impl Cast<dyn AssociationType> for Message {}
impl Cast<dyn AssociationTypeMut> for Message {}
impl Cast<dyn AuditingType> for Message {}
impl Cast<dyn AuditingTypeMut> for Message {}
impl Cast<dyn BaseElementType> for Message {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Message {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Message {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Message {}
impl Cast<dyn BoundaryEventType> for Message {}
impl Cast<dyn BoundaryEventTypeMut> for Message {}
impl Cast<dyn BusinessRuleTaskType> for Message {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Message {}
impl Cast<dyn CallableElementType> for Message {}
impl Cast<dyn CallableElementTypeMut> for Message {}
impl Cast<dyn CallActivityType> for Message {}
impl Cast<dyn CallActivityTypeMut> for Message {}
impl Cast<dyn CallChoreographyType> for Message {}
impl Cast<dyn CallChoreographyTypeMut> for Message {}
impl Cast<dyn CallConversationType> for Message {}
impl Cast<dyn CallConversationTypeMut> for Message {}
impl Cast<dyn CancelEventDefinitionType> for Message {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Message {}
impl Cast<dyn CatchEventType> for Message {}
impl Cast<dyn CatchEventTypeMut> for Message {}
impl Cast<dyn CategoryType> for Message {}
impl Cast<dyn CategoryTypeMut> for Message {}
impl Cast<dyn CategoryValueType> for Message {}
impl Cast<dyn CategoryValueTypeMut> for Message {}
impl Cast<dyn ChoreographyType> for Message {}
impl Cast<dyn ChoreographyTypeMut> for Message {}
impl Cast<dyn ChoreographyActivityType> for Message {}
impl Cast<dyn ChoreographyActivityTypeMut> for Message {}
impl Cast<dyn ChoreographyTaskType> for Message {}
impl Cast<dyn ChoreographyTaskTypeMut> for Message {}
impl Cast<dyn CollaborationType> for Message {}
impl Cast<dyn CollaborationTypeMut> for Message {}
impl Cast<dyn CompensateEventDefinitionType> for Message {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Message {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Message {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Message {}
impl Cast<dyn ComplexGatewayType> for Message {}
impl Cast<dyn ComplexGatewayTypeMut> for Message {}
impl Cast<dyn ConditionalEventDefinitionType> for Message {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Message {}
impl Cast<dyn ConversationType> for Message {}
impl Cast<dyn ConversationTypeMut> for Message {}
impl Cast<dyn ConversationAssociationType> for Message {}
impl Cast<dyn ConversationAssociationTypeMut> for Message {}
impl Cast<dyn ConversationLinkType> for Message {}
impl Cast<dyn ConversationLinkTypeMut> for Message {}
impl Cast<dyn ConversationNodeType> for Message {}
impl Cast<dyn ConversationNodeTypeMut> for Message {}
impl Cast<dyn CorrelationKeyType> for Message {}
impl Cast<dyn CorrelationKeyTypeMut> for Message {}
impl Cast<dyn CorrelationPropertyType> for Message {}
impl Cast<dyn CorrelationPropertyTypeMut> for Message {}
impl Cast<dyn CorrelationPropertyBindingType> for Message {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Message {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Message {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Message {}
impl Cast<dyn CorrelationSubscriptionType> for Message {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Message {}
impl Cast<dyn DataAssociationType> for Message {}
impl Cast<dyn DataAssociationTypeMut> for Message {}
impl Cast<dyn DataInputType> for Message {}
impl Cast<dyn DataInputTypeMut> for Message {}
impl Cast<dyn DataInputAssociationType> for Message {}
impl Cast<dyn DataInputAssociationTypeMut> for Message {}
impl Cast<dyn DataObjectType> for Message {}
impl Cast<dyn DataObjectTypeMut> for Message {}
impl Cast<dyn DataObjectReferenceType> for Message {}
impl Cast<dyn DataObjectReferenceTypeMut> for Message {}
impl Cast<dyn DataOutputType> for Message {}
impl Cast<dyn DataOutputTypeMut> for Message {}
impl Cast<dyn DataOutputAssociationType> for Message {}
impl Cast<dyn DataOutputAssociationTypeMut> for Message {}
impl Cast<dyn DataStateType> for Message {}
impl Cast<dyn DataStateTypeMut> for Message {}
impl Cast<dyn DataStoreType> for Message {}
impl Cast<dyn DataStoreTypeMut> for Message {}
impl Cast<dyn DataStoreReferenceType> for Message {}
impl Cast<dyn DataStoreReferenceTypeMut> for Message {}
impl Cast<dyn DocumentationType> for Message {}
impl Cast<dyn DocumentationTypeMut> for Message {}
impl Cast<dyn EndEventType> for Message {}
impl Cast<dyn EndEventTypeMut> for Message {}
impl Cast<dyn EndPointType> for Message {}
impl Cast<dyn EndPointTypeMut> for Message {}
impl Cast<dyn ErrorType> for Message {}
impl Cast<dyn ErrorTypeMut> for Message {}
impl Cast<dyn ErrorEventDefinitionType> for Message {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Message {}
impl Cast<dyn EscalationType> for Message {}
impl Cast<dyn EscalationTypeMut> for Message {}
impl Cast<dyn EscalationEventDefinitionType> for Message {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Message {}
impl Cast<dyn EventType> for Message {}
impl Cast<dyn EventTypeMut> for Message {}
impl Cast<dyn EventBasedGatewayType> for Message {}
impl Cast<dyn EventBasedGatewayTypeMut> for Message {}
impl Cast<dyn EventDefinitionType> for Message {}
impl Cast<dyn EventDefinitionTypeMut> for Message {}
impl Cast<dyn ExclusiveGatewayType> for Message {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Message {}
impl Cast<dyn ExpressionType> for Message {}
impl Cast<dyn ExpressionTypeMut> for Message {}
impl Cast<dyn ExtensionType> for Message {}
impl Cast<dyn ExtensionTypeMut> for Message {}
impl Cast<dyn ExtensionElementsType> for Message {}
impl Cast<dyn ExtensionElementsTypeMut> for Message {}
impl Cast<dyn FlowElementType> for Message {}
impl Cast<dyn FlowElementTypeMut> for Message {}
impl Cast<dyn FlowNodeType> for Message {}
impl Cast<dyn FlowNodeTypeMut> for Message {}
impl Cast<dyn FormalExpressionType> for Message {}
impl Cast<dyn FormalExpressionTypeMut> for Message {}
impl Cast<dyn GatewayType> for Message {}
impl Cast<dyn GatewayTypeMut> for Message {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Message {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Message {}
impl Cast<dyn GlobalChoreographyTaskType> for Message {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Message {}
impl Cast<dyn GlobalConversationType> for Message {}
impl Cast<dyn GlobalConversationTypeMut> for Message {}
impl Cast<dyn GlobalManualTaskType> for Message {}
impl Cast<dyn GlobalManualTaskTypeMut> for Message {}
impl Cast<dyn GlobalScriptTaskType> for Message {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Message {}
impl Cast<dyn GlobalTaskType> for Message {}
impl Cast<dyn GlobalTaskTypeMut> for Message {}
impl Cast<dyn GlobalUserTaskType> for Message {}
impl Cast<dyn GlobalUserTaskTypeMut> for Message {}
impl Cast<dyn GroupType> for Message {}
impl Cast<dyn GroupTypeMut> for Message {}
impl Cast<dyn HumanPerformerType> for Message {}
impl Cast<dyn HumanPerformerTypeMut> for Message {}
impl Cast<dyn ImplicitThrowEventType> for Message {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Message {}
impl Cast<dyn InclusiveGatewayType> for Message {}
impl Cast<dyn InclusiveGatewayTypeMut> for Message {}
impl Cast<dyn InputSetType> for Message {}
impl Cast<dyn InputSetTypeMut> for Message {}
impl Cast<dyn InterfaceType> for Message {}
impl Cast<dyn InterfaceTypeMut> for Message {}
impl Cast<dyn IntermediateCatchEventType> for Message {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Message {}
impl Cast<dyn IntermediateThrowEventType> for Message {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Message {}
impl Cast<dyn InputOutputBindingType> for Message {}
impl Cast<dyn InputOutputBindingTypeMut> for Message {}
impl Cast<dyn InputOutputSpecificationType> for Message {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Message {}
impl Cast<dyn ItemDefinitionType> for Message {}
impl Cast<dyn ItemDefinitionTypeMut> for Message {}
impl Cast<dyn LaneType> for Message {}
impl Cast<dyn LaneTypeMut> for Message {}
impl Cast<dyn LaneSetType> for Message {}
impl Cast<dyn LaneSetTypeMut> for Message {}
impl Cast<dyn LinkEventDefinitionType> for Message {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Message {}
impl Cast<dyn LoopCharacteristicsType> for Message {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Message {}
impl Cast<dyn ManualTaskType> for Message {}
impl Cast<dyn ManualTaskTypeMut> for Message {}
impl Cast<dyn MessageType> for Message {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageTypeMut> for Message {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageEventDefinitionType> for Message {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Message {}
impl Cast<dyn MessageFlowType> for Message {}
impl Cast<dyn MessageFlowTypeMut> for Message {}
impl Cast<dyn MessageFlowAssociationType> for Message {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Message {}
impl Cast<dyn MonitoringType> for Message {}
impl Cast<dyn MonitoringTypeMut> for Message {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Message {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Message {}
impl Cast<dyn OperationType> for Message {}
impl Cast<dyn OperationTypeMut> for Message {}
impl Cast<dyn OutputSetType> for Message {}
impl Cast<dyn OutputSetTypeMut> for Message {}
impl Cast<dyn ParallelGatewayType> for Message {}
impl Cast<dyn ParallelGatewayTypeMut> for Message {}
impl Cast<dyn ParticipantType> for Message {}
impl Cast<dyn ParticipantTypeMut> for Message {}
impl Cast<dyn ParticipantAssociationType> for Message {}
impl Cast<dyn ParticipantAssociationTypeMut> for Message {}
impl Cast<dyn ParticipantMultiplicityType> for Message {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Message {}
impl Cast<dyn PartnerEntityType> for Message {}
impl Cast<dyn PartnerEntityTypeMut> for Message {}
impl Cast<dyn PartnerRoleType> for Message {}
impl Cast<dyn PartnerRoleTypeMut> for Message {}
impl Cast<dyn PerformerType> for Message {}
impl Cast<dyn PerformerTypeMut> for Message {}
impl Cast<dyn PotentialOwnerType> for Message {}
impl Cast<dyn PotentialOwnerTypeMut> for Message {}
impl Cast<dyn ProcessType> for Message {}
impl Cast<dyn ProcessTypeMut> for Message {}
impl Cast<dyn PropertyType> for Message {}
impl Cast<dyn PropertyTypeMut> for Message {}
impl Cast<dyn ReceiveTaskType> for Message {}
impl Cast<dyn ReceiveTaskTypeMut> for Message {}
impl Cast<dyn RelationshipType> for Message {}
impl Cast<dyn RelationshipTypeMut> for Message {}
impl Cast<dyn RenderingType> for Message {}
impl Cast<dyn RenderingTypeMut> for Message {}
impl Cast<dyn ResourceType> for Message {}
impl Cast<dyn ResourceTypeMut> for Message {}
impl Cast<dyn ResourceAssignmentExpressionType> for Message {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Message {}
impl Cast<dyn ResourceParameterType> for Message {}
impl Cast<dyn ResourceParameterTypeMut> for Message {}
impl Cast<dyn ResourceParameterBindingType> for Message {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Message {}
impl Cast<dyn ResourceRoleType> for Message {}
impl Cast<dyn ResourceRoleTypeMut> for Message {}
impl Cast<dyn RootElementType> for Message {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Message {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Message {}
impl Cast<dyn ScriptTaskTypeMut> for Message {}
impl Cast<dyn ScriptType> for Message {}
impl Cast<dyn ScriptTypeMut> for Message {}
impl Cast<dyn SendTaskType> for Message {}
impl Cast<dyn SendTaskTypeMut> for Message {}
impl Cast<dyn SequenceFlowType> for Message {}
impl Cast<dyn SequenceFlowTypeMut> for Message {}
impl Cast<dyn ServiceTaskType> for Message {}
impl Cast<dyn ServiceTaskTypeMut> for Message {}
impl Cast<dyn SignalType> for Message {}
impl Cast<dyn SignalTypeMut> for Message {}
impl Cast<dyn SignalEventDefinitionType> for Message {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Message {}
impl Cast<dyn StandardLoopCharacteristicsType> for Message {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Message {}
impl Cast<dyn StartEventType> for Message {}
impl Cast<dyn StartEventTypeMut> for Message {}
impl Cast<dyn SubChoreographyType> for Message {}
impl Cast<dyn SubChoreographyTypeMut> for Message {}
impl Cast<dyn SubConversationType> for Message {}
impl Cast<dyn SubConversationTypeMut> for Message {}
impl Cast<dyn SubProcessType> for Message {}
impl Cast<dyn SubProcessTypeMut> for Message {}
impl Cast<dyn TaskType> for Message {}
impl Cast<dyn TaskTypeMut> for Message {}
impl Cast<dyn TerminateEventDefinitionType> for Message {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Message {}
impl Cast<dyn TextAnnotationType> for Message {}
impl Cast<dyn TextAnnotationTypeMut> for Message {}
impl Cast<dyn TextType> for Message {}
impl Cast<dyn TextTypeMut> for Message {}
impl Cast<dyn ThrowEventType> for Message {}
impl Cast<dyn ThrowEventTypeMut> for Message {}
impl Cast<dyn TimerEventDefinitionType> for Message {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Message {}
impl Cast<dyn TransactionType> for Message {}
impl Cast<dyn TransactionTypeMut> for Message {}
impl Cast<dyn UserTaskType> for Message {}
impl Cast<dyn UserTaskTypeMut> for Message {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:messageEventDefinition")]
pub struct MessageEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "messageRef")]
    #[tia("MessageEventDefinitionType",rg*="message_ref","MessageEventDefinitionTypeMut",s)]
    pub message_ref: Option<String>,
    #[xml(flatten_text = "bpmn:operationRef")]
    #[tia("MessageEventDefinitionType",rg*="operation_ref","MessageEventDefinitionTypeMut",s,rmg*="operation_ref_mut")]
    pub operation_ref: Option<String>,
}
impl DocumentElement for MessageEventDefinition {
    fn element(&self) -> Element {
        Element::MessageEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for MessageEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for MessageEventDefinition {}
impl EventDefinitionTypeMut for MessageEventDefinition {}
impl RootElementType for MessageEventDefinition {}
impl RootElementTypeMut for MessageEventDefinition {}
//

/// Access to `messageEventDefinition`
pub trait MessageEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `messageRef`
    fn message_ref(&self) -> &Option<String>;
    /// Get value of `operationRef` child
    fn operation_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(MessageEventDefinitionType);
impl_downcast!(MessageEventDefinitionType);
/// Mutable access to `messageEventDefinition`
pub trait MessageEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + MessageEventDefinitionType
{
    /// Set value of attribute `messageRef`
    fn set_message_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `operationRef` child
    fn operation_ref_mut(&mut self) -> &mut Option<String>;
    /// Set value of `operationRef` child
    fn set_operation_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(MessageEventDefinitionTypeMut);
impl_downcast!(MessageEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for MessageEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for MessageEventDefinition {}
impl Cast<dyn ImportType> for MessageEventDefinition {}
impl Cast<dyn ImportTypeMut> for MessageEventDefinition {}
impl Cast<dyn ActivityType> for MessageEventDefinition {}
impl Cast<dyn ActivityTypeMut> for MessageEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for MessageEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for MessageEventDefinition {}
impl Cast<dyn ArtifactType> for MessageEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for MessageEventDefinition {}
impl Cast<dyn AssignmentType> for MessageEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for MessageEventDefinition {}
impl Cast<dyn AssociationType> for MessageEventDefinition {}
impl Cast<dyn AssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn AuditingType> for MessageEventDefinition {}
impl Cast<dyn AuditingTypeMut> for MessageEventDefinition {}
impl Cast<dyn BaseElementType> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for MessageEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for MessageEventDefinition {}
impl Cast<dyn BoundaryEventType> for MessageEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for MessageEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn CallableElementType> for MessageEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for MessageEventDefinition {}
impl Cast<dyn CallActivityType> for MessageEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for MessageEventDefinition {}
impl Cast<dyn CallChoreographyType> for MessageEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for MessageEventDefinition {}
impl Cast<dyn CallConversationType> for MessageEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for MessageEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn CatchEventType> for MessageEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn CategoryType> for MessageEventDefinition {}
impl Cast<dyn CategoryTypeMut> for MessageEventDefinition {}
impl Cast<dyn CategoryValueType> for MessageEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for MessageEventDefinition {}
impl Cast<dyn ChoreographyType> for MessageEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for MessageEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for MessageEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for MessageEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for MessageEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn CollaborationType> for MessageEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for MessageEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for MessageEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ComplexGatewayType> for MessageEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ConversationType> for MessageEventDefinition {}
impl Cast<dyn ConversationTypeMut> for MessageEventDefinition {}
impl Cast<dyn ConversationAssociationType> for MessageEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn ConversationLinkType> for MessageEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for MessageEventDefinition {}
impl Cast<dyn ConversationNodeType> for MessageEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for MessageEventDefinition {}
impl Cast<dyn CorrelationKeyType> for MessageEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for MessageEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for MessageEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for MessageEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataAssociationType> for MessageEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataInputType> for MessageEventDefinition {}
impl Cast<dyn DataInputTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataInputAssociationType> for MessageEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataObjectType> for MessageEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for MessageEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataOutputType> for MessageEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for MessageEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataStateType> for MessageEventDefinition {}
impl Cast<dyn DataStateTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataStoreType> for MessageEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for MessageEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for MessageEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for MessageEventDefinition {}
impl Cast<dyn DocumentationType> for MessageEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for MessageEventDefinition {}
impl Cast<dyn EndEventType> for MessageEventDefinition {}
impl Cast<dyn EndEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn EndPointType> for MessageEventDefinition {}
impl Cast<dyn EndPointTypeMut> for MessageEventDefinition {}
impl Cast<dyn ErrorType> for MessageEventDefinition {}
impl Cast<dyn ErrorTypeMut> for MessageEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn EscalationType> for MessageEventDefinition {}
impl Cast<dyn EscalationTypeMut> for MessageEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn EventType> for MessageEventDefinition {}
impl Cast<dyn EventTypeMut> for MessageEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for MessageEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn EventDefinitionType> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for MessageEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn ExpressionType> for MessageEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ExtensionType> for MessageEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ExtensionElementsType> for MessageEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for MessageEventDefinition {}
impl Cast<dyn FlowElementType> for MessageEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for MessageEventDefinition {}
impl Cast<dyn FlowNodeType> for MessageEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for MessageEventDefinition {}
impl Cast<dyn FormalExpressionType> for MessageEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for MessageEventDefinition {}
impl Cast<dyn GatewayType> for MessageEventDefinition {}
impl Cast<dyn GatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalConversationType> for MessageEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for MessageEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn GroupType> for MessageEventDefinition {}
impl Cast<dyn GroupTypeMut> for MessageEventDefinition {}
impl Cast<dyn HumanPerformerType> for MessageEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for MessageEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for MessageEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for MessageEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn InputSetType> for MessageEventDefinition {}
impl Cast<dyn InputSetTypeMut> for MessageEventDefinition {}
impl Cast<dyn InterfaceType> for MessageEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for MessageEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for MessageEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for MessageEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn InputOutputBindingType> for MessageEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for MessageEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for MessageEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for MessageEventDefinition {}
impl Cast<dyn ItemDefinitionType> for MessageEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn LaneType> for MessageEventDefinition {}
impl Cast<dyn LaneTypeMut> for MessageEventDefinition {}
impl Cast<dyn LaneSetType> for MessageEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for MessageEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for MessageEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for MessageEventDefinition {}
impl Cast<dyn ManualTaskType> for MessageEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn MessageType> for MessageEventDefinition {}
impl Cast<dyn MessageTypeMut> for MessageEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageFlowType> for MessageEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for MessageEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for MessageEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn MonitoringType> for MessageEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for MessageEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for MessageEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for MessageEventDefinition {}
impl Cast<dyn OperationType> for MessageEventDefinition {}
impl Cast<dyn OperationTypeMut> for MessageEventDefinition {}
impl Cast<dyn OutputSetType> for MessageEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for MessageEventDefinition {}
impl Cast<dyn ParallelGatewayType> for MessageEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for MessageEventDefinition {}
impl Cast<dyn ParticipantType> for MessageEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for MessageEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for MessageEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for MessageEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for MessageEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for MessageEventDefinition {}
impl Cast<dyn PartnerEntityType> for MessageEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for MessageEventDefinition {}
impl Cast<dyn PartnerRoleType> for MessageEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for MessageEventDefinition {}
impl Cast<dyn PerformerType> for MessageEventDefinition {}
impl Cast<dyn PerformerTypeMut> for MessageEventDefinition {}
impl Cast<dyn PotentialOwnerType> for MessageEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for MessageEventDefinition {}
impl Cast<dyn ProcessType> for MessageEventDefinition {}
impl Cast<dyn ProcessTypeMut> for MessageEventDefinition {}
impl Cast<dyn PropertyType> for MessageEventDefinition {}
impl Cast<dyn PropertyTypeMut> for MessageEventDefinition {}
impl Cast<dyn ReceiveTaskType> for MessageEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn RelationshipType> for MessageEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for MessageEventDefinition {}
impl Cast<dyn RenderingType> for MessageEventDefinition {}
impl Cast<dyn RenderingTypeMut> for MessageEventDefinition {}
impl Cast<dyn ResourceType> for MessageEventDefinition {}
impl Cast<dyn ResourceTypeMut> for MessageEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for MessageEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for MessageEventDefinition {}
impl Cast<dyn ResourceParameterType> for MessageEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for MessageEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for MessageEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for MessageEventDefinition {}
impl Cast<dyn ResourceRoleType> for MessageEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for MessageEventDefinition {}
impl Cast<dyn RootElementType> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for MessageEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for MessageEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn ScriptType> for MessageEventDefinition {}
impl Cast<dyn ScriptTypeMut> for MessageEventDefinition {}
impl Cast<dyn SendTaskType> for MessageEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn SequenceFlowType> for MessageEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for MessageEventDefinition {}
impl Cast<dyn ServiceTaskType> for MessageEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn SignalType> for MessageEventDefinition {}
impl Cast<dyn SignalTypeMut> for MessageEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for MessageEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for MessageEventDefinition {}
impl Cast<dyn StartEventType> for MessageEventDefinition {}
impl Cast<dyn StartEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn SubChoreographyType> for MessageEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for MessageEventDefinition {}
impl Cast<dyn SubConversationType> for MessageEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for MessageEventDefinition {}
impl Cast<dyn SubProcessType> for MessageEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for MessageEventDefinition {}
impl Cast<dyn TaskType> for MessageEventDefinition {}
impl Cast<dyn TaskTypeMut> for MessageEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn TextAnnotationType> for MessageEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for MessageEventDefinition {}
impl Cast<dyn TextType> for MessageEventDefinition {}
impl Cast<dyn TextTypeMut> for MessageEventDefinition {}
impl Cast<dyn ThrowEventType> for MessageEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for MessageEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for MessageEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for MessageEventDefinition {}
impl Cast<dyn TransactionType> for MessageEventDefinition {}
impl Cast<dyn TransactionTypeMut> for MessageEventDefinition {}
impl Cast<dyn UserTaskType> for MessageEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for MessageEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:messageFlow")]
pub struct MessageFlow {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("MessageFlowType",rg*="name","MessageFlowTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "sourceRef")]
    #[tia("MessageFlowType",rg*="source_ref","MessageFlowTypeMut",s)]
    pub source_ref: String,
    #[xml(attr = "targetRef")]
    #[tia("MessageFlowType",rg*="target_ref","MessageFlowTypeMut",s)]
    pub target_ref: String,
    #[xml(attr = "messageRef")]
    #[tia("MessageFlowType",rg*="message_ref","MessageFlowTypeMut",s)]
    pub message_ref: Option<String>,
}
impl DocumentElement for MessageFlow {
    fn element(&self) -> Element {
        Element::MessageFlow
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for MessageFlow {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `messageFlow`
pub trait MessageFlowType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `sourceRef`
    fn source_ref(&self) -> &String;
    /// Get value of attribute `targetRef`
    fn target_ref(&self) -> &String;
    /// Get value of attribute `messageRef`
    fn message_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(MessageFlowType);
impl_downcast!(MessageFlowType);
/// Mutable access to `messageFlow`
pub trait MessageFlowTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + MessageFlowType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `sourceRef`
    fn set_source_ref(&mut self, value: String);
    /// Set value of attribute `targetRef`
    fn set_target_ref(&mut self, value: String);
    /// Set value of attribute `messageRef`
    fn set_message_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(MessageFlowTypeMut);
impl_downcast!(MessageFlowTypeMut);
impl Cast<dyn DefinitionsType> for MessageFlow {}
impl Cast<dyn DefinitionsTypeMut> for MessageFlow {}
impl Cast<dyn ImportType> for MessageFlow {}
impl Cast<dyn ImportTypeMut> for MessageFlow {}
impl Cast<dyn ActivityType> for MessageFlow {}
impl Cast<dyn ActivityTypeMut> for MessageFlow {}
impl Cast<dyn AdHocSubProcessType> for MessageFlow {}
impl Cast<dyn AdHocSubProcessTypeMut> for MessageFlow {}
impl Cast<dyn ArtifactType> for MessageFlow {}
impl Cast<dyn ArtifactTypeMut> for MessageFlow {}
impl Cast<dyn AssignmentType> for MessageFlow {}
impl Cast<dyn AssignmentTypeMut> for MessageFlow {}
impl Cast<dyn AssociationType> for MessageFlow {}
impl Cast<dyn AssociationTypeMut> for MessageFlow {}
impl Cast<dyn AuditingType> for MessageFlow {}
impl Cast<dyn AuditingTypeMut> for MessageFlow {}
impl Cast<dyn BaseElementType> for MessageFlow {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for MessageFlow {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for MessageFlow {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for MessageFlow {}
impl Cast<dyn BoundaryEventType> for MessageFlow {}
impl Cast<dyn BoundaryEventTypeMut> for MessageFlow {}
impl Cast<dyn BusinessRuleTaskType> for MessageFlow {}
impl Cast<dyn BusinessRuleTaskTypeMut> for MessageFlow {}
impl Cast<dyn CallableElementType> for MessageFlow {}
impl Cast<dyn CallableElementTypeMut> for MessageFlow {}
impl Cast<dyn CallActivityType> for MessageFlow {}
impl Cast<dyn CallActivityTypeMut> for MessageFlow {}
impl Cast<dyn CallChoreographyType> for MessageFlow {}
impl Cast<dyn CallChoreographyTypeMut> for MessageFlow {}
impl Cast<dyn CallConversationType> for MessageFlow {}
impl Cast<dyn CallConversationTypeMut> for MessageFlow {}
impl Cast<dyn CancelEventDefinitionType> for MessageFlow {}
impl Cast<dyn CancelEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn CatchEventType> for MessageFlow {}
impl Cast<dyn CatchEventTypeMut> for MessageFlow {}
impl Cast<dyn CategoryType> for MessageFlow {}
impl Cast<dyn CategoryTypeMut> for MessageFlow {}
impl Cast<dyn CategoryValueType> for MessageFlow {}
impl Cast<dyn CategoryValueTypeMut> for MessageFlow {}
impl Cast<dyn ChoreographyType> for MessageFlow {}
impl Cast<dyn ChoreographyTypeMut> for MessageFlow {}
impl Cast<dyn ChoreographyActivityType> for MessageFlow {}
impl Cast<dyn ChoreographyActivityTypeMut> for MessageFlow {}
impl Cast<dyn ChoreographyTaskType> for MessageFlow {}
impl Cast<dyn ChoreographyTaskTypeMut> for MessageFlow {}
impl Cast<dyn CollaborationType> for MessageFlow {}
impl Cast<dyn CollaborationTypeMut> for MessageFlow {}
impl Cast<dyn CompensateEventDefinitionType> for MessageFlow {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn ComplexBehaviorDefinitionType> for MessageFlow {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn ComplexGatewayType> for MessageFlow {}
impl Cast<dyn ComplexGatewayTypeMut> for MessageFlow {}
impl Cast<dyn ConditionalEventDefinitionType> for MessageFlow {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn ConversationType> for MessageFlow {}
impl Cast<dyn ConversationTypeMut> for MessageFlow {}
impl Cast<dyn ConversationAssociationType> for MessageFlow {}
impl Cast<dyn ConversationAssociationTypeMut> for MessageFlow {}
impl Cast<dyn ConversationLinkType> for MessageFlow {}
impl Cast<dyn ConversationLinkTypeMut> for MessageFlow {}
impl Cast<dyn ConversationNodeType> for MessageFlow {}
impl Cast<dyn ConversationNodeTypeMut> for MessageFlow {}
impl Cast<dyn CorrelationKeyType> for MessageFlow {}
impl Cast<dyn CorrelationKeyTypeMut> for MessageFlow {}
impl Cast<dyn CorrelationPropertyType> for MessageFlow {}
impl Cast<dyn CorrelationPropertyTypeMut> for MessageFlow {}
impl Cast<dyn CorrelationPropertyBindingType> for MessageFlow {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for MessageFlow {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for MessageFlow {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for MessageFlow {}
impl Cast<dyn CorrelationSubscriptionType> for MessageFlow {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for MessageFlow {}
impl Cast<dyn DataAssociationType> for MessageFlow {}
impl Cast<dyn DataAssociationTypeMut> for MessageFlow {}
impl Cast<dyn DataInputType> for MessageFlow {}
impl Cast<dyn DataInputTypeMut> for MessageFlow {}
impl Cast<dyn DataInputAssociationType> for MessageFlow {}
impl Cast<dyn DataInputAssociationTypeMut> for MessageFlow {}
impl Cast<dyn DataObjectType> for MessageFlow {}
impl Cast<dyn DataObjectTypeMut> for MessageFlow {}
impl Cast<dyn DataObjectReferenceType> for MessageFlow {}
impl Cast<dyn DataObjectReferenceTypeMut> for MessageFlow {}
impl Cast<dyn DataOutputType> for MessageFlow {}
impl Cast<dyn DataOutputTypeMut> for MessageFlow {}
impl Cast<dyn DataOutputAssociationType> for MessageFlow {}
impl Cast<dyn DataOutputAssociationTypeMut> for MessageFlow {}
impl Cast<dyn DataStateType> for MessageFlow {}
impl Cast<dyn DataStateTypeMut> for MessageFlow {}
impl Cast<dyn DataStoreType> for MessageFlow {}
impl Cast<dyn DataStoreTypeMut> for MessageFlow {}
impl Cast<dyn DataStoreReferenceType> for MessageFlow {}
impl Cast<dyn DataStoreReferenceTypeMut> for MessageFlow {}
impl Cast<dyn DocumentationType> for MessageFlow {}
impl Cast<dyn DocumentationTypeMut> for MessageFlow {}
impl Cast<dyn EndEventType> for MessageFlow {}
impl Cast<dyn EndEventTypeMut> for MessageFlow {}
impl Cast<dyn EndPointType> for MessageFlow {}
impl Cast<dyn EndPointTypeMut> for MessageFlow {}
impl Cast<dyn ErrorType> for MessageFlow {}
impl Cast<dyn ErrorTypeMut> for MessageFlow {}
impl Cast<dyn ErrorEventDefinitionType> for MessageFlow {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn EscalationType> for MessageFlow {}
impl Cast<dyn EscalationTypeMut> for MessageFlow {}
impl Cast<dyn EscalationEventDefinitionType> for MessageFlow {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn EventType> for MessageFlow {}
impl Cast<dyn EventTypeMut> for MessageFlow {}
impl Cast<dyn EventBasedGatewayType> for MessageFlow {}
impl Cast<dyn EventBasedGatewayTypeMut> for MessageFlow {}
impl Cast<dyn EventDefinitionType> for MessageFlow {}
impl Cast<dyn EventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn ExclusiveGatewayType> for MessageFlow {}
impl Cast<dyn ExclusiveGatewayTypeMut> for MessageFlow {}
impl Cast<dyn ExpressionType> for MessageFlow {}
impl Cast<dyn ExpressionTypeMut> for MessageFlow {}
impl Cast<dyn ExtensionType> for MessageFlow {}
impl Cast<dyn ExtensionTypeMut> for MessageFlow {}
impl Cast<dyn ExtensionElementsType> for MessageFlow {}
impl Cast<dyn ExtensionElementsTypeMut> for MessageFlow {}
impl Cast<dyn FlowElementType> for MessageFlow {}
impl Cast<dyn FlowElementTypeMut> for MessageFlow {}
impl Cast<dyn FlowNodeType> for MessageFlow {}
impl Cast<dyn FlowNodeTypeMut> for MessageFlow {}
impl Cast<dyn FormalExpressionType> for MessageFlow {}
impl Cast<dyn FormalExpressionTypeMut> for MessageFlow {}
impl Cast<dyn GatewayType> for MessageFlow {}
impl Cast<dyn GatewayTypeMut> for MessageFlow {}
impl Cast<dyn GlobalBusinessRuleTaskType> for MessageFlow {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for MessageFlow {}
impl Cast<dyn GlobalChoreographyTaskType> for MessageFlow {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for MessageFlow {}
impl Cast<dyn GlobalConversationType> for MessageFlow {}
impl Cast<dyn GlobalConversationTypeMut> for MessageFlow {}
impl Cast<dyn GlobalManualTaskType> for MessageFlow {}
impl Cast<dyn GlobalManualTaskTypeMut> for MessageFlow {}
impl Cast<dyn GlobalScriptTaskType> for MessageFlow {}
impl Cast<dyn GlobalScriptTaskTypeMut> for MessageFlow {}
impl Cast<dyn GlobalTaskType> for MessageFlow {}
impl Cast<dyn GlobalTaskTypeMut> for MessageFlow {}
impl Cast<dyn GlobalUserTaskType> for MessageFlow {}
impl Cast<dyn GlobalUserTaskTypeMut> for MessageFlow {}
impl Cast<dyn GroupType> for MessageFlow {}
impl Cast<dyn GroupTypeMut> for MessageFlow {}
impl Cast<dyn HumanPerformerType> for MessageFlow {}
impl Cast<dyn HumanPerformerTypeMut> for MessageFlow {}
impl Cast<dyn ImplicitThrowEventType> for MessageFlow {}
impl Cast<dyn ImplicitThrowEventTypeMut> for MessageFlow {}
impl Cast<dyn InclusiveGatewayType> for MessageFlow {}
impl Cast<dyn InclusiveGatewayTypeMut> for MessageFlow {}
impl Cast<dyn InputSetType> for MessageFlow {}
impl Cast<dyn InputSetTypeMut> for MessageFlow {}
impl Cast<dyn InterfaceType> for MessageFlow {}
impl Cast<dyn InterfaceTypeMut> for MessageFlow {}
impl Cast<dyn IntermediateCatchEventType> for MessageFlow {}
impl Cast<dyn IntermediateCatchEventTypeMut> for MessageFlow {}
impl Cast<dyn IntermediateThrowEventType> for MessageFlow {}
impl Cast<dyn IntermediateThrowEventTypeMut> for MessageFlow {}
impl Cast<dyn InputOutputBindingType> for MessageFlow {}
impl Cast<dyn InputOutputBindingTypeMut> for MessageFlow {}
impl Cast<dyn InputOutputSpecificationType> for MessageFlow {}
impl Cast<dyn InputOutputSpecificationTypeMut> for MessageFlow {}
impl Cast<dyn ItemDefinitionType> for MessageFlow {}
impl Cast<dyn ItemDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn LaneType> for MessageFlow {}
impl Cast<dyn LaneTypeMut> for MessageFlow {}
impl Cast<dyn LaneSetType> for MessageFlow {}
impl Cast<dyn LaneSetTypeMut> for MessageFlow {}
impl Cast<dyn LinkEventDefinitionType> for MessageFlow {}
impl Cast<dyn LinkEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn LoopCharacteristicsType> for MessageFlow {}
impl Cast<dyn LoopCharacteristicsTypeMut> for MessageFlow {}
impl Cast<dyn ManualTaskType> for MessageFlow {}
impl Cast<dyn ManualTaskTypeMut> for MessageFlow {}
impl Cast<dyn MessageType> for MessageFlow {}
impl Cast<dyn MessageTypeMut> for MessageFlow {}
impl Cast<dyn MessageEventDefinitionType> for MessageFlow {}
impl Cast<dyn MessageEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn MessageFlowType> for MessageFlow {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageFlowTypeMut> for MessageFlow {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageFlowAssociationType> for MessageFlow {}
impl Cast<dyn MessageFlowAssociationTypeMut> for MessageFlow {}
impl Cast<dyn MonitoringType> for MessageFlow {}
impl Cast<dyn MonitoringTypeMut> for MessageFlow {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for MessageFlow {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for MessageFlow {}
impl Cast<dyn OperationType> for MessageFlow {}
impl Cast<dyn OperationTypeMut> for MessageFlow {}
impl Cast<dyn OutputSetType> for MessageFlow {}
impl Cast<dyn OutputSetTypeMut> for MessageFlow {}
impl Cast<dyn ParallelGatewayType> for MessageFlow {}
impl Cast<dyn ParallelGatewayTypeMut> for MessageFlow {}
impl Cast<dyn ParticipantType> for MessageFlow {}
impl Cast<dyn ParticipantTypeMut> for MessageFlow {}
impl Cast<dyn ParticipantAssociationType> for MessageFlow {}
impl Cast<dyn ParticipantAssociationTypeMut> for MessageFlow {}
impl Cast<dyn ParticipantMultiplicityType> for MessageFlow {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for MessageFlow {}
impl Cast<dyn PartnerEntityType> for MessageFlow {}
impl Cast<dyn PartnerEntityTypeMut> for MessageFlow {}
impl Cast<dyn PartnerRoleType> for MessageFlow {}
impl Cast<dyn PartnerRoleTypeMut> for MessageFlow {}
impl Cast<dyn PerformerType> for MessageFlow {}
impl Cast<dyn PerformerTypeMut> for MessageFlow {}
impl Cast<dyn PotentialOwnerType> for MessageFlow {}
impl Cast<dyn PotentialOwnerTypeMut> for MessageFlow {}
impl Cast<dyn ProcessType> for MessageFlow {}
impl Cast<dyn ProcessTypeMut> for MessageFlow {}
impl Cast<dyn PropertyType> for MessageFlow {}
impl Cast<dyn PropertyTypeMut> for MessageFlow {}
impl Cast<dyn ReceiveTaskType> for MessageFlow {}
impl Cast<dyn ReceiveTaskTypeMut> for MessageFlow {}
impl Cast<dyn RelationshipType> for MessageFlow {}
impl Cast<dyn RelationshipTypeMut> for MessageFlow {}
impl Cast<dyn RenderingType> for MessageFlow {}
impl Cast<dyn RenderingTypeMut> for MessageFlow {}
impl Cast<dyn ResourceType> for MessageFlow {}
impl Cast<dyn ResourceTypeMut> for MessageFlow {}
impl Cast<dyn ResourceAssignmentExpressionType> for MessageFlow {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for MessageFlow {}
impl Cast<dyn ResourceParameterType> for MessageFlow {}
impl Cast<dyn ResourceParameterTypeMut> for MessageFlow {}
impl Cast<dyn ResourceParameterBindingType> for MessageFlow {}
impl Cast<dyn ResourceParameterBindingTypeMut> for MessageFlow {}
impl Cast<dyn ResourceRoleType> for MessageFlow {}
impl Cast<dyn ResourceRoleTypeMut> for MessageFlow {}
impl Cast<dyn RootElementType> for MessageFlow {}
impl Cast<dyn RootElementTypeMut> for MessageFlow {}
impl Cast<dyn ScriptTaskType> for MessageFlow {}
impl Cast<dyn ScriptTaskTypeMut> for MessageFlow {}
impl Cast<dyn ScriptType> for MessageFlow {}
impl Cast<dyn ScriptTypeMut> for MessageFlow {}
impl Cast<dyn SendTaskType> for MessageFlow {}
impl Cast<dyn SendTaskTypeMut> for MessageFlow {}
impl Cast<dyn SequenceFlowType> for MessageFlow {}
impl Cast<dyn SequenceFlowTypeMut> for MessageFlow {}
impl Cast<dyn ServiceTaskType> for MessageFlow {}
impl Cast<dyn ServiceTaskTypeMut> for MessageFlow {}
impl Cast<dyn SignalType> for MessageFlow {}
impl Cast<dyn SignalTypeMut> for MessageFlow {}
impl Cast<dyn SignalEventDefinitionType> for MessageFlow {}
impl Cast<dyn SignalEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn StandardLoopCharacteristicsType> for MessageFlow {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for MessageFlow {}
impl Cast<dyn StartEventType> for MessageFlow {}
impl Cast<dyn StartEventTypeMut> for MessageFlow {}
impl Cast<dyn SubChoreographyType> for MessageFlow {}
impl Cast<dyn SubChoreographyTypeMut> for MessageFlow {}
impl Cast<dyn SubConversationType> for MessageFlow {}
impl Cast<dyn SubConversationTypeMut> for MessageFlow {}
impl Cast<dyn SubProcessType> for MessageFlow {}
impl Cast<dyn SubProcessTypeMut> for MessageFlow {}
impl Cast<dyn TaskType> for MessageFlow {}
impl Cast<dyn TaskTypeMut> for MessageFlow {}
impl Cast<dyn TerminateEventDefinitionType> for MessageFlow {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn TextAnnotationType> for MessageFlow {}
impl Cast<dyn TextAnnotationTypeMut> for MessageFlow {}
impl Cast<dyn TextType> for MessageFlow {}
impl Cast<dyn TextTypeMut> for MessageFlow {}
impl Cast<dyn ThrowEventType> for MessageFlow {}
impl Cast<dyn ThrowEventTypeMut> for MessageFlow {}
impl Cast<dyn TimerEventDefinitionType> for MessageFlow {}
impl Cast<dyn TimerEventDefinitionTypeMut> for MessageFlow {}
impl Cast<dyn TransactionType> for MessageFlow {}
impl Cast<dyn TransactionTypeMut> for MessageFlow {}
impl Cast<dyn UserTaskType> for MessageFlow {}
impl Cast<dyn UserTaskTypeMut> for MessageFlow {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:messageFlowAssociation")]
pub struct MessageFlowAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "innerMessageFlowRef")]
    #[tia("MessageFlowAssociationType",rg*="inner_message_flow_ref","MessageFlowAssociationTypeMut",s)]
    pub inner_message_flow_ref: String,
    #[xml(attr = "outerMessageFlowRef")]
    #[tia("MessageFlowAssociationType",rg*="outer_message_flow_ref","MessageFlowAssociationTypeMut",s)]
    pub outer_message_flow_ref: String,
}
impl DocumentElement for MessageFlowAssociation {
    fn element(&self) -> Element {
        Element::MessageFlowAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for MessageFlowAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `messageFlowAssociation`
pub trait MessageFlowAssociationType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `innerMessageFlowRef`
    fn inner_message_flow_ref(&self) -> &String;
    /// Get value of attribute `outerMessageFlowRef`
    fn outer_message_flow_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(MessageFlowAssociationType);
impl_downcast!(MessageFlowAssociationType);
/// Mutable access to `messageFlowAssociation`
pub trait MessageFlowAssociationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + MessageFlowAssociationType
{
    /// Set value of attribute `innerMessageFlowRef`
    fn set_inner_message_flow_ref(&mut self, value: String);
    /// Set value of attribute `outerMessageFlowRef`
    fn set_outer_message_flow_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(MessageFlowAssociationTypeMut);
impl_downcast!(MessageFlowAssociationTypeMut);
impl Cast<dyn DefinitionsType> for MessageFlowAssociation {}
impl Cast<dyn DefinitionsTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ImportType> for MessageFlowAssociation {}
impl Cast<dyn ImportTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ActivityType> for MessageFlowAssociation {}
impl Cast<dyn ActivityTypeMut> for MessageFlowAssociation {}
impl Cast<dyn AdHocSubProcessType> for MessageFlowAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ArtifactType> for MessageFlowAssociation {}
impl Cast<dyn ArtifactTypeMut> for MessageFlowAssociation {}
impl Cast<dyn AssignmentType> for MessageFlowAssociation {}
impl Cast<dyn AssignmentTypeMut> for MessageFlowAssociation {}
impl Cast<dyn AssociationType> for MessageFlowAssociation {}
impl Cast<dyn AssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn AuditingType> for MessageFlowAssociation {}
impl Cast<dyn AuditingTypeMut> for MessageFlowAssociation {}
impl Cast<dyn BaseElementType> for MessageFlowAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for MessageFlowAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for MessageFlowAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for MessageFlowAssociation {}
impl Cast<dyn BoundaryEventType> for MessageFlowAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn BusinessRuleTaskType> for MessageFlowAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CallableElementType> for MessageFlowAssociation {}
impl Cast<dyn CallableElementTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CallActivityType> for MessageFlowAssociation {}
impl Cast<dyn CallActivityTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CallChoreographyType> for MessageFlowAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CallConversationType> for MessageFlowAssociation {}
impl Cast<dyn CallConversationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CancelEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CatchEventType> for MessageFlowAssociation {}
impl Cast<dyn CatchEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CategoryType> for MessageFlowAssociation {}
impl Cast<dyn CategoryTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CategoryValueType> for MessageFlowAssociation {}
impl Cast<dyn CategoryValueTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyType> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyActivityType> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyTaskType> for MessageFlowAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CollaborationType> for MessageFlowAssociation {}
impl Cast<dyn CollaborationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ComplexGatewayType> for MessageFlowAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ConversationType> for MessageFlowAssociation {}
impl Cast<dyn ConversationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ConversationAssociationType> for MessageFlowAssociation {}
impl Cast<dyn ConversationAssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ConversationLinkType> for MessageFlowAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ConversationNodeType> for MessageFlowAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CorrelationKeyType> for MessageFlowAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyType> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for MessageFlowAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for MessageFlowAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataAssociationType> for MessageFlowAssociation {}
impl Cast<dyn DataAssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataInputType> for MessageFlowAssociation {}
impl Cast<dyn DataInputTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataInputAssociationType> for MessageFlowAssociation {}
impl Cast<dyn DataInputAssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataObjectType> for MessageFlowAssociation {}
impl Cast<dyn DataObjectTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataObjectReferenceType> for MessageFlowAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataOutputType> for MessageFlowAssociation {}
impl Cast<dyn DataOutputTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataOutputAssociationType> for MessageFlowAssociation {}
impl Cast<dyn DataOutputAssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataStateType> for MessageFlowAssociation {}
impl Cast<dyn DataStateTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataStoreType> for MessageFlowAssociation {}
impl Cast<dyn DataStoreTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DataStoreReferenceType> for MessageFlowAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for MessageFlowAssociation {}
impl Cast<dyn DocumentationType> for MessageFlowAssociation {}
impl Cast<dyn DocumentationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EndEventType> for MessageFlowAssociation {}
impl Cast<dyn EndEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EndPointType> for MessageFlowAssociation {}
impl Cast<dyn EndPointTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ErrorType> for MessageFlowAssociation {}
impl Cast<dyn ErrorTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EscalationType> for MessageFlowAssociation {}
impl Cast<dyn EscalationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EventType> for MessageFlowAssociation {}
impl Cast<dyn EventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EventBasedGatewayType> for MessageFlowAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn EventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ExclusiveGatewayType> for MessageFlowAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ExpressionType> for MessageFlowAssociation {}
impl Cast<dyn ExpressionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ExtensionType> for MessageFlowAssociation {}
impl Cast<dyn ExtensionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ExtensionElementsType> for MessageFlowAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for MessageFlowAssociation {}
impl Cast<dyn FlowElementType> for MessageFlowAssociation {}
impl Cast<dyn FlowElementTypeMut> for MessageFlowAssociation {}
impl Cast<dyn FlowNodeType> for MessageFlowAssociation {}
impl Cast<dyn FlowNodeTypeMut> for MessageFlowAssociation {}
impl Cast<dyn FormalExpressionType> for MessageFlowAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GatewayType> for MessageFlowAssociation {}
impl Cast<dyn GatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalConversationType> for MessageFlowAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalManualTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalScriptTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GlobalUserTaskType> for MessageFlowAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn GroupType> for MessageFlowAssociation {}
impl Cast<dyn GroupTypeMut> for MessageFlowAssociation {}
impl Cast<dyn HumanPerformerType> for MessageFlowAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ImplicitThrowEventType> for MessageFlowAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn InclusiveGatewayType> for MessageFlowAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn InputSetType> for MessageFlowAssociation {}
impl Cast<dyn InputSetTypeMut> for MessageFlowAssociation {}
impl Cast<dyn InterfaceType> for MessageFlowAssociation {}
impl Cast<dyn InterfaceTypeMut> for MessageFlowAssociation {}
impl Cast<dyn IntermediateCatchEventType> for MessageFlowAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn IntermediateThrowEventType> for MessageFlowAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn InputOutputBindingType> for MessageFlowAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for MessageFlowAssociation {}
impl Cast<dyn InputOutputSpecificationType> for MessageFlowAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ItemDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn LaneType> for MessageFlowAssociation {}
impl Cast<dyn LaneTypeMut> for MessageFlowAssociation {}
impl Cast<dyn LaneSetType> for MessageFlowAssociation {}
impl Cast<dyn LaneSetTypeMut> for MessageFlowAssociation {}
impl Cast<dyn LinkEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn LoopCharacteristicsType> for MessageFlowAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ManualTaskType> for MessageFlowAssociation {}
impl Cast<dyn ManualTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn MessageType> for MessageFlowAssociation {}
impl Cast<dyn MessageTypeMut> for MessageFlowAssociation {}
impl Cast<dyn MessageEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn MessageFlowType> for MessageFlowAssociation {}
impl Cast<dyn MessageFlowTypeMut> for MessageFlowAssociation {}
impl Cast<dyn MessageFlowAssociationType> for MessageFlowAssociation {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for MessageFlowAssociation {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MonitoringType> for MessageFlowAssociation {}
impl Cast<dyn MonitoringTypeMut> for MessageFlowAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for MessageFlowAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for MessageFlowAssociation {}
impl Cast<dyn OperationType> for MessageFlowAssociation {}
impl Cast<dyn OperationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn OutputSetType> for MessageFlowAssociation {}
impl Cast<dyn OutputSetTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ParallelGatewayType> for MessageFlowAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ParticipantType> for MessageFlowAssociation {}
impl Cast<dyn ParticipantTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ParticipantAssociationType> for MessageFlowAssociation {}
impl Cast<dyn ParticipantAssociationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ParticipantMultiplicityType> for MessageFlowAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for MessageFlowAssociation {}
impl Cast<dyn PartnerEntityType> for MessageFlowAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for MessageFlowAssociation {}
impl Cast<dyn PartnerRoleType> for MessageFlowAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for MessageFlowAssociation {}
impl Cast<dyn PerformerType> for MessageFlowAssociation {}
impl Cast<dyn PerformerTypeMut> for MessageFlowAssociation {}
impl Cast<dyn PotentialOwnerType> for MessageFlowAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ProcessType> for MessageFlowAssociation {}
impl Cast<dyn ProcessTypeMut> for MessageFlowAssociation {}
impl Cast<dyn PropertyType> for MessageFlowAssociation {}
impl Cast<dyn PropertyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ReceiveTaskType> for MessageFlowAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn RelationshipType> for MessageFlowAssociation {}
impl Cast<dyn RelationshipTypeMut> for MessageFlowAssociation {}
impl Cast<dyn RenderingType> for MessageFlowAssociation {}
impl Cast<dyn RenderingTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ResourceType> for MessageFlowAssociation {}
impl Cast<dyn ResourceTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for MessageFlowAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ResourceParameterType> for MessageFlowAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ResourceParameterBindingType> for MessageFlowAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ResourceRoleType> for MessageFlowAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for MessageFlowAssociation {}
impl Cast<dyn RootElementType> for MessageFlowAssociation {}
impl Cast<dyn RootElementTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ScriptTaskType> for MessageFlowAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ScriptType> for MessageFlowAssociation {}
impl Cast<dyn ScriptTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SendTaskType> for MessageFlowAssociation {}
impl Cast<dyn SendTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SequenceFlowType> for MessageFlowAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ServiceTaskType> for MessageFlowAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SignalType> for MessageFlowAssociation {}
impl Cast<dyn SignalTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SignalEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for MessageFlowAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for MessageFlowAssociation {}
impl Cast<dyn StartEventType> for MessageFlowAssociation {}
impl Cast<dyn StartEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SubChoreographyType> for MessageFlowAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SubConversationType> for MessageFlowAssociation {}
impl Cast<dyn SubConversationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn SubProcessType> for MessageFlowAssociation {}
impl Cast<dyn SubProcessTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TaskType> for MessageFlowAssociation {}
impl Cast<dyn TaskTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TextAnnotationType> for MessageFlowAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TextType> for MessageFlowAssociation {}
impl Cast<dyn TextTypeMut> for MessageFlowAssociation {}
impl Cast<dyn ThrowEventType> for MessageFlowAssociation {}
impl Cast<dyn ThrowEventTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TimerEventDefinitionType> for MessageFlowAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn TransactionType> for MessageFlowAssociation {}
impl Cast<dyn TransactionTypeMut> for MessageFlowAssociation {}
impl Cast<dyn UserTaskType> for MessageFlowAssociation {}
impl Cast<dyn UserTaskTypeMut> for MessageFlowAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:monitoring")]
pub struct Monitoring {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for Monitoring {
    fn element(&self) -> Element {
        Element::Monitoring
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Monitoring {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl MonitoringType for Monitoring {}
impl MonitoringTypeMut for Monitoring {}
//

/// Access to `monitoring`
pub trait MonitoringType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(MonitoringType);
impl_downcast!(MonitoringType);
/// Mutable access to `monitoring`
pub trait MonitoringTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + MonitoringType
{
}
dyn_clone::clone_trait_object!(MonitoringTypeMut);
impl_downcast!(MonitoringTypeMut);
impl Cast<dyn DefinitionsType> for Monitoring {}
impl Cast<dyn DefinitionsTypeMut> for Monitoring {}
impl Cast<dyn ImportType> for Monitoring {}
impl Cast<dyn ImportTypeMut> for Monitoring {}
impl Cast<dyn ActivityType> for Monitoring {}
impl Cast<dyn ActivityTypeMut> for Monitoring {}
impl Cast<dyn AdHocSubProcessType> for Monitoring {}
impl Cast<dyn AdHocSubProcessTypeMut> for Monitoring {}
impl Cast<dyn ArtifactType> for Monitoring {}
impl Cast<dyn ArtifactTypeMut> for Monitoring {}
impl Cast<dyn AssignmentType> for Monitoring {}
impl Cast<dyn AssignmentTypeMut> for Monitoring {}
impl Cast<dyn AssociationType> for Monitoring {}
impl Cast<dyn AssociationTypeMut> for Monitoring {}
impl Cast<dyn AuditingType> for Monitoring {}
impl Cast<dyn AuditingTypeMut> for Monitoring {}
impl Cast<dyn BaseElementType> for Monitoring {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Monitoring {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Monitoring {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Monitoring {}
impl Cast<dyn BoundaryEventType> for Monitoring {}
impl Cast<dyn BoundaryEventTypeMut> for Monitoring {}
impl Cast<dyn BusinessRuleTaskType> for Monitoring {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Monitoring {}
impl Cast<dyn CallableElementType> for Monitoring {}
impl Cast<dyn CallableElementTypeMut> for Monitoring {}
impl Cast<dyn CallActivityType> for Monitoring {}
impl Cast<dyn CallActivityTypeMut> for Monitoring {}
impl Cast<dyn CallChoreographyType> for Monitoring {}
impl Cast<dyn CallChoreographyTypeMut> for Monitoring {}
impl Cast<dyn CallConversationType> for Monitoring {}
impl Cast<dyn CallConversationTypeMut> for Monitoring {}
impl Cast<dyn CancelEventDefinitionType> for Monitoring {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn CatchEventType> for Monitoring {}
impl Cast<dyn CatchEventTypeMut> for Monitoring {}
impl Cast<dyn CategoryType> for Monitoring {}
impl Cast<dyn CategoryTypeMut> for Monitoring {}
impl Cast<dyn CategoryValueType> for Monitoring {}
impl Cast<dyn CategoryValueTypeMut> for Monitoring {}
impl Cast<dyn ChoreographyType> for Monitoring {}
impl Cast<dyn ChoreographyTypeMut> for Monitoring {}
impl Cast<dyn ChoreographyActivityType> for Monitoring {}
impl Cast<dyn ChoreographyActivityTypeMut> for Monitoring {}
impl Cast<dyn ChoreographyTaskType> for Monitoring {}
impl Cast<dyn ChoreographyTaskTypeMut> for Monitoring {}
impl Cast<dyn CollaborationType> for Monitoring {}
impl Cast<dyn CollaborationTypeMut> for Monitoring {}
impl Cast<dyn CompensateEventDefinitionType> for Monitoring {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Monitoring {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Monitoring {}
impl Cast<dyn ComplexGatewayType> for Monitoring {}
impl Cast<dyn ComplexGatewayTypeMut> for Monitoring {}
impl Cast<dyn ConditionalEventDefinitionType> for Monitoring {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn ConversationType> for Monitoring {}
impl Cast<dyn ConversationTypeMut> for Monitoring {}
impl Cast<dyn ConversationAssociationType> for Monitoring {}
impl Cast<dyn ConversationAssociationTypeMut> for Monitoring {}
impl Cast<dyn ConversationLinkType> for Monitoring {}
impl Cast<dyn ConversationLinkTypeMut> for Monitoring {}
impl Cast<dyn ConversationNodeType> for Monitoring {}
impl Cast<dyn ConversationNodeTypeMut> for Monitoring {}
impl Cast<dyn CorrelationKeyType> for Monitoring {}
impl Cast<dyn CorrelationKeyTypeMut> for Monitoring {}
impl Cast<dyn CorrelationPropertyType> for Monitoring {}
impl Cast<dyn CorrelationPropertyTypeMut> for Monitoring {}
impl Cast<dyn CorrelationPropertyBindingType> for Monitoring {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Monitoring {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Monitoring {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Monitoring {}
impl Cast<dyn CorrelationSubscriptionType> for Monitoring {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Monitoring {}
impl Cast<dyn DataAssociationType> for Monitoring {}
impl Cast<dyn DataAssociationTypeMut> for Monitoring {}
impl Cast<dyn DataInputType> for Monitoring {}
impl Cast<dyn DataInputTypeMut> for Monitoring {}
impl Cast<dyn DataInputAssociationType> for Monitoring {}
impl Cast<dyn DataInputAssociationTypeMut> for Monitoring {}
impl Cast<dyn DataObjectType> for Monitoring {}
impl Cast<dyn DataObjectTypeMut> for Monitoring {}
impl Cast<dyn DataObjectReferenceType> for Monitoring {}
impl Cast<dyn DataObjectReferenceTypeMut> for Monitoring {}
impl Cast<dyn DataOutputType> for Monitoring {}
impl Cast<dyn DataOutputTypeMut> for Monitoring {}
impl Cast<dyn DataOutputAssociationType> for Monitoring {}
impl Cast<dyn DataOutputAssociationTypeMut> for Monitoring {}
impl Cast<dyn DataStateType> for Monitoring {}
impl Cast<dyn DataStateTypeMut> for Monitoring {}
impl Cast<dyn DataStoreType> for Monitoring {}
impl Cast<dyn DataStoreTypeMut> for Monitoring {}
impl Cast<dyn DataStoreReferenceType> for Monitoring {}
impl Cast<dyn DataStoreReferenceTypeMut> for Monitoring {}
impl Cast<dyn DocumentationType> for Monitoring {}
impl Cast<dyn DocumentationTypeMut> for Monitoring {}
impl Cast<dyn EndEventType> for Monitoring {}
impl Cast<dyn EndEventTypeMut> for Monitoring {}
impl Cast<dyn EndPointType> for Monitoring {}
impl Cast<dyn EndPointTypeMut> for Monitoring {}
impl Cast<dyn ErrorType> for Monitoring {}
impl Cast<dyn ErrorTypeMut> for Monitoring {}
impl Cast<dyn ErrorEventDefinitionType> for Monitoring {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn EscalationType> for Monitoring {}
impl Cast<dyn EscalationTypeMut> for Monitoring {}
impl Cast<dyn EscalationEventDefinitionType> for Monitoring {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn EventType> for Monitoring {}
impl Cast<dyn EventTypeMut> for Monitoring {}
impl Cast<dyn EventBasedGatewayType> for Monitoring {}
impl Cast<dyn EventBasedGatewayTypeMut> for Monitoring {}
impl Cast<dyn EventDefinitionType> for Monitoring {}
impl Cast<dyn EventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn ExclusiveGatewayType> for Monitoring {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Monitoring {}
impl Cast<dyn ExpressionType> for Monitoring {}
impl Cast<dyn ExpressionTypeMut> for Monitoring {}
impl Cast<dyn ExtensionType> for Monitoring {}
impl Cast<dyn ExtensionTypeMut> for Monitoring {}
impl Cast<dyn ExtensionElementsType> for Monitoring {}
impl Cast<dyn ExtensionElementsTypeMut> for Monitoring {}
impl Cast<dyn FlowElementType> for Monitoring {}
impl Cast<dyn FlowElementTypeMut> for Monitoring {}
impl Cast<dyn FlowNodeType> for Monitoring {}
impl Cast<dyn FlowNodeTypeMut> for Monitoring {}
impl Cast<dyn FormalExpressionType> for Monitoring {}
impl Cast<dyn FormalExpressionTypeMut> for Monitoring {}
impl Cast<dyn GatewayType> for Monitoring {}
impl Cast<dyn GatewayTypeMut> for Monitoring {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Monitoring {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Monitoring {}
impl Cast<dyn GlobalChoreographyTaskType> for Monitoring {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Monitoring {}
impl Cast<dyn GlobalConversationType> for Monitoring {}
impl Cast<dyn GlobalConversationTypeMut> for Monitoring {}
impl Cast<dyn GlobalManualTaskType> for Monitoring {}
impl Cast<dyn GlobalManualTaskTypeMut> for Monitoring {}
impl Cast<dyn GlobalScriptTaskType> for Monitoring {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Monitoring {}
impl Cast<dyn GlobalTaskType> for Monitoring {}
impl Cast<dyn GlobalTaskTypeMut> for Monitoring {}
impl Cast<dyn GlobalUserTaskType> for Monitoring {}
impl Cast<dyn GlobalUserTaskTypeMut> for Monitoring {}
impl Cast<dyn GroupType> for Monitoring {}
impl Cast<dyn GroupTypeMut> for Monitoring {}
impl Cast<dyn HumanPerformerType> for Monitoring {}
impl Cast<dyn HumanPerformerTypeMut> for Monitoring {}
impl Cast<dyn ImplicitThrowEventType> for Monitoring {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Monitoring {}
impl Cast<dyn InclusiveGatewayType> for Monitoring {}
impl Cast<dyn InclusiveGatewayTypeMut> for Monitoring {}
impl Cast<dyn InputSetType> for Monitoring {}
impl Cast<dyn InputSetTypeMut> for Monitoring {}
impl Cast<dyn InterfaceType> for Monitoring {}
impl Cast<dyn InterfaceTypeMut> for Monitoring {}
impl Cast<dyn IntermediateCatchEventType> for Monitoring {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Monitoring {}
impl Cast<dyn IntermediateThrowEventType> for Monitoring {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Monitoring {}
impl Cast<dyn InputOutputBindingType> for Monitoring {}
impl Cast<dyn InputOutputBindingTypeMut> for Monitoring {}
impl Cast<dyn InputOutputSpecificationType> for Monitoring {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Monitoring {}
impl Cast<dyn ItemDefinitionType> for Monitoring {}
impl Cast<dyn ItemDefinitionTypeMut> for Monitoring {}
impl Cast<dyn LaneType> for Monitoring {}
impl Cast<dyn LaneTypeMut> for Monitoring {}
impl Cast<dyn LaneSetType> for Monitoring {}
impl Cast<dyn LaneSetTypeMut> for Monitoring {}
impl Cast<dyn LinkEventDefinitionType> for Monitoring {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn LoopCharacteristicsType> for Monitoring {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Monitoring {}
impl Cast<dyn ManualTaskType> for Monitoring {}
impl Cast<dyn ManualTaskTypeMut> for Monitoring {}
impl Cast<dyn MessageType> for Monitoring {}
impl Cast<dyn MessageTypeMut> for Monitoring {}
impl Cast<dyn MessageEventDefinitionType> for Monitoring {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn MessageFlowType> for Monitoring {}
impl Cast<dyn MessageFlowTypeMut> for Monitoring {}
impl Cast<dyn MessageFlowAssociationType> for Monitoring {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Monitoring {}
impl Cast<dyn MonitoringType> for Monitoring {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MonitoringTypeMut> for Monitoring {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Monitoring {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Monitoring {}
impl Cast<dyn OperationType> for Monitoring {}
impl Cast<dyn OperationTypeMut> for Monitoring {}
impl Cast<dyn OutputSetType> for Monitoring {}
impl Cast<dyn OutputSetTypeMut> for Monitoring {}
impl Cast<dyn ParallelGatewayType> for Monitoring {}
impl Cast<dyn ParallelGatewayTypeMut> for Monitoring {}
impl Cast<dyn ParticipantType> for Monitoring {}
impl Cast<dyn ParticipantTypeMut> for Monitoring {}
impl Cast<dyn ParticipantAssociationType> for Monitoring {}
impl Cast<dyn ParticipantAssociationTypeMut> for Monitoring {}
impl Cast<dyn ParticipantMultiplicityType> for Monitoring {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Monitoring {}
impl Cast<dyn PartnerEntityType> for Monitoring {}
impl Cast<dyn PartnerEntityTypeMut> for Monitoring {}
impl Cast<dyn PartnerRoleType> for Monitoring {}
impl Cast<dyn PartnerRoleTypeMut> for Monitoring {}
impl Cast<dyn PerformerType> for Monitoring {}
impl Cast<dyn PerformerTypeMut> for Monitoring {}
impl Cast<dyn PotentialOwnerType> for Monitoring {}
impl Cast<dyn PotentialOwnerTypeMut> for Monitoring {}
impl Cast<dyn ProcessType> for Monitoring {}
impl Cast<dyn ProcessTypeMut> for Monitoring {}
impl Cast<dyn PropertyType> for Monitoring {}
impl Cast<dyn PropertyTypeMut> for Monitoring {}
impl Cast<dyn ReceiveTaskType> for Monitoring {}
impl Cast<dyn ReceiveTaskTypeMut> for Monitoring {}
impl Cast<dyn RelationshipType> for Monitoring {}
impl Cast<dyn RelationshipTypeMut> for Monitoring {}
impl Cast<dyn RenderingType> for Monitoring {}
impl Cast<dyn RenderingTypeMut> for Monitoring {}
impl Cast<dyn ResourceType> for Monitoring {}
impl Cast<dyn ResourceTypeMut> for Monitoring {}
impl Cast<dyn ResourceAssignmentExpressionType> for Monitoring {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Monitoring {}
impl Cast<dyn ResourceParameterType> for Monitoring {}
impl Cast<dyn ResourceParameterTypeMut> for Monitoring {}
impl Cast<dyn ResourceParameterBindingType> for Monitoring {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Monitoring {}
impl Cast<dyn ResourceRoleType> for Monitoring {}
impl Cast<dyn ResourceRoleTypeMut> for Monitoring {}
impl Cast<dyn RootElementType> for Monitoring {}
impl Cast<dyn RootElementTypeMut> for Monitoring {}
impl Cast<dyn ScriptTaskType> for Monitoring {}
impl Cast<dyn ScriptTaskTypeMut> for Monitoring {}
impl Cast<dyn ScriptType> for Monitoring {}
impl Cast<dyn ScriptTypeMut> for Monitoring {}
impl Cast<dyn SendTaskType> for Monitoring {}
impl Cast<dyn SendTaskTypeMut> for Monitoring {}
impl Cast<dyn SequenceFlowType> for Monitoring {}
impl Cast<dyn SequenceFlowTypeMut> for Monitoring {}
impl Cast<dyn ServiceTaskType> for Monitoring {}
impl Cast<dyn ServiceTaskTypeMut> for Monitoring {}
impl Cast<dyn SignalType> for Monitoring {}
impl Cast<dyn SignalTypeMut> for Monitoring {}
impl Cast<dyn SignalEventDefinitionType> for Monitoring {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn StandardLoopCharacteristicsType> for Monitoring {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Monitoring {}
impl Cast<dyn StartEventType> for Monitoring {}
impl Cast<dyn StartEventTypeMut> for Monitoring {}
impl Cast<dyn SubChoreographyType> for Monitoring {}
impl Cast<dyn SubChoreographyTypeMut> for Monitoring {}
impl Cast<dyn SubConversationType> for Monitoring {}
impl Cast<dyn SubConversationTypeMut> for Monitoring {}
impl Cast<dyn SubProcessType> for Monitoring {}
impl Cast<dyn SubProcessTypeMut> for Monitoring {}
impl Cast<dyn TaskType> for Monitoring {}
impl Cast<dyn TaskTypeMut> for Monitoring {}
impl Cast<dyn TerminateEventDefinitionType> for Monitoring {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn TextAnnotationType> for Monitoring {}
impl Cast<dyn TextAnnotationTypeMut> for Monitoring {}
impl Cast<dyn TextType> for Monitoring {}
impl Cast<dyn TextTypeMut> for Monitoring {}
impl Cast<dyn ThrowEventType> for Monitoring {}
impl Cast<dyn ThrowEventTypeMut> for Monitoring {}
impl Cast<dyn TimerEventDefinitionType> for Monitoring {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Monitoring {}
impl Cast<dyn TransactionType> for Monitoring {}
impl Cast<dyn TransactionTypeMut> for Monitoring {}
impl Cast<dyn UserTaskType> for Monitoring {}
impl Cast<dyn UserTaskTypeMut> for Monitoring {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:multiInstanceLoopCharacteristics")]
pub struct MultiInstanceLoopCharacteristics {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "isSequential")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="is_sequential","MultiInstanceLoopCharacteristicsTypeMut",s)]
    pub is_sequential: Option<bool>,
    #[xml(attr = "behavior")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="behavior","MultiInstanceLoopCharacteristicsTypeMut",s)]
    pub behavior: Option<String>,
    #[xml(attr = "oneBehaviorEventRef")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="one_behavior_event_ref","MultiInstanceLoopCharacteristicsTypeMut",s)]
    pub one_behavior_event_ref: Option<String>,
    #[xml(attr = "noneBehaviorEventRef")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="none_behavior_event_ref","MultiInstanceLoopCharacteristicsTypeMut",s)]
    pub none_behavior_event_ref: Option<String>,
    #[xml(child = "bpmn:loopCardinality")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="loop_cardinality","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="loop_cardinality_mut")]
    pub loop_cardinality: Option<MultiInstanceLoopCharacteristicsLoopCardinality>,
    #[xml(flatten_text = "bpmn:loopDataInputRef")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="loop_data_input_ref","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="loop_data_input_ref_mut")]
    pub loop_data_input_ref: Option<String>,
    #[xml(flatten_text = "bpmn:loopDataOutputRef")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="loop_data_output_ref","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="loop_data_output_ref_mut")]
    pub loop_data_output_ref: Option<String>,
    #[xml(child = "bpmn:inputDataItem")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="input_data_item","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="input_data_item_mut")]
    pub input_data_item: Option<MultiInstanceLoopCharacteristicsInputDataItem>,
    #[xml(child = "bpmn:outputDataItem")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="output_data_item","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="output_data_item_mut")]
    pub output_data_item: Option<MultiInstanceLoopCharacteristicsOutputDataItem>,
    #[xml(child = "bpmn:complexBehaviorDefinition")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="complex_behavior_definitions","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="complex_behavior_definitions_mut")]
    pub complex_behavior_definitions: Vec<ComplexBehaviorDefinition>,
    #[xml(child = "bpmn:completionCondition")]
    #[tia("MultiInstanceLoopCharacteristicsType",rg*="completion_condition","MultiInstanceLoopCharacteristicsTypeMut",s,rmg*="completion_condition_mut")]
    pub completion_condition: Option<MultiInstanceLoopCharacteristicsCompletionCondition>,
}
impl DocumentElement for MultiInstanceLoopCharacteristics {
    fn element(&self) -> Element {
        Element::MultiInstanceLoopCharacteristics
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for MultiInstanceLoopCharacteristics {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.loop_cardinality.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.input_data_item.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.output_data_item.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.complex_behavior_definitions.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.completion_condition.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.loop_cardinality.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.input_data_item.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.output_data_item.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.complex_behavior_definitions.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.completion_condition.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl LoopCharacteristicsType for MultiInstanceLoopCharacteristics {}
impl LoopCharacteristicsTypeMut for MultiInstanceLoopCharacteristics {}
//

/// Access to `multiInstanceLoopCharacteristics`
pub trait MultiInstanceLoopCharacteristicsType:
    LoopCharacteristicsType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `isSequential`
    fn is_sequential(&self) -> &Option<bool>;
    /// Get value of attribute `behavior`
    fn behavior(&self) -> &Option<String>;
    /// Get value of attribute `oneBehaviorEventRef`
    fn one_behavior_event_ref(&self) -> &Option<String>;
    /// Get value of attribute `noneBehaviorEventRef`
    fn none_behavior_event_ref(&self) -> &Option<String>;
    /// Get value of `loopCardinality` child
    fn loop_cardinality(&self) -> &Option<MultiInstanceLoopCharacteristicsLoopCardinality>;
    /// Get value of `loopDataInputRef` child
    fn loop_data_input_ref(&self) -> &Option<String>;
    /// Get value of `loopDataOutputRef` child
    fn loop_data_output_ref(&self) -> &Option<String>;
    /// Get value of `inputDataItem` child
    fn input_data_item(&self) -> &Option<MultiInstanceLoopCharacteristicsInputDataItem>;
    /// Get value of `outputDataItem` child
    fn output_data_item(&self) -> &Option<MultiInstanceLoopCharacteristicsOutputDataItem>;
    /// Get value of `complexBehaviorDefinition` child
    fn complex_behavior_definitions(&self) -> &Vec<ComplexBehaviorDefinition>;
    /// Get value of `completionCondition` child
    fn completion_condition(&self) -> &Option<MultiInstanceLoopCharacteristicsCompletionCondition>;
}
dyn_clone::clone_trait_object!(MultiInstanceLoopCharacteristicsType);
impl_downcast!(MultiInstanceLoopCharacteristicsType);
/// Mutable access to `multiInstanceLoopCharacteristics`
pub trait MultiInstanceLoopCharacteristicsTypeMut:
    LoopCharacteristicsTypeMut
    + Downcast
    + Debug
    + Send
    + DynClone
    + MultiInstanceLoopCharacteristicsType
{
    /// Set value of attribute `isSequential`
    fn set_is_sequential(&mut self, value: Option<bool>);
    /// Set value of attribute `behavior`
    fn set_behavior(&mut self, value: Option<String>);
    /// Set value of attribute `oneBehaviorEventRef`
    fn set_one_behavior_event_ref(&mut self, value: Option<String>);
    /// Set value of attribute `noneBehaviorEventRef`
    fn set_none_behavior_event_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `loopCardinality` child
    fn loop_cardinality_mut(
        &mut self,
    ) -> &mut Option<MultiInstanceLoopCharacteristicsLoopCardinality>;
    /// Set value of `loopCardinality` child
    fn set_loop_cardinality(
        &mut self,
        value: Option<MultiInstanceLoopCharacteristicsLoopCardinality>,
    );
    /// Get a mutable value of `loopDataInputRef` child
    fn loop_data_input_ref_mut(&mut self) -> &mut Option<String>;
    /// Set value of `loopDataInputRef` child
    fn set_loop_data_input_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `loopDataOutputRef` child
    fn loop_data_output_ref_mut(&mut self) -> &mut Option<String>;
    /// Set value of `loopDataOutputRef` child
    fn set_loop_data_output_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `inputDataItem` child
    fn input_data_item_mut(&mut self)
        -> &mut Option<MultiInstanceLoopCharacteristicsInputDataItem>;
    /// Set value of `inputDataItem` child
    fn set_input_data_item(&mut self, value: Option<MultiInstanceLoopCharacteristicsInputDataItem>);
    /// Get a mutable value of `outputDataItem` child
    fn output_data_item_mut(
        &mut self,
    ) -> &mut Option<MultiInstanceLoopCharacteristicsOutputDataItem>;
    /// Set value of `outputDataItem` child
    fn set_output_data_item(
        &mut self,
        value: Option<MultiInstanceLoopCharacteristicsOutputDataItem>,
    );
    /// Get a mutable value of `complexBehaviorDefinition` child
    fn complex_behavior_definitions_mut(&mut self) -> &mut Vec<ComplexBehaviorDefinition>;
    /// Set value of `complexBehaviorDefinition` child
    fn set_complex_behavior_definitions(&mut self, value: Vec<ComplexBehaviorDefinition>);
    /// Get a mutable value of `completionCondition` child
    fn completion_condition_mut(
        &mut self,
    ) -> &mut Option<MultiInstanceLoopCharacteristicsCompletionCondition>;
    /// Set value of `completionCondition` child
    fn set_completion_condition(
        &mut self,
        value: Option<MultiInstanceLoopCharacteristicsCompletionCondition>,
    );
}
dyn_clone::clone_trait_object!(MultiInstanceLoopCharacteristicsTypeMut);
impl_downcast!(MultiInstanceLoopCharacteristicsTypeMut);
impl Cast<dyn DefinitionsType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DefinitionsTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ImportType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ImportTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ActivityType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ActivityTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AdHocSubProcessType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AdHocSubProcessTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ArtifactType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ArtifactTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AssignmentType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AssignmentTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AuditingType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn AuditingTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BaseElementType> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BoundaryEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BoundaryEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BusinessRuleTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn BusinessRuleTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallableElementType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallableElementTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallActivityType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallActivityTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallChoreographyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallChoreographyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallConversationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CallConversationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CancelEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CancelEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CatchEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CatchEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CategoryType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CategoryTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CategoryValueType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CategoryValueTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyActivityType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyActivityTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ChoreographyTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CollaborationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CollaborationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CompensateEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ComplexBehaviorDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ComplexGatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ComplexGatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConditionalEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationLinkType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationLinkTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationNodeType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ConversationNodeTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationKeyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationKeyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyBindingType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationSubscriptionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataInputType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataInputTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataInputAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataInputAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataObjectType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataObjectTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataObjectReferenceType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataObjectReferenceTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataOutputType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataOutputTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataOutputAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataOutputAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStateType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStateTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStoreType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStoreTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStoreReferenceType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DataStoreReferenceTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DocumentationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn DocumentationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EndEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EndEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EndPointType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EndPointTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ErrorType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ErrorTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ErrorEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EscalationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EscalationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EscalationEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventBasedGatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventBasedGatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn EventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExclusiveGatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExclusiveGatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExpressionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExpressionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExtensionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExtensionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExtensionElementsType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ExtensionElementsTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FlowElementType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FlowElementTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FlowNodeType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FlowNodeTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FormalExpressionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn FormalExpressionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalBusinessRuleTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalChoreographyTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalConversationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalConversationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalManualTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalManualTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalScriptTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalScriptTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalUserTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GlobalUserTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GroupType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn GroupTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn HumanPerformerType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn HumanPerformerTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ImplicitThrowEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ImplicitThrowEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InclusiveGatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InclusiveGatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputSetType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputSetTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InterfaceType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InterfaceTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn IntermediateCatchEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn IntermediateCatchEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn IntermediateThrowEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn IntermediateThrowEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputOutputBindingType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputOutputBindingTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputOutputSpecificationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn InputOutputSpecificationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ItemDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ItemDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LaneType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LaneTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LaneSetType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LaneSetTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LinkEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LinkEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn LoopCharacteristicsType> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ManualTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ManualTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageFlowType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageFlowTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageFlowAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MessageFlowAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MonitoringType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MonitoringTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for MultiInstanceLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn OperationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn OperationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn OutputSetType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn OutputSetTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParallelGatewayType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParallelGatewayTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantAssociationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantAssociationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantMultiplicityType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PartnerEntityType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PartnerEntityTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PartnerRoleType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PartnerRoleTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PerformerType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PerformerTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PotentialOwnerType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PotentialOwnerTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ProcessType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ProcessTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PropertyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn PropertyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ReceiveTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ReceiveTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RelationshipType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RelationshipTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RenderingType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RenderingTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceAssignmentExpressionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceParameterType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceParameterTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceParameterBindingType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceParameterBindingTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceRoleType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ResourceRoleTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RootElementType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn RootElementTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ScriptTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ScriptTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ScriptType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ScriptTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SendTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SendTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SequenceFlowType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SequenceFlowTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ServiceTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ServiceTaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SignalType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SignalTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SignalEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SignalEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn StandardLoopCharacteristicsType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn StartEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn StartEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubChoreographyType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubChoreographyTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubConversationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubConversationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubProcessType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn SubProcessTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TaskTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TerminateEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TextAnnotationType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TextAnnotationTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TextType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TextTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ThrowEventType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn ThrowEventTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TimerEventDefinitionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TimerEventDefinitionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TransactionType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn TransactionTypeMut> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn UserTaskType> for MultiInstanceLoopCharacteristics {}
impl Cast<dyn UserTaskTypeMut> for MultiInstanceLoopCharacteristics {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:operation")]
pub struct Operation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("OperationType",rg*="name","OperationTypeMut",s)]
    pub name: String,
    #[xml(attr = "implementationRef")]
    #[tia("OperationType",rg*="implementation_ref","OperationTypeMut",s)]
    pub implementation_ref: Option<String>,
    #[xml(flatten_text = "bpmn:inMessageRef")]
    #[tia("OperationType",rg*="in_message_ref","OperationTypeMut",s,rmg*="in_message_ref_mut")]
    pub in_message_ref: String,
    #[xml(flatten_text = "bpmn:outMessageRef")]
    #[tia("OperationType",rg*="out_message_ref","OperationTypeMut",s,rmg*="out_message_ref_mut")]
    pub out_message_ref: Option<String>,
    #[xml(flatten_text = "bpmn:errorRef")]
    #[tia("OperationType",rg*="error_refs","OperationTypeMut",s,rmg*="error_refs_mut")]
    pub error_refs: Vec<String>,
}
impl DocumentElement for Operation {
    fn element(&self) -> Element {
        Element::Operation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Operation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `operation`
pub trait OperationType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &String;
    /// Get value of attribute `implementationRef`
    fn implementation_ref(&self) -> &Option<String>;
    /// Get value of `inMessageRef` child
    fn in_message_ref(&self) -> &String;
    /// Get value of `outMessageRef` child
    fn out_message_ref(&self) -> &Option<String>;
    /// Get value of `errorRef` child
    fn error_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(OperationType);
impl_downcast!(OperationType);
/// Mutable access to `operation`
pub trait OperationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + OperationType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: String);
    /// Set value of attribute `implementationRef`
    fn set_implementation_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `inMessageRef` child
    fn in_message_ref_mut(&mut self) -> &mut String;
    /// Set value of `inMessageRef` child
    fn set_in_message_ref(&mut self, value: String);
    /// Get a mutable value of `outMessageRef` child
    fn out_message_ref_mut(&mut self) -> &mut Option<String>;
    /// Set value of `outMessageRef` child
    fn set_out_message_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `errorRef` child
    fn error_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `errorRef` child
    fn set_error_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(OperationTypeMut);
impl_downcast!(OperationTypeMut);
impl Cast<dyn DefinitionsType> for Operation {}
impl Cast<dyn DefinitionsTypeMut> for Operation {}
impl Cast<dyn ImportType> for Operation {}
impl Cast<dyn ImportTypeMut> for Operation {}
impl Cast<dyn ActivityType> for Operation {}
impl Cast<dyn ActivityTypeMut> for Operation {}
impl Cast<dyn AdHocSubProcessType> for Operation {}
impl Cast<dyn AdHocSubProcessTypeMut> for Operation {}
impl Cast<dyn ArtifactType> for Operation {}
impl Cast<dyn ArtifactTypeMut> for Operation {}
impl Cast<dyn AssignmentType> for Operation {}
impl Cast<dyn AssignmentTypeMut> for Operation {}
impl Cast<dyn AssociationType> for Operation {}
impl Cast<dyn AssociationTypeMut> for Operation {}
impl Cast<dyn AuditingType> for Operation {}
impl Cast<dyn AuditingTypeMut> for Operation {}
impl Cast<dyn BaseElementType> for Operation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Operation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Operation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Operation {}
impl Cast<dyn BoundaryEventType> for Operation {}
impl Cast<dyn BoundaryEventTypeMut> for Operation {}
impl Cast<dyn BusinessRuleTaskType> for Operation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Operation {}
impl Cast<dyn CallableElementType> for Operation {}
impl Cast<dyn CallableElementTypeMut> for Operation {}
impl Cast<dyn CallActivityType> for Operation {}
impl Cast<dyn CallActivityTypeMut> for Operation {}
impl Cast<dyn CallChoreographyType> for Operation {}
impl Cast<dyn CallChoreographyTypeMut> for Operation {}
impl Cast<dyn CallConversationType> for Operation {}
impl Cast<dyn CallConversationTypeMut> for Operation {}
impl Cast<dyn CancelEventDefinitionType> for Operation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Operation {}
impl Cast<dyn CatchEventType> for Operation {}
impl Cast<dyn CatchEventTypeMut> for Operation {}
impl Cast<dyn CategoryType> for Operation {}
impl Cast<dyn CategoryTypeMut> for Operation {}
impl Cast<dyn CategoryValueType> for Operation {}
impl Cast<dyn CategoryValueTypeMut> for Operation {}
impl Cast<dyn ChoreographyType> for Operation {}
impl Cast<dyn ChoreographyTypeMut> for Operation {}
impl Cast<dyn ChoreographyActivityType> for Operation {}
impl Cast<dyn ChoreographyActivityTypeMut> for Operation {}
impl Cast<dyn ChoreographyTaskType> for Operation {}
impl Cast<dyn ChoreographyTaskTypeMut> for Operation {}
impl Cast<dyn CollaborationType> for Operation {}
impl Cast<dyn CollaborationTypeMut> for Operation {}
impl Cast<dyn CompensateEventDefinitionType> for Operation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Operation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Operation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Operation {}
impl Cast<dyn ComplexGatewayType> for Operation {}
impl Cast<dyn ComplexGatewayTypeMut> for Operation {}
impl Cast<dyn ConditionalEventDefinitionType> for Operation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Operation {}
impl Cast<dyn ConversationType> for Operation {}
impl Cast<dyn ConversationTypeMut> for Operation {}
impl Cast<dyn ConversationAssociationType> for Operation {}
impl Cast<dyn ConversationAssociationTypeMut> for Operation {}
impl Cast<dyn ConversationLinkType> for Operation {}
impl Cast<dyn ConversationLinkTypeMut> for Operation {}
impl Cast<dyn ConversationNodeType> for Operation {}
impl Cast<dyn ConversationNodeTypeMut> for Operation {}
impl Cast<dyn CorrelationKeyType> for Operation {}
impl Cast<dyn CorrelationKeyTypeMut> for Operation {}
impl Cast<dyn CorrelationPropertyType> for Operation {}
impl Cast<dyn CorrelationPropertyTypeMut> for Operation {}
impl Cast<dyn CorrelationPropertyBindingType> for Operation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Operation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Operation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Operation {}
impl Cast<dyn CorrelationSubscriptionType> for Operation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Operation {}
impl Cast<dyn DataAssociationType> for Operation {}
impl Cast<dyn DataAssociationTypeMut> for Operation {}
impl Cast<dyn DataInputType> for Operation {}
impl Cast<dyn DataInputTypeMut> for Operation {}
impl Cast<dyn DataInputAssociationType> for Operation {}
impl Cast<dyn DataInputAssociationTypeMut> for Operation {}
impl Cast<dyn DataObjectType> for Operation {}
impl Cast<dyn DataObjectTypeMut> for Operation {}
impl Cast<dyn DataObjectReferenceType> for Operation {}
impl Cast<dyn DataObjectReferenceTypeMut> for Operation {}
impl Cast<dyn DataOutputType> for Operation {}
impl Cast<dyn DataOutputTypeMut> for Operation {}
impl Cast<dyn DataOutputAssociationType> for Operation {}
impl Cast<dyn DataOutputAssociationTypeMut> for Operation {}
impl Cast<dyn DataStateType> for Operation {}
impl Cast<dyn DataStateTypeMut> for Operation {}
impl Cast<dyn DataStoreType> for Operation {}
impl Cast<dyn DataStoreTypeMut> for Operation {}
impl Cast<dyn DataStoreReferenceType> for Operation {}
impl Cast<dyn DataStoreReferenceTypeMut> for Operation {}
impl Cast<dyn DocumentationType> for Operation {}
impl Cast<dyn DocumentationTypeMut> for Operation {}
impl Cast<dyn EndEventType> for Operation {}
impl Cast<dyn EndEventTypeMut> for Operation {}
impl Cast<dyn EndPointType> for Operation {}
impl Cast<dyn EndPointTypeMut> for Operation {}
impl Cast<dyn ErrorType> for Operation {}
impl Cast<dyn ErrorTypeMut> for Operation {}
impl Cast<dyn ErrorEventDefinitionType> for Operation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Operation {}
impl Cast<dyn EscalationType> for Operation {}
impl Cast<dyn EscalationTypeMut> for Operation {}
impl Cast<dyn EscalationEventDefinitionType> for Operation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Operation {}
impl Cast<dyn EventType> for Operation {}
impl Cast<dyn EventTypeMut> for Operation {}
impl Cast<dyn EventBasedGatewayType> for Operation {}
impl Cast<dyn EventBasedGatewayTypeMut> for Operation {}
impl Cast<dyn EventDefinitionType> for Operation {}
impl Cast<dyn EventDefinitionTypeMut> for Operation {}
impl Cast<dyn ExclusiveGatewayType> for Operation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Operation {}
impl Cast<dyn ExpressionType> for Operation {}
impl Cast<dyn ExpressionTypeMut> for Operation {}
impl Cast<dyn ExtensionType> for Operation {}
impl Cast<dyn ExtensionTypeMut> for Operation {}
impl Cast<dyn ExtensionElementsType> for Operation {}
impl Cast<dyn ExtensionElementsTypeMut> for Operation {}
impl Cast<dyn FlowElementType> for Operation {}
impl Cast<dyn FlowElementTypeMut> for Operation {}
impl Cast<dyn FlowNodeType> for Operation {}
impl Cast<dyn FlowNodeTypeMut> for Operation {}
impl Cast<dyn FormalExpressionType> for Operation {}
impl Cast<dyn FormalExpressionTypeMut> for Operation {}
impl Cast<dyn GatewayType> for Operation {}
impl Cast<dyn GatewayTypeMut> for Operation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Operation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Operation {}
impl Cast<dyn GlobalChoreographyTaskType> for Operation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Operation {}
impl Cast<dyn GlobalConversationType> for Operation {}
impl Cast<dyn GlobalConversationTypeMut> for Operation {}
impl Cast<dyn GlobalManualTaskType> for Operation {}
impl Cast<dyn GlobalManualTaskTypeMut> for Operation {}
impl Cast<dyn GlobalScriptTaskType> for Operation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Operation {}
impl Cast<dyn GlobalTaskType> for Operation {}
impl Cast<dyn GlobalTaskTypeMut> for Operation {}
impl Cast<dyn GlobalUserTaskType> for Operation {}
impl Cast<dyn GlobalUserTaskTypeMut> for Operation {}
impl Cast<dyn GroupType> for Operation {}
impl Cast<dyn GroupTypeMut> for Operation {}
impl Cast<dyn HumanPerformerType> for Operation {}
impl Cast<dyn HumanPerformerTypeMut> for Operation {}
impl Cast<dyn ImplicitThrowEventType> for Operation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Operation {}
impl Cast<dyn InclusiveGatewayType> for Operation {}
impl Cast<dyn InclusiveGatewayTypeMut> for Operation {}
impl Cast<dyn InputSetType> for Operation {}
impl Cast<dyn InputSetTypeMut> for Operation {}
impl Cast<dyn InterfaceType> for Operation {}
impl Cast<dyn InterfaceTypeMut> for Operation {}
impl Cast<dyn IntermediateCatchEventType> for Operation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Operation {}
impl Cast<dyn IntermediateThrowEventType> for Operation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Operation {}
impl Cast<dyn InputOutputBindingType> for Operation {}
impl Cast<dyn InputOutputBindingTypeMut> for Operation {}
impl Cast<dyn InputOutputSpecificationType> for Operation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Operation {}
impl Cast<dyn ItemDefinitionType> for Operation {}
impl Cast<dyn ItemDefinitionTypeMut> for Operation {}
impl Cast<dyn LaneType> for Operation {}
impl Cast<dyn LaneTypeMut> for Operation {}
impl Cast<dyn LaneSetType> for Operation {}
impl Cast<dyn LaneSetTypeMut> for Operation {}
impl Cast<dyn LinkEventDefinitionType> for Operation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Operation {}
impl Cast<dyn LoopCharacteristicsType> for Operation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Operation {}
impl Cast<dyn ManualTaskType> for Operation {}
impl Cast<dyn ManualTaskTypeMut> for Operation {}
impl Cast<dyn MessageType> for Operation {}
impl Cast<dyn MessageTypeMut> for Operation {}
impl Cast<dyn MessageEventDefinitionType> for Operation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Operation {}
impl Cast<dyn MessageFlowType> for Operation {}
impl Cast<dyn MessageFlowTypeMut> for Operation {}
impl Cast<dyn MessageFlowAssociationType> for Operation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Operation {}
impl Cast<dyn MonitoringType> for Operation {}
impl Cast<dyn MonitoringTypeMut> for Operation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Operation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Operation {}
impl Cast<dyn OperationType> for Operation {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn OperationTypeMut> for Operation {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn OutputSetType> for Operation {}
impl Cast<dyn OutputSetTypeMut> for Operation {}
impl Cast<dyn ParallelGatewayType> for Operation {}
impl Cast<dyn ParallelGatewayTypeMut> for Operation {}
impl Cast<dyn ParticipantType> for Operation {}
impl Cast<dyn ParticipantTypeMut> for Operation {}
impl Cast<dyn ParticipantAssociationType> for Operation {}
impl Cast<dyn ParticipantAssociationTypeMut> for Operation {}
impl Cast<dyn ParticipantMultiplicityType> for Operation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Operation {}
impl Cast<dyn PartnerEntityType> for Operation {}
impl Cast<dyn PartnerEntityTypeMut> for Operation {}
impl Cast<dyn PartnerRoleType> for Operation {}
impl Cast<dyn PartnerRoleTypeMut> for Operation {}
impl Cast<dyn PerformerType> for Operation {}
impl Cast<dyn PerformerTypeMut> for Operation {}
impl Cast<dyn PotentialOwnerType> for Operation {}
impl Cast<dyn PotentialOwnerTypeMut> for Operation {}
impl Cast<dyn ProcessType> for Operation {}
impl Cast<dyn ProcessTypeMut> for Operation {}
impl Cast<dyn PropertyType> for Operation {}
impl Cast<dyn PropertyTypeMut> for Operation {}
impl Cast<dyn ReceiveTaskType> for Operation {}
impl Cast<dyn ReceiveTaskTypeMut> for Operation {}
impl Cast<dyn RelationshipType> for Operation {}
impl Cast<dyn RelationshipTypeMut> for Operation {}
impl Cast<dyn RenderingType> for Operation {}
impl Cast<dyn RenderingTypeMut> for Operation {}
impl Cast<dyn ResourceType> for Operation {}
impl Cast<dyn ResourceTypeMut> for Operation {}
impl Cast<dyn ResourceAssignmentExpressionType> for Operation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Operation {}
impl Cast<dyn ResourceParameterType> for Operation {}
impl Cast<dyn ResourceParameterTypeMut> for Operation {}
impl Cast<dyn ResourceParameterBindingType> for Operation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Operation {}
impl Cast<dyn ResourceRoleType> for Operation {}
impl Cast<dyn ResourceRoleTypeMut> for Operation {}
impl Cast<dyn RootElementType> for Operation {}
impl Cast<dyn RootElementTypeMut> for Operation {}
impl Cast<dyn ScriptTaskType> for Operation {}
impl Cast<dyn ScriptTaskTypeMut> for Operation {}
impl Cast<dyn ScriptType> for Operation {}
impl Cast<dyn ScriptTypeMut> for Operation {}
impl Cast<dyn SendTaskType> for Operation {}
impl Cast<dyn SendTaskTypeMut> for Operation {}
impl Cast<dyn SequenceFlowType> for Operation {}
impl Cast<dyn SequenceFlowTypeMut> for Operation {}
impl Cast<dyn ServiceTaskType> for Operation {}
impl Cast<dyn ServiceTaskTypeMut> for Operation {}
impl Cast<dyn SignalType> for Operation {}
impl Cast<dyn SignalTypeMut> for Operation {}
impl Cast<dyn SignalEventDefinitionType> for Operation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Operation {}
impl Cast<dyn StandardLoopCharacteristicsType> for Operation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Operation {}
impl Cast<dyn StartEventType> for Operation {}
impl Cast<dyn StartEventTypeMut> for Operation {}
impl Cast<dyn SubChoreographyType> for Operation {}
impl Cast<dyn SubChoreographyTypeMut> for Operation {}
impl Cast<dyn SubConversationType> for Operation {}
impl Cast<dyn SubConversationTypeMut> for Operation {}
impl Cast<dyn SubProcessType> for Operation {}
impl Cast<dyn SubProcessTypeMut> for Operation {}
impl Cast<dyn TaskType> for Operation {}
impl Cast<dyn TaskTypeMut> for Operation {}
impl Cast<dyn TerminateEventDefinitionType> for Operation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Operation {}
impl Cast<dyn TextAnnotationType> for Operation {}
impl Cast<dyn TextAnnotationTypeMut> for Operation {}
impl Cast<dyn TextType> for Operation {}
impl Cast<dyn TextTypeMut> for Operation {}
impl Cast<dyn ThrowEventType> for Operation {}
impl Cast<dyn ThrowEventTypeMut> for Operation {}
impl Cast<dyn TimerEventDefinitionType> for Operation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Operation {}
impl Cast<dyn TransactionType> for Operation {}
impl Cast<dyn TransactionTypeMut> for Operation {}
impl Cast<dyn UserTaskType> for Operation {}
impl Cast<dyn UserTaskTypeMut> for Operation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:outputSet")]
pub struct OutputSet {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("OutputSetType",rg*="name","OutputSetTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:dataOutputRefs")]
    #[tia("OutputSetType",rg*="data_output_refses","OutputSetTypeMut",s,rmg*="data_output_refses_mut")]
    pub data_output_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:optionalOutputRefs")]
    #[tia("OutputSetType",rg*="optional_output_refses","OutputSetTypeMut",s,rmg*="optional_output_refses_mut")]
    pub optional_output_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:whileExecutingOutputRefs")]
    #[tia("OutputSetType",rg*="while_executing_output_refses","OutputSetTypeMut",s,rmg*="while_executing_output_refses_mut")]
    pub while_executing_output_refses: Vec<String>,
    #[xml(flatten_text = "bpmn:inputSetRefs")]
    #[tia("OutputSetType",rg*="input_set_refses","OutputSetTypeMut",s,rmg*="input_set_refses_mut")]
    pub input_set_refses: Vec<String>,
}
impl DocumentElement for OutputSet {
    fn element(&self) -> Element {
        Element::OutputSet
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for OutputSet {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `outputSet`
pub trait OutputSetType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `dataOutputRefs` child
    fn data_output_refses(&self) -> &Vec<String>;
    /// Get value of `optionalOutputRefs` child
    fn optional_output_refses(&self) -> &Vec<String>;
    /// Get value of `whileExecutingOutputRefs` child
    fn while_executing_output_refses(&self) -> &Vec<String>;
    /// Get value of `inputSetRefs` child
    fn input_set_refses(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(OutputSetType);
impl_downcast!(OutputSetType);
/// Mutable access to `outputSet`
pub trait OutputSetTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + OutputSetType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `dataOutputRefs` child
    fn data_output_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `dataOutputRefs` child
    fn set_data_output_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `optionalOutputRefs` child
    fn optional_output_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `optionalOutputRefs` child
    fn set_optional_output_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `whileExecutingOutputRefs` child
    fn while_executing_output_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `whileExecutingOutputRefs` child
    fn set_while_executing_output_refses(&mut self, value: Vec<String>);
    /// Get a mutable value of `inputSetRefs` child
    fn input_set_refses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `inputSetRefs` child
    fn set_input_set_refses(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(OutputSetTypeMut);
impl_downcast!(OutputSetTypeMut);
impl Cast<dyn DefinitionsType> for OutputSet {}
impl Cast<dyn DefinitionsTypeMut> for OutputSet {}
impl Cast<dyn ImportType> for OutputSet {}
impl Cast<dyn ImportTypeMut> for OutputSet {}
impl Cast<dyn ActivityType> for OutputSet {}
impl Cast<dyn ActivityTypeMut> for OutputSet {}
impl Cast<dyn AdHocSubProcessType> for OutputSet {}
impl Cast<dyn AdHocSubProcessTypeMut> for OutputSet {}
impl Cast<dyn ArtifactType> for OutputSet {}
impl Cast<dyn ArtifactTypeMut> for OutputSet {}
impl Cast<dyn AssignmentType> for OutputSet {}
impl Cast<dyn AssignmentTypeMut> for OutputSet {}
impl Cast<dyn AssociationType> for OutputSet {}
impl Cast<dyn AssociationTypeMut> for OutputSet {}
impl Cast<dyn AuditingType> for OutputSet {}
impl Cast<dyn AuditingTypeMut> for OutputSet {}
impl Cast<dyn BaseElementType> for OutputSet {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for OutputSet {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for OutputSet {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for OutputSet {}
impl Cast<dyn BoundaryEventType> for OutputSet {}
impl Cast<dyn BoundaryEventTypeMut> for OutputSet {}
impl Cast<dyn BusinessRuleTaskType> for OutputSet {}
impl Cast<dyn BusinessRuleTaskTypeMut> for OutputSet {}
impl Cast<dyn CallableElementType> for OutputSet {}
impl Cast<dyn CallableElementTypeMut> for OutputSet {}
impl Cast<dyn CallActivityType> for OutputSet {}
impl Cast<dyn CallActivityTypeMut> for OutputSet {}
impl Cast<dyn CallChoreographyType> for OutputSet {}
impl Cast<dyn CallChoreographyTypeMut> for OutputSet {}
impl Cast<dyn CallConversationType> for OutputSet {}
impl Cast<dyn CallConversationTypeMut> for OutputSet {}
impl Cast<dyn CancelEventDefinitionType> for OutputSet {}
impl Cast<dyn CancelEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn CatchEventType> for OutputSet {}
impl Cast<dyn CatchEventTypeMut> for OutputSet {}
impl Cast<dyn CategoryType> for OutputSet {}
impl Cast<dyn CategoryTypeMut> for OutputSet {}
impl Cast<dyn CategoryValueType> for OutputSet {}
impl Cast<dyn CategoryValueTypeMut> for OutputSet {}
impl Cast<dyn ChoreographyType> for OutputSet {}
impl Cast<dyn ChoreographyTypeMut> for OutputSet {}
impl Cast<dyn ChoreographyActivityType> for OutputSet {}
impl Cast<dyn ChoreographyActivityTypeMut> for OutputSet {}
impl Cast<dyn ChoreographyTaskType> for OutputSet {}
impl Cast<dyn ChoreographyTaskTypeMut> for OutputSet {}
impl Cast<dyn CollaborationType> for OutputSet {}
impl Cast<dyn CollaborationTypeMut> for OutputSet {}
impl Cast<dyn CompensateEventDefinitionType> for OutputSet {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn ComplexBehaviorDefinitionType> for OutputSet {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for OutputSet {}
impl Cast<dyn ComplexGatewayType> for OutputSet {}
impl Cast<dyn ComplexGatewayTypeMut> for OutputSet {}
impl Cast<dyn ConditionalEventDefinitionType> for OutputSet {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn ConversationType> for OutputSet {}
impl Cast<dyn ConversationTypeMut> for OutputSet {}
impl Cast<dyn ConversationAssociationType> for OutputSet {}
impl Cast<dyn ConversationAssociationTypeMut> for OutputSet {}
impl Cast<dyn ConversationLinkType> for OutputSet {}
impl Cast<dyn ConversationLinkTypeMut> for OutputSet {}
impl Cast<dyn ConversationNodeType> for OutputSet {}
impl Cast<dyn ConversationNodeTypeMut> for OutputSet {}
impl Cast<dyn CorrelationKeyType> for OutputSet {}
impl Cast<dyn CorrelationKeyTypeMut> for OutputSet {}
impl Cast<dyn CorrelationPropertyType> for OutputSet {}
impl Cast<dyn CorrelationPropertyTypeMut> for OutputSet {}
impl Cast<dyn CorrelationPropertyBindingType> for OutputSet {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for OutputSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for OutputSet {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for OutputSet {}
impl Cast<dyn CorrelationSubscriptionType> for OutputSet {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for OutputSet {}
impl Cast<dyn DataAssociationType> for OutputSet {}
impl Cast<dyn DataAssociationTypeMut> for OutputSet {}
impl Cast<dyn DataInputType> for OutputSet {}
impl Cast<dyn DataInputTypeMut> for OutputSet {}
impl Cast<dyn DataInputAssociationType> for OutputSet {}
impl Cast<dyn DataInputAssociationTypeMut> for OutputSet {}
impl Cast<dyn DataObjectType> for OutputSet {}
impl Cast<dyn DataObjectTypeMut> for OutputSet {}
impl Cast<dyn DataObjectReferenceType> for OutputSet {}
impl Cast<dyn DataObjectReferenceTypeMut> for OutputSet {}
impl Cast<dyn DataOutputType> for OutputSet {}
impl Cast<dyn DataOutputTypeMut> for OutputSet {}
impl Cast<dyn DataOutputAssociationType> for OutputSet {}
impl Cast<dyn DataOutputAssociationTypeMut> for OutputSet {}
impl Cast<dyn DataStateType> for OutputSet {}
impl Cast<dyn DataStateTypeMut> for OutputSet {}
impl Cast<dyn DataStoreType> for OutputSet {}
impl Cast<dyn DataStoreTypeMut> for OutputSet {}
impl Cast<dyn DataStoreReferenceType> for OutputSet {}
impl Cast<dyn DataStoreReferenceTypeMut> for OutputSet {}
impl Cast<dyn DocumentationType> for OutputSet {}
impl Cast<dyn DocumentationTypeMut> for OutputSet {}
impl Cast<dyn EndEventType> for OutputSet {}
impl Cast<dyn EndEventTypeMut> for OutputSet {}
impl Cast<dyn EndPointType> for OutputSet {}
impl Cast<dyn EndPointTypeMut> for OutputSet {}
impl Cast<dyn ErrorType> for OutputSet {}
impl Cast<dyn ErrorTypeMut> for OutputSet {}
impl Cast<dyn ErrorEventDefinitionType> for OutputSet {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn EscalationType> for OutputSet {}
impl Cast<dyn EscalationTypeMut> for OutputSet {}
impl Cast<dyn EscalationEventDefinitionType> for OutputSet {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn EventType> for OutputSet {}
impl Cast<dyn EventTypeMut> for OutputSet {}
impl Cast<dyn EventBasedGatewayType> for OutputSet {}
impl Cast<dyn EventBasedGatewayTypeMut> for OutputSet {}
impl Cast<dyn EventDefinitionType> for OutputSet {}
impl Cast<dyn EventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn ExclusiveGatewayType> for OutputSet {}
impl Cast<dyn ExclusiveGatewayTypeMut> for OutputSet {}
impl Cast<dyn ExpressionType> for OutputSet {}
impl Cast<dyn ExpressionTypeMut> for OutputSet {}
impl Cast<dyn ExtensionType> for OutputSet {}
impl Cast<dyn ExtensionTypeMut> for OutputSet {}
impl Cast<dyn ExtensionElementsType> for OutputSet {}
impl Cast<dyn ExtensionElementsTypeMut> for OutputSet {}
impl Cast<dyn FlowElementType> for OutputSet {}
impl Cast<dyn FlowElementTypeMut> for OutputSet {}
impl Cast<dyn FlowNodeType> for OutputSet {}
impl Cast<dyn FlowNodeTypeMut> for OutputSet {}
impl Cast<dyn FormalExpressionType> for OutputSet {}
impl Cast<dyn FormalExpressionTypeMut> for OutputSet {}
impl Cast<dyn GatewayType> for OutputSet {}
impl Cast<dyn GatewayTypeMut> for OutputSet {}
impl Cast<dyn GlobalBusinessRuleTaskType> for OutputSet {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for OutputSet {}
impl Cast<dyn GlobalChoreographyTaskType> for OutputSet {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for OutputSet {}
impl Cast<dyn GlobalConversationType> for OutputSet {}
impl Cast<dyn GlobalConversationTypeMut> for OutputSet {}
impl Cast<dyn GlobalManualTaskType> for OutputSet {}
impl Cast<dyn GlobalManualTaskTypeMut> for OutputSet {}
impl Cast<dyn GlobalScriptTaskType> for OutputSet {}
impl Cast<dyn GlobalScriptTaskTypeMut> for OutputSet {}
impl Cast<dyn GlobalTaskType> for OutputSet {}
impl Cast<dyn GlobalTaskTypeMut> for OutputSet {}
impl Cast<dyn GlobalUserTaskType> for OutputSet {}
impl Cast<dyn GlobalUserTaskTypeMut> for OutputSet {}
impl Cast<dyn GroupType> for OutputSet {}
impl Cast<dyn GroupTypeMut> for OutputSet {}
impl Cast<dyn HumanPerformerType> for OutputSet {}
impl Cast<dyn HumanPerformerTypeMut> for OutputSet {}
impl Cast<dyn ImplicitThrowEventType> for OutputSet {}
impl Cast<dyn ImplicitThrowEventTypeMut> for OutputSet {}
impl Cast<dyn InclusiveGatewayType> for OutputSet {}
impl Cast<dyn InclusiveGatewayTypeMut> for OutputSet {}
impl Cast<dyn InputSetType> for OutputSet {}
impl Cast<dyn InputSetTypeMut> for OutputSet {}
impl Cast<dyn InterfaceType> for OutputSet {}
impl Cast<dyn InterfaceTypeMut> for OutputSet {}
impl Cast<dyn IntermediateCatchEventType> for OutputSet {}
impl Cast<dyn IntermediateCatchEventTypeMut> for OutputSet {}
impl Cast<dyn IntermediateThrowEventType> for OutputSet {}
impl Cast<dyn IntermediateThrowEventTypeMut> for OutputSet {}
impl Cast<dyn InputOutputBindingType> for OutputSet {}
impl Cast<dyn InputOutputBindingTypeMut> for OutputSet {}
impl Cast<dyn InputOutputSpecificationType> for OutputSet {}
impl Cast<dyn InputOutputSpecificationTypeMut> for OutputSet {}
impl Cast<dyn ItemDefinitionType> for OutputSet {}
impl Cast<dyn ItemDefinitionTypeMut> for OutputSet {}
impl Cast<dyn LaneType> for OutputSet {}
impl Cast<dyn LaneTypeMut> for OutputSet {}
impl Cast<dyn LaneSetType> for OutputSet {}
impl Cast<dyn LaneSetTypeMut> for OutputSet {}
impl Cast<dyn LinkEventDefinitionType> for OutputSet {}
impl Cast<dyn LinkEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn LoopCharacteristicsType> for OutputSet {}
impl Cast<dyn LoopCharacteristicsTypeMut> for OutputSet {}
impl Cast<dyn ManualTaskType> for OutputSet {}
impl Cast<dyn ManualTaskTypeMut> for OutputSet {}
impl Cast<dyn MessageType> for OutputSet {}
impl Cast<dyn MessageTypeMut> for OutputSet {}
impl Cast<dyn MessageEventDefinitionType> for OutputSet {}
impl Cast<dyn MessageEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn MessageFlowType> for OutputSet {}
impl Cast<dyn MessageFlowTypeMut> for OutputSet {}
impl Cast<dyn MessageFlowAssociationType> for OutputSet {}
impl Cast<dyn MessageFlowAssociationTypeMut> for OutputSet {}
impl Cast<dyn MonitoringType> for OutputSet {}
impl Cast<dyn MonitoringTypeMut> for OutputSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for OutputSet {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for OutputSet {}
impl Cast<dyn OperationType> for OutputSet {}
impl Cast<dyn OperationTypeMut> for OutputSet {}
impl Cast<dyn OutputSetType> for OutputSet {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn OutputSetTypeMut> for OutputSet {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParallelGatewayType> for OutputSet {}
impl Cast<dyn ParallelGatewayTypeMut> for OutputSet {}
impl Cast<dyn ParticipantType> for OutputSet {}
impl Cast<dyn ParticipantTypeMut> for OutputSet {}
impl Cast<dyn ParticipantAssociationType> for OutputSet {}
impl Cast<dyn ParticipantAssociationTypeMut> for OutputSet {}
impl Cast<dyn ParticipantMultiplicityType> for OutputSet {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for OutputSet {}
impl Cast<dyn PartnerEntityType> for OutputSet {}
impl Cast<dyn PartnerEntityTypeMut> for OutputSet {}
impl Cast<dyn PartnerRoleType> for OutputSet {}
impl Cast<dyn PartnerRoleTypeMut> for OutputSet {}
impl Cast<dyn PerformerType> for OutputSet {}
impl Cast<dyn PerformerTypeMut> for OutputSet {}
impl Cast<dyn PotentialOwnerType> for OutputSet {}
impl Cast<dyn PotentialOwnerTypeMut> for OutputSet {}
impl Cast<dyn ProcessType> for OutputSet {}
impl Cast<dyn ProcessTypeMut> for OutputSet {}
impl Cast<dyn PropertyType> for OutputSet {}
impl Cast<dyn PropertyTypeMut> for OutputSet {}
impl Cast<dyn ReceiveTaskType> for OutputSet {}
impl Cast<dyn ReceiveTaskTypeMut> for OutputSet {}
impl Cast<dyn RelationshipType> for OutputSet {}
impl Cast<dyn RelationshipTypeMut> for OutputSet {}
impl Cast<dyn RenderingType> for OutputSet {}
impl Cast<dyn RenderingTypeMut> for OutputSet {}
impl Cast<dyn ResourceType> for OutputSet {}
impl Cast<dyn ResourceTypeMut> for OutputSet {}
impl Cast<dyn ResourceAssignmentExpressionType> for OutputSet {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for OutputSet {}
impl Cast<dyn ResourceParameterType> for OutputSet {}
impl Cast<dyn ResourceParameterTypeMut> for OutputSet {}
impl Cast<dyn ResourceParameterBindingType> for OutputSet {}
impl Cast<dyn ResourceParameterBindingTypeMut> for OutputSet {}
impl Cast<dyn ResourceRoleType> for OutputSet {}
impl Cast<dyn ResourceRoleTypeMut> for OutputSet {}
impl Cast<dyn RootElementType> for OutputSet {}
impl Cast<dyn RootElementTypeMut> for OutputSet {}
impl Cast<dyn ScriptTaskType> for OutputSet {}
impl Cast<dyn ScriptTaskTypeMut> for OutputSet {}
impl Cast<dyn ScriptType> for OutputSet {}
impl Cast<dyn ScriptTypeMut> for OutputSet {}
impl Cast<dyn SendTaskType> for OutputSet {}
impl Cast<dyn SendTaskTypeMut> for OutputSet {}
impl Cast<dyn SequenceFlowType> for OutputSet {}
impl Cast<dyn SequenceFlowTypeMut> for OutputSet {}
impl Cast<dyn ServiceTaskType> for OutputSet {}
impl Cast<dyn ServiceTaskTypeMut> for OutputSet {}
impl Cast<dyn SignalType> for OutputSet {}
impl Cast<dyn SignalTypeMut> for OutputSet {}
impl Cast<dyn SignalEventDefinitionType> for OutputSet {}
impl Cast<dyn SignalEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn StandardLoopCharacteristicsType> for OutputSet {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for OutputSet {}
impl Cast<dyn StartEventType> for OutputSet {}
impl Cast<dyn StartEventTypeMut> for OutputSet {}
impl Cast<dyn SubChoreographyType> for OutputSet {}
impl Cast<dyn SubChoreographyTypeMut> for OutputSet {}
impl Cast<dyn SubConversationType> for OutputSet {}
impl Cast<dyn SubConversationTypeMut> for OutputSet {}
impl Cast<dyn SubProcessType> for OutputSet {}
impl Cast<dyn SubProcessTypeMut> for OutputSet {}
impl Cast<dyn TaskType> for OutputSet {}
impl Cast<dyn TaskTypeMut> for OutputSet {}
impl Cast<dyn TerminateEventDefinitionType> for OutputSet {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn TextAnnotationType> for OutputSet {}
impl Cast<dyn TextAnnotationTypeMut> for OutputSet {}
impl Cast<dyn TextType> for OutputSet {}
impl Cast<dyn TextTypeMut> for OutputSet {}
impl Cast<dyn ThrowEventType> for OutputSet {}
impl Cast<dyn ThrowEventTypeMut> for OutputSet {}
impl Cast<dyn TimerEventDefinitionType> for OutputSet {}
impl Cast<dyn TimerEventDefinitionTypeMut> for OutputSet {}
impl Cast<dyn TransactionType> for OutputSet {}
impl Cast<dyn TransactionTypeMut> for OutputSet {}
impl Cast<dyn UserTaskType> for OutputSet {}
impl Cast<dyn UserTaskTypeMut> for OutputSet {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:parallelGateway")]
pub struct ParallelGateway {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "gatewayDirection")]
    #[tia("GatewayType",rg*="gateway_direction","GatewayTypeMut",s)]
    pub gateway_direction: Option<String>,
}
impl DocumentElement for ParallelGateway {
    fn element(&self) -> Element {
        Element::ParallelGateway
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ParallelGateway {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl ParallelGatewayType for ParallelGateway {}
impl ParallelGatewayTypeMut for ParallelGateway {}
//

/// Access to `parallelGateway`
pub trait ParallelGatewayType: GatewayType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ParallelGatewayType);
impl_downcast!(ParallelGatewayType);
/// Mutable access to `parallelGateway`
pub trait ParallelGatewayTypeMut:
    GatewayTypeMut + Downcast + Debug + Send + DynClone + ParallelGatewayType
{
}
dyn_clone::clone_trait_object!(ParallelGatewayTypeMut);
impl_downcast!(ParallelGatewayTypeMut);
impl Cast<dyn DefinitionsType> for ParallelGateway {}
impl Cast<dyn DefinitionsTypeMut> for ParallelGateway {}
impl Cast<dyn ImportType> for ParallelGateway {}
impl Cast<dyn ImportTypeMut> for ParallelGateway {}
impl Cast<dyn ActivityType> for ParallelGateway {}
impl Cast<dyn ActivityTypeMut> for ParallelGateway {}
impl Cast<dyn AdHocSubProcessType> for ParallelGateway {}
impl Cast<dyn AdHocSubProcessTypeMut> for ParallelGateway {}
impl Cast<dyn ArtifactType> for ParallelGateway {}
impl Cast<dyn ArtifactTypeMut> for ParallelGateway {}
impl Cast<dyn AssignmentType> for ParallelGateway {}
impl Cast<dyn AssignmentTypeMut> for ParallelGateway {}
impl Cast<dyn AssociationType> for ParallelGateway {}
impl Cast<dyn AssociationTypeMut> for ParallelGateway {}
impl Cast<dyn AuditingType> for ParallelGateway {}
impl Cast<dyn AuditingTypeMut> for ParallelGateway {}
impl Cast<dyn BaseElementType> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ParallelGateway {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ParallelGateway {}
impl Cast<dyn BoundaryEventType> for ParallelGateway {}
impl Cast<dyn BoundaryEventTypeMut> for ParallelGateway {}
impl Cast<dyn BusinessRuleTaskType> for ParallelGateway {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ParallelGateway {}
impl Cast<dyn CallableElementType> for ParallelGateway {}
impl Cast<dyn CallableElementTypeMut> for ParallelGateway {}
impl Cast<dyn CallActivityType> for ParallelGateway {}
impl Cast<dyn CallActivityTypeMut> for ParallelGateway {}
impl Cast<dyn CallChoreographyType> for ParallelGateway {}
impl Cast<dyn CallChoreographyTypeMut> for ParallelGateway {}
impl Cast<dyn CallConversationType> for ParallelGateway {}
impl Cast<dyn CallConversationTypeMut> for ParallelGateway {}
impl Cast<dyn CancelEventDefinitionType> for ParallelGateway {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn CatchEventType> for ParallelGateway {}
impl Cast<dyn CatchEventTypeMut> for ParallelGateway {}
impl Cast<dyn CategoryType> for ParallelGateway {}
impl Cast<dyn CategoryTypeMut> for ParallelGateway {}
impl Cast<dyn CategoryValueType> for ParallelGateway {}
impl Cast<dyn CategoryValueTypeMut> for ParallelGateway {}
impl Cast<dyn ChoreographyType> for ParallelGateway {}
impl Cast<dyn ChoreographyTypeMut> for ParallelGateway {}
impl Cast<dyn ChoreographyActivityType> for ParallelGateway {}
impl Cast<dyn ChoreographyActivityTypeMut> for ParallelGateway {}
impl Cast<dyn ChoreographyTaskType> for ParallelGateway {}
impl Cast<dyn ChoreographyTaskTypeMut> for ParallelGateway {}
impl Cast<dyn CollaborationType> for ParallelGateway {}
impl Cast<dyn CollaborationTypeMut> for ParallelGateway {}
impl Cast<dyn CompensateEventDefinitionType> for ParallelGateway {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ParallelGateway {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn ComplexGatewayType> for ParallelGateway {}
impl Cast<dyn ComplexGatewayTypeMut> for ParallelGateway {}
impl Cast<dyn ConditionalEventDefinitionType> for ParallelGateway {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn ConversationType> for ParallelGateway {}
impl Cast<dyn ConversationTypeMut> for ParallelGateway {}
impl Cast<dyn ConversationAssociationType> for ParallelGateway {}
impl Cast<dyn ConversationAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn ConversationLinkType> for ParallelGateway {}
impl Cast<dyn ConversationLinkTypeMut> for ParallelGateway {}
impl Cast<dyn ConversationNodeType> for ParallelGateway {}
impl Cast<dyn ConversationNodeTypeMut> for ParallelGateway {}
impl Cast<dyn CorrelationKeyType> for ParallelGateway {}
impl Cast<dyn CorrelationKeyTypeMut> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyType> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyTypeMut> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyBindingType> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ParallelGateway {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ParallelGateway {}
impl Cast<dyn CorrelationSubscriptionType> for ParallelGateway {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ParallelGateway {}
impl Cast<dyn DataAssociationType> for ParallelGateway {}
impl Cast<dyn DataAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn DataInputType> for ParallelGateway {}
impl Cast<dyn DataInputTypeMut> for ParallelGateway {}
impl Cast<dyn DataInputAssociationType> for ParallelGateway {}
impl Cast<dyn DataInputAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn DataObjectType> for ParallelGateway {}
impl Cast<dyn DataObjectTypeMut> for ParallelGateway {}
impl Cast<dyn DataObjectReferenceType> for ParallelGateway {}
impl Cast<dyn DataObjectReferenceTypeMut> for ParallelGateway {}
impl Cast<dyn DataOutputType> for ParallelGateway {}
impl Cast<dyn DataOutputTypeMut> for ParallelGateway {}
impl Cast<dyn DataOutputAssociationType> for ParallelGateway {}
impl Cast<dyn DataOutputAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn DataStateType> for ParallelGateway {}
impl Cast<dyn DataStateTypeMut> for ParallelGateway {}
impl Cast<dyn DataStoreType> for ParallelGateway {}
impl Cast<dyn DataStoreTypeMut> for ParallelGateway {}
impl Cast<dyn DataStoreReferenceType> for ParallelGateway {}
impl Cast<dyn DataStoreReferenceTypeMut> for ParallelGateway {}
impl Cast<dyn DocumentationType> for ParallelGateway {}
impl Cast<dyn DocumentationTypeMut> for ParallelGateway {}
impl Cast<dyn EndEventType> for ParallelGateway {}
impl Cast<dyn EndEventTypeMut> for ParallelGateway {}
impl Cast<dyn EndPointType> for ParallelGateway {}
impl Cast<dyn EndPointTypeMut> for ParallelGateway {}
impl Cast<dyn ErrorType> for ParallelGateway {}
impl Cast<dyn ErrorTypeMut> for ParallelGateway {}
impl Cast<dyn ErrorEventDefinitionType> for ParallelGateway {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn EscalationType> for ParallelGateway {}
impl Cast<dyn EscalationTypeMut> for ParallelGateway {}
impl Cast<dyn EscalationEventDefinitionType> for ParallelGateway {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn EventType> for ParallelGateway {}
impl Cast<dyn EventTypeMut> for ParallelGateway {}
impl Cast<dyn EventBasedGatewayType> for ParallelGateway {}
impl Cast<dyn EventBasedGatewayTypeMut> for ParallelGateway {}
impl Cast<dyn EventDefinitionType> for ParallelGateway {}
impl Cast<dyn EventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn ExclusiveGatewayType> for ParallelGateway {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ParallelGateway {}
impl Cast<dyn ExpressionType> for ParallelGateway {}
impl Cast<dyn ExpressionTypeMut> for ParallelGateway {}
impl Cast<dyn ExtensionType> for ParallelGateway {}
impl Cast<dyn ExtensionTypeMut> for ParallelGateway {}
impl Cast<dyn ExtensionElementsType> for ParallelGateway {}
impl Cast<dyn ExtensionElementsTypeMut> for ParallelGateway {}
impl Cast<dyn FlowElementType> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ParallelGateway {}
impl Cast<dyn FormalExpressionTypeMut> for ParallelGateway {}
impl Cast<dyn GatewayType> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GatewayTypeMut> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for ParallelGateway {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalChoreographyTaskType> for ParallelGateway {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalConversationType> for ParallelGateway {}
impl Cast<dyn GlobalConversationTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalManualTaskType> for ParallelGateway {}
impl Cast<dyn GlobalManualTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalScriptTaskType> for ParallelGateway {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalTaskType> for ParallelGateway {}
impl Cast<dyn GlobalTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GlobalUserTaskType> for ParallelGateway {}
impl Cast<dyn GlobalUserTaskTypeMut> for ParallelGateway {}
impl Cast<dyn GroupType> for ParallelGateway {}
impl Cast<dyn GroupTypeMut> for ParallelGateway {}
impl Cast<dyn HumanPerformerType> for ParallelGateway {}
impl Cast<dyn HumanPerformerTypeMut> for ParallelGateway {}
impl Cast<dyn ImplicitThrowEventType> for ParallelGateway {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ParallelGateway {}
impl Cast<dyn InclusiveGatewayType> for ParallelGateway {}
impl Cast<dyn InclusiveGatewayTypeMut> for ParallelGateway {}
impl Cast<dyn InputSetType> for ParallelGateway {}
impl Cast<dyn InputSetTypeMut> for ParallelGateway {}
impl Cast<dyn InterfaceType> for ParallelGateway {}
impl Cast<dyn InterfaceTypeMut> for ParallelGateway {}
impl Cast<dyn IntermediateCatchEventType> for ParallelGateway {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ParallelGateway {}
impl Cast<dyn IntermediateThrowEventType> for ParallelGateway {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ParallelGateway {}
impl Cast<dyn InputOutputBindingType> for ParallelGateway {}
impl Cast<dyn InputOutputBindingTypeMut> for ParallelGateway {}
impl Cast<dyn InputOutputSpecificationType> for ParallelGateway {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ParallelGateway {}
impl Cast<dyn ItemDefinitionType> for ParallelGateway {}
impl Cast<dyn ItemDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn LaneType> for ParallelGateway {}
impl Cast<dyn LaneTypeMut> for ParallelGateway {}
impl Cast<dyn LaneSetType> for ParallelGateway {}
impl Cast<dyn LaneSetTypeMut> for ParallelGateway {}
impl Cast<dyn LinkEventDefinitionType> for ParallelGateway {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn LoopCharacteristicsType> for ParallelGateway {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ParallelGateway {}
impl Cast<dyn ManualTaskType> for ParallelGateway {}
impl Cast<dyn ManualTaskTypeMut> for ParallelGateway {}
impl Cast<dyn MessageType> for ParallelGateway {}
impl Cast<dyn MessageTypeMut> for ParallelGateway {}
impl Cast<dyn MessageEventDefinitionType> for ParallelGateway {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn MessageFlowType> for ParallelGateway {}
impl Cast<dyn MessageFlowTypeMut> for ParallelGateway {}
impl Cast<dyn MessageFlowAssociationType> for ParallelGateway {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn MonitoringType> for ParallelGateway {}
impl Cast<dyn MonitoringTypeMut> for ParallelGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ParallelGateway {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ParallelGateway {}
impl Cast<dyn OperationType> for ParallelGateway {}
impl Cast<dyn OperationTypeMut> for ParallelGateway {}
impl Cast<dyn OutputSetType> for ParallelGateway {}
impl Cast<dyn OutputSetTypeMut> for ParallelGateway {}
impl Cast<dyn ParallelGatewayType> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for ParallelGateway {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantType> for ParallelGateway {}
impl Cast<dyn ParticipantTypeMut> for ParallelGateway {}
impl Cast<dyn ParticipantAssociationType> for ParallelGateway {}
impl Cast<dyn ParticipantAssociationTypeMut> for ParallelGateway {}
impl Cast<dyn ParticipantMultiplicityType> for ParallelGateway {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ParallelGateway {}
impl Cast<dyn PartnerEntityType> for ParallelGateway {}
impl Cast<dyn PartnerEntityTypeMut> for ParallelGateway {}
impl Cast<dyn PartnerRoleType> for ParallelGateway {}
impl Cast<dyn PartnerRoleTypeMut> for ParallelGateway {}
impl Cast<dyn PerformerType> for ParallelGateway {}
impl Cast<dyn PerformerTypeMut> for ParallelGateway {}
impl Cast<dyn PotentialOwnerType> for ParallelGateway {}
impl Cast<dyn PotentialOwnerTypeMut> for ParallelGateway {}
impl Cast<dyn ProcessType> for ParallelGateway {}
impl Cast<dyn ProcessTypeMut> for ParallelGateway {}
impl Cast<dyn PropertyType> for ParallelGateway {}
impl Cast<dyn PropertyTypeMut> for ParallelGateway {}
impl Cast<dyn ReceiveTaskType> for ParallelGateway {}
impl Cast<dyn ReceiveTaskTypeMut> for ParallelGateway {}
impl Cast<dyn RelationshipType> for ParallelGateway {}
impl Cast<dyn RelationshipTypeMut> for ParallelGateway {}
impl Cast<dyn RenderingType> for ParallelGateway {}
impl Cast<dyn RenderingTypeMut> for ParallelGateway {}
impl Cast<dyn ResourceType> for ParallelGateway {}
impl Cast<dyn ResourceTypeMut> for ParallelGateway {}
impl Cast<dyn ResourceAssignmentExpressionType> for ParallelGateway {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ParallelGateway {}
impl Cast<dyn ResourceParameterType> for ParallelGateway {}
impl Cast<dyn ResourceParameterTypeMut> for ParallelGateway {}
impl Cast<dyn ResourceParameterBindingType> for ParallelGateway {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ParallelGateway {}
impl Cast<dyn ResourceRoleType> for ParallelGateway {}
impl Cast<dyn ResourceRoleTypeMut> for ParallelGateway {}
impl Cast<dyn RootElementType> for ParallelGateway {}
impl Cast<dyn RootElementTypeMut> for ParallelGateway {}
impl Cast<dyn ScriptTaskType> for ParallelGateway {}
impl Cast<dyn ScriptTaskTypeMut> for ParallelGateway {}
impl Cast<dyn ScriptType> for ParallelGateway {}
impl Cast<dyn ScriptTypeMut> for ParallelGateway {}
impl Cast<dyn SendTaskType> for ParallelGateway {}
impl Cast<dyn SendTaskTypeMut> for ParallelGateway {}
impl Cast<dyn SequenceFlowType> for ParallelGateway {}
impl Cast<dyn SequenceFlowTypeMut> for ParallelGateway {}
impl Cast<dyn ServiceTaskType> for ParallelGateway {}
impl Cast<dyn ServiceTaskTypeMut> for ParallelGateway {}
impl Cast<dyn SignalType> for ParallelGateway {}
impl Cast<dyn SignalTypeMut> for ParallelGateway {}
impl Cast<dyn SignalEventDefinitionType> for ParallelGateway {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn StandardLoopCharacteristicsType> for ParallelGateway {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ParallelGateway {}
impl Cast<dyn StartEventType> for ParallelGateway {}
impl Cast<dyn StartEventTypeMut> for ParallelGateway {}
impl Cast<dyn SubChoreographyType> for ParallelGateway {}
impl Cast<dyn SubChoreographyTypeMut> for ParallelGateway {}
impl Cast<dyn SubConversationType> for ParallelGateway {}
impl Cast<dyn SubConversationTypeMut> for ParallelGateway {}
impl Cast<dyn SubProcessType> for ParallelGateway {}
impl Cast<dyn SubProcessTypeMut> for ParallelGateway {}
impl Cast<dyn TaskType> for ParallelGateway {}
impl Cast<dyn TaskTypeMut> for ParallelGateway {}
impl Cast<dyn TerminateEventDefinitionType> for ParallelGateway {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn TextAnnotationType> for ParallelGateway {}
impl Cast<dyn TextAnnotationTypeMut> for ParallelGateway {}
impl Cast<dyn TextType> for ParallelGateway {}
impl Cast<dyn TextTypeMut> for ParallelGateway {}
impl Cast<dyn ThrowEventType> for ParallelGateway {}
impl Cast<dyn ThrowEventTypeMut> for ParallelGateway {}
impl Cast<dyn TimerEventDefinitionType> for ParallelGateway {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ParallelGateway {}
impl Cast<dyn TransactionType> for ParallelGateway {}
impl Cast<dyn TransactionTypeMut> for ParallelGateway {}
impl Cast<dyn UserTaskType> for ParallelGateway {}
impl Cast<dyn UserTaskTypeMut> for ParallelGateway {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:participant")]
pub struct Participant {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ParticipantType",rg*="name","ParticipantTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "processRef")]
    #[tia("ParticipantType",rg*="process_ref","ParticipantTypeMut",s)]
    pub process_ref: Option<String>,
    #[xml(flatten_text = "bpmn:interfaceRef")]
    #[tia("ParticipantType",rg*="interface_refs","ParticipantTypeMut",s,rmg*="interface_refs_mut")]
    pub interface_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:endPointRef")]
    #[tia("ParticipantType",rg*="end_point_refs","ParticipantTypeMut",s,rmg*="end_point_refs_mut")]
    pub end_point_refs: Vec<String>,
    #[xml(child = "bpmn:participantMultiplicity")]
    #[tia("ParticipantType",rg*="participant_multiplicity","ParticipantTypeMut",s,rmg*="participant_multiplicity_mut")]
    pub participant_multiplicity: Option<ParticipantMultiplicity>,
}
impl DocumentElement for Participant {
    fn element(&self) -> Element {
        Element::Participant
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Participant {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_multiplicity.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.participant_multiplicity.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `participant`
pub trait ParticipantType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `processRef`
    fn process_ref(&self) -> &Option<String>;
    /// Get value of `interfaceRef` child
    fn interface_refs(&self) -> &Vec<String>;
    /// Get value of `endPointRef` child
    fn end_point_refs(&self) -> &Vec<String>;
    /// Get value of `participantMultiplicity` child
    fn participant_multiplicity(&self) -> &Option<ParticipantMultiplicity>;
}
dyn_clone::clone_trait_object!(ParticipantType);
impl_downcast!(ParticipantType);
/// Mutable access to `participant`
pub trait ParticipantTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ParticipantType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `processRef`
    fn set_process_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `interfaceRef` child
    fn interface_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `interfaceRef` child
    fn set_interface_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `endPointRef` child
    fn end_point_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `endPointRef` child
    fn set_end_point_refs(&mut self, value: Vec<String>);
    /// Get a mutable value of `participantMultiplicity` child
    fn participant_multiplicity_mut(&mut self) -> &mut Option<ParticipantMultiplicity>;
    /// Set value of `participantMultiplicity` child
    fn set_participant_multiplicity(&mut self, value: Option<ParticipantMultiplicity>);
}
dyn_clone::clone_trait_object!(ParticipantTypeMut);
impl_downcast!(ParticipantTypeMut);
impl Cast<dyn DefinitionsType> for Participant {}
impl Cast<dyn DefinitionsTypeMut> for Participant {}
impl Cast<dyn ImportType> for Participant {}
impl Cast<dyn ImportTypeMut> for Participant {}
impl Cast<dyn ActivityType> for Participant {}
impl Cast<dyn ActivityTypeMut> for Participant {}
impl Cast<dyn AdHocSubProcessType> for Participant {}
impl Cast<dyn AdHocSubProcessTypeMut> for Participant {}
impl Cast<dyn ArtifactType> for Participant {}
impl Cast<dyn ArtifactTypeMut> for Participant {}
impl Cast<dyn AssignmentType> for Participant {}
impl Cast<dyn AssignmentTypeMut> for Participant {}
impl Cast<dyn AssociationType> for Participant {}
impl Cast<dyn AssociationTypeMut> for Participant {}
impl Cast<dyn AuditingType> for Participant {}
impl Cast<dyn AuditingTypeMut> for Participant {}
impl Cast<dyn BaseElementType> for Participant {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Participant {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Participant {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Participant {}
impl Cast<dyn BoundaryEventType> for Participant {}
impl Cast<dyn BoundaryEventTypeMut> for Participant {}
impl Cast<dyn BusinessRuleTaskType> for Participant {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Participant {}
impl Cast<dyn CallableElementType> for Participant {}
impl Cast<dyn CallableElementTypeMut> for Participant {}
impl Cast<dyn CallActivityType> for Participant {}
impl Cast<dyn CallActivityTypeMut> for Participant {}
impl Cast<dyn CallChoreographyType> for Participant {}
impl Cast<dyn CallChoreographyTypeMut> for Participant {}
impl Cast<dyn CallConversationType> for Participant {}
impl Cast<dyn CallConversationTypeMut> for Participant {}
impl Cast<dyn CancelEventDefinitionType> for Participant {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Participant {}
impl Cast<dyn CatchEventType> for Participant {}
impl Cast<dyn CatchEventTypeMut> for Participant {}
impl Cast<dyn CategoryType> for Participant {}
impl Cast<dyn CategoryTypeMut> for Participant {}
impl Cast<dyn CategoryValueType> for Participant {}
impl Cast<dyn CategoryValueTypeMut> for Participant {}
impl Cast<dyn ChoreographyType> for Participant {}
impl Cast<dyn ChoreographyTypeMut> for Participant {}
impl Cast<dyn ChoreographyActivityType> for Participant {}
impl Cast<dyn ChoreographyActivityTypeMut> for Participant {}
impl Cast<dyn ChoreographyTaskType> for Participant {}
impl Cast<dyn ChoreographyTaskTypeMut> for Participant {}
impl Cast<dyn CollaborationType> for Participant {}
impl Cast<dyn CollaborationTypeMut> for Participant {}
impl Cast<dyn CompensateEventDefinitionType> for Participant {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Participant {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Participant {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Participant {}
impl Cast<dyn ComplexGatewayType> for Participant {}
impl Cast<dyn ComplexGatewayTypeMut> for Participant {}
impl Cast<dyn ConditionalEventDefinitionType> for Participant {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Participant {}
impl Cast<dyn ConversationType> for Participant {}
impl Cast<dyn ConversationTypeMut> for Participant {}
impl Cast<dyn ConversationAssociationType> for Participant {}
impl Cast<dyn ConversationAssociationTypeMut> for Participant {}
impl Cast<dyn ConversationLinkType> for Participant {}
impl Cast<dyn ConversationLinkTypeMut> for Participant {}
impl Cast<dyn ConversationNodeType> for Participant {}
impl Cast<dyn ConversationNodeTypeMut> for Participant {}
impl Cast<dyn CorrelationKeyType> for Participant {}
impl Cast<dyn CorrelationKeyTypeMut> for Participant {}
impl Cast<dyn CorrelationPropertyType> for Participant {}
impl Cast<dyn CorrelationPropertyTypeMut> for Participant {}
impl Cast<dyn CorrelationPropertyBindingType> for Participant {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Participant {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Participant {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Participant {}
impl Cast<dyn CorrelationSubscriptionType> for Participant {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Participant {}
impl Cast<dyn DataAssociationType> for Participant {}
impl Cast<dyn DataAssociationTypeMut> for Participant {}
impl Cast<dyn DataInputType> for Participant {}
impl Cast<dyn DataInputTypeMut> for Participant {}
impl Cast<dyn DataInputAssociationType> for Participant {}
impl Cast<dyn DataInputAssociationTypeMut> for Participant {}
impl Cast<dyn DataObjectType> for Participant {}
impl Cast<dyn DataObjectTypeMut> for Participant {}
impl Cast<dyn DataObjectReferenceType> for Participant {}
impl Cast<dyn DataObjectReferenceTypeMut> for Participant {}
impl Cast<dyn DataOutputType> for Participant {}
impl Cast<dyn DataOutputTypeMut> for Participant {}
impl Cast<dyn DataOutputAssociationType> for Participant {}
impl Cast<dyn DataOutputAssociationTypeMut> for Participant {}
impl Cast<dyn DataStateType> for Participant {}
impl Cast<dyn DataStateTypeMut> for Participant {}
impl Cast<dyn DataStoreType> for Participant {}
impl Cast<dyn DataStoreTypeMut> for Participant {}
impl Cast<dyn DataStoreReferenceType> for Participant {}
impl Cast<dyn DataStoreReferenceTypeMut> for Participant {}
impl Cast<dyn DocumentationType> for Participant {}
impl Cast<dyn DocumentationTypeMut> for Participant {}
impl Cast<dyn EndEventType> for Participant {}
impl Cast<dyn EndEventTypeMut> for Participant {}
impl Cast<dyn EndPointType> for Participant {}
impl Cast<dyn EndPointTypeMut> for Participant {}
impl Cast<dyn ErrorType> for Participant {}
impl Cast<dyn ErrorTypeMut> for Participant {}
impl Cast<dyn ErrorEventDefinitionType> for Participant {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Participant {}
impl Cast<dyn EscalationType> for Participant {}
impl Cast<dyn EscalationTypeMut> for Participant {}
impl Cast<dyn EscalationEventDefinitionType> for Participant {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Participant {}
impl Cast<dyn EventType> for Participant {}
impl Cast<dyn EventTypeMut> for Participant {}
impl Cast<dyn EventBasedGatewayType> for Participant {}
impl Cast<dyn EventBasedGatewayTypeMut> for Participant {}
impl Cast<dyn EventDefinitionType> for Participant {}
impl Cast<dyn EventDefinitionTypeMut> for Participant {}
impl Cast<dyn ExclusiveGatewayType> for Participant {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Participant {}
impl Cast<dyn ExpressionType> for Participant {}
impl Cast<dyn ExpressionTypeMut> for Participant {}
impl Cast<dyn ExtensionType> for Participant {}
impl Cast<dyn ExtensionTypeMut> for Participant {}
impl Cast<dyn ExtensionElementsType> for Participant {}
impl Cast<dyn ExtensionElementsTypeMut> for Participant {}
impl Cast<dyn FlowElementType> for Participant {}
impl Cast<dyn FlowElementTypeMut> for Participant {}
impl Cast<dyn FlowNodeType> for Participant {}
impl Cast<dyn FlowNodeTypeMut> for Participant {}
impl Cast<dyn FormalExpressionType> for Participant {}
impl Cast<dyn FormalExpressionTypeMut> for Participant {}
impl Cast<dyn GatewayType> for Participant {}
impl Cast<dyn GatewayTypeMut> for Participant {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Participant {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Participant {}
impl Cast<dyn GlobalChoreographyTaskType> for Participant {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Participant {}
impl Cast<dyn GlobalConversationType> for Participant {}
impl Cast<dyn GlobalConversationTypeMut> for Participant {}
impl Cast<dyn GlobalManualTaskType> for Participant {}
impl Cast<dyn GlobalManualTaskTypeMut> for Participant {}
impl Cast<dyn GlobalScriptTaskType> for Participant {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Participant {}
impl Cast<dyn GlobalTaskType> for Participant {}
impl Cast<dyn GlobalTaskTypeMut> for Participant {}
impl Cast<dyn GlobalUserTaskType> for Participant {}
impl Cast<dyn GlobalUserTaskTypeMut> for Participant {}
impl Cast<dyn GroupType> for Participant {}
impl Cast<dyn GroupTypeMut> for Participant {}
impl Cast<dyn HumanPerformerType> for Participant {}
impl Cast<dyn HumanPerformerTypeMut> for Participant {}
impl Cast<dyn ImplicitThrowEventType> for Participant {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Participant {}
impl Cast<dyn InclusiveGatewayType> for Participant {}
impl Cast<dyn InclusiveGatewayTypeMut> for Participant {}
impl Cast<dyn InputSetType> for Participant {}
impl Cast<dyn InputSetTypeMut> for Participant {}
impl Cast<dyn InterfaceType> for Participant {}
impl Cast<dyn InterfaceTypeMut> for Participant {}
impl Cast<dyn IntermediateCatchEventType> for Participant {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Participant {}
impl Cast<dyn IntermediateThrowEventType> for Participant {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Participant {}
impl Cast<dyn InputOutputBindingType> for Participant {}
impl Cast<dyn InputOutputBindingTypeMut> for Participant {}
impl Cast<dyn InputOutputSpecificationType> for Participant {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Participant {}
impl Cast<dyn ItemDefinitionType> for Participant {}
impl Cast<dyn ItemDefinitionTypeMut> for Participant {}
impl Cast<dyn LaneType> for Participant {}
impl Cast<dyn LaneTypeMut> for Participant {}
impl Cast<dyn LaneSetType> for Participant {}
impl Cast<dyn LaneSetTypeMut> for Participant {}
impl Cast<dyn LinkEventDefinitionType> for Participant {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Participant {}
impl Cast<dyn LoopCharacteristicsType> for Participant {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Participant {}
impl Cast<dyn ManualTaskType> for Participant {}
impl Cast<dyn ManualTaskTypeMut> for Participant {}
impl Cast<dyn MessageType> for Participant {}
impl Cast<dyn MessageTypeMut> for Participant {}
impl Cast<dyn MessageEventDefinitionType> for Participant {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Participant {}
impl Cast<dyn MessageFlowType> for Participant {}
impl Cast<dyn MessageFlowTypeMut> for Participant {}
impl Cast<dyn MessageFlowAssociationType> for Participant {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Participant {}
impl Cast<dyn MonitoringType> for Participant {}
impl Cast<dyn MonitoringTypeMut> for Participant {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Participant {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Participant {}
impl Cast<dyn OperationType> for Participant {}
impl Cast<dyn OperationTypeMut> for Participant {}
impl Cast<dyn OutputSetType> for Participant {}
impl Cast<dyn OutputSetTypeMut> for Participant {}
impl Cast<dyn ParallelGatewayType> for Participant {}
impl Cast<dyn ParallelGatewayTypeMut> for Participant {}
impl Cast<dyn ParticipantType> for Participant {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantTypeMut> for Participant {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantAssociationType> for Participant {}
impl Cast<dyn ParticipantAssociationTypeMut> for Participant {}
impl Cast<dyn ParticipantMultiplicityType> for Participant {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Participant {}
impl Cast<dyn PartnerEntityType> for Participant {}
impl Cast<dyn PartnerEntityTypeMut> for Participant {}
impl Cast<dyn PartnerRoleType> for Participant {}
impl Cast<dyn PartnerRoleTypeMut> for Participant {}
impl Cast<dyn PerformerType> for Participant {}
impl Cast<dyn PerformerTypeMut> for Participant {}
impl Cast<dyn PotentialOwnerType> for Participant {}
impl Cast<dyn PotentialOwnerTypeMut> for Participant {}
impl Cast<dyn ProcessType> for Participant {}
impl Cast<dyn ProcessTypeMut> for Participant {}
impl Cast<dyn PropertyType> for Participant {}
impl Cast<dyn PropertyTypeMut> for Participant {}
impl Cast<dyn ReceiveTaskType> for Participant {}
impl Cast<dyn ReceiveTaskTypeMut> for Participant {}
impl Cast<dyn RelationshipType> for Participant {}
impl Cast<dyn RelationshipTypeMut> for Participant {}
impl Cast<dyn RenderingType> for Participant {}
impl Cast<dyn RenderingTypeMut> for Participant {}
impl Cast<dyn ResourceType> for Participant {}
impl Cast<dyn ResourceTypeMut> for Participant {}
impl Cast<dyn ResourceAssignmentExpressionType> for Participant {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Participant {}
impl Cast<dyn ResourceParameterType> for Participant {}
impl Cast<dyn ResourceParameterTypeMut> for Participant {}
impl Cast<dyn ResourceParameterBindingType> for Participant {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Participant {}
impl Cast<dyn ResourceRoleType> for Participant {}
impl Cast<dyn ResourceRoleTypeMut> for Participant {}
impl Cast<dyn RootElementType> for Participant {}
impl Cast<dyn RootElementTypeMut> for Participant {}
impl Cast<dyn ScriptTaskType> for Participant {}
impl Cast<dyn ScriptTaskTypeMut> for Participant {}
impl Cast<dyn ScriptType> for Participant {}
impl Cast<dyn ScriptTypeMut> for Participant {}
impl Cast<dyn SendTaskType> for Participant {}
impl Cast<dyn SendTaskTypeMut> for Participant {}
impl Cast<dyn SequenceFlowType> for Participant {}
impl Cast<dyn SequenceFlowTypeMut> for Participant {}
impl Cast<dyn ServiceTaskType> for Participant {}
impl Cast<dyn ServiceTaskTypeMut> for Participant {}
impl Cast<dyn SignalType> for Participant {}
impl Cast<dyn SignalTypeMut> for Participant {}
impl Cast<dyn SignalEventDefinitionType> for Participant {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Participant {}
impl Cast<dyn StandardLoopCharacteristicsType> for Participant {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Participant {}
impl Cast<dyn StartEventType> for Participant {}
impl Cast<dyn StartEventTypeMut> for Participant {}
impl Cast<dyn SubChoreographyType> for Participant {}
impl Cast<dyn SubChoreographyTypeMut> for Participant {}
impl Cast<dyn SubConversationType> for Participant {}
impl Cast<dyn SubConversationTypeMut> for Participant {}
impl Cast<dyn SubProcessType> for Participant {}
impl Cast<dyn SubProcessTypeMut> for Participant {}
impl Cast<dyn TaskType> for Participant {}
impl Cast<dyn TaskTypeMut> for Participant {}
impl Cast<dyn TerminateEventDefinitionType> for Participant {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Participant {}
impl Cast<dyn TextAnnotationType> for Participant {}
impl Cast<dyn TextAnnotationTypeMut> for Participant {}
impl Cast<dyn TextType> for Participant {}
impl Cast<dyn TextTypeMut> for Participant {}
impl Cast<dyn ThrowEventType> for Participant {}
impl Cast<dyn ThrowEventTypeMut> for Participant {}
impl Cast<dyn TimerEventDefinitionType> for Participant {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Participant {}
impl Cast<dyn TransactionType> for Participant {}
impl Cast<dyn TransactionTypeMut> for Participant {}
impl Cast<dyn UserTaskType> for Participant {}
impl Cast<dyn UserTaskTypeMut> for Participant {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:participantAssociation")]
pub struct ParticipantAssociation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(flatten_text = "bpmn:innerParticipantRef")]
    #[tia("ParticipantAssociationType",rg*="inner_participant_ref","ParticipantAssociationTypeMut",s,rmg*="inner_participant_ref_mut")]
    pub inner_participant_ref: String,
    #[xml(flatten_text = "bpmn:outerParticipantRef")]
    #[tia("ParticipantAssociationType",rg*="outer_participant_ref","ParticipantAssociationTypeMut",s,rmg*="outer_participant_ref_mut")]
    pub outer_participant_ref: String,
}
impl DocumentElement for ParticipantAssociation {
    fn element(&self) -> Element {
        Element::ParticipantAssociation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ParticipantAssociation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `participantAssociation`
pub trait ParticipantAssociationType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of `innerParticipantRef` child
    fn inner_participant_ref(&self) -> &String;
    /// Get value of `outerParticipantRef` child
    fn outer_participant_ref(&self) -> &String;
}
dyn_clone::clone_trait_object!(ParticipantAssociationType);
impl_downcast!(ParticipantAssociationType);
/// Mutable access to `participantAssociation`
pub trait ParticipantAssociationTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ParticipantAssociationType
{
    /// Get a mutable value of `innerParticipantRef` child
    fn inner_participant_ref_mut(&mut self) -> &mut String;
    /// Set value of `innerParticipantRef` child
    fn set_inner_participant_ref(&mut self, value: String);
    /// Get a mutable value of `outerParticipantRef` child
    fn outer_participant_ref_mut(&mut self) -> &mut String;
    /// Set value of `outerParticipantRef` child
    fn set_outer_participant_ref(&mut self, value: String);
}
dyn_clone::clone_trait_object!(ParticipantAssociationTypeMut);
impl_downcast!(ParticipantAssociationTypeMut);
impl Cast<dyn DefinitionsType> for ParticipantAssociation {}
impl Cast<dyn DefinitionsTypeMut> for ParticipantAssociation {}
impl Cast<dyn ImportType> for ParticipantAssociation {}
impl Cast<dyn ImportTypeMut> for ParticipantAssociation {}
impl Cast<dyn ActivityType> for ParticipantAssociation {}
impl Cast<dyn ActivityTypeMut> for ParticipantAssociation {}
impl Cast<dyn AdHocSubProcessType> for ParticipantAssociation {}
impl Cast<dyn AdHocSubProcessTypeMut> for ParticipantAssociation {}
impl Cast<dyn ArtifactType> for ParticipantAssociation {}
impl Cast<dyn ArtifactTypeMut> for ParticipantAssociation {}
impl Cast<dyn AssignmentType> for ParticipantAssociation {}
impl Cast<dyn AssignmentTypeMut> for ParticipantAssociation {}
impl Cast<dyn AssociationType> for ParticipantAssociation {}
impl Cast<dyn AssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn AuditingType> for ParticipantAssociation {}
impl Cast<dyn AuditingTypeMut> for ParticipantAssociation {}
impl Cast<dyn BaseElementType> for ParticipantAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ParticipantAssociation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ParticipantAssociation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ParticipantAssociation {}
impl Cast<dyn BoundaryEventType> for ParticipantAssociation {}
impl Cast<dyn BoundaryEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn BusinessRuleTaskType> for ParticipantAssociation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn CallableElementType> for ParticipantAssociation {}
impl Cast<dyn CallableElementTypeMut> for ParticipantAssociation {}
impl Cast<dyn CallActivityType> for ParticipantAssociation {}
impl Cast<dyn CallActivityTypeMut> for ParticipantAssociation {}
impl Cast<dyn CallChoreographyType> for ParticipantAssociation {}
impl Cast<dyn CallChoreographyTypeMut> for ParticipantAssociation {}
impl Cast<dyn CallConversationType> for ParticipantAssociation {}
impl Cast<dyn CallConversationTypeMut> for ParticipantAssociation {}
impl Cast<dyn CancelEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn CatchEventType> for ParticipantAssociation {}
impl Cast<dyn CatchEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn CategoryType> for ParticipantAssociation {}
impl Cast<dyn CategoryTypeMut> for ParticipantAssociation {}
impl Cast<dyn CategoryValueType> for ParticipantAssociation {}
impl Cast<dyn CategoryValueTypeMut> for ParticipantAssociation {}
impl Cast<dyn ChoreographyType> for ParticipantAssociation {}
impl Cast<dyn ChoreographyTypeMut> for ParticipantAssociation {}
impl Cast<dyn ChoreographyActivityType> for ParticipantAssociation {}
impl Cast<dyn ChoreographyActivityTypeMut> for ParticipantAssociation {}
impl Cast<dyn ChoreographyTaskType> for ParticipantAssociation {}
impl Cast<dyn ChoreographyTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn CollaborationType> for ParticipantAssociation {}
impl Cast<dyn CollaborationTypeMut> for ParticipantAssociation {}
impl Cast<dyn CompensateEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ParticipantAssociation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ComplexGatewayType> for ParticipantAssociation {}
impl Cast<dyn ComplexGatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn ConditionalEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ConversationType> for ParticipantAssociation {}
impl Cast<dyn ConversationTypeMut> for ParticipantAssociation {}
impl Cast<dyn ConversationAssociationType> for ParticipantAssociation {}
impl Cast<dyn ConversationAssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn ConversationLinkType> for ParticipantAssociation {}
impl Cast<dyn ConversationLinkTypeMut> for ParticipantAssociation {}
impl Cast<dyn ConversationNodeType> for ParticipantAssociation {}
impl Cast<dyn ConversationNodeTypeMut> for ParticipantAssociation {}
impl Cast<dyn CorrelationKeyType> for ParticipantAssociation {}
impl Cast<dyn CorrelationKeyTypeMut> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyType> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyTypeMut> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyBindingType> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ParticipantAssociation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ParticipantAssociation {}
impl Cast<dyn CorrelationSubscriptionType> for ParticipantAssociation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataAssociationType> for ParticipantAssociation {}
impl Cast<dyn DataAssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataInputType> for ParticipantAssociation {}
impl Cast<dyn DataInputTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataInputAssociationType> for ParticipantAssociation {}
impl Cast<dyn DataInputAssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataObjectType> for ParticipantAssociation {}
impl Cast<dyn DataObjectTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataObjectReferenceType> for ParticipantAssociation {}
impl Cast<dyn DataObjectReferenceTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataOutputType> for ParticipantAssociation {}
impl Cast<dyn DataOutputTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataOutputAssociationType> for ParticipantAssociation {}
impl Cast<dyn DataOutputAssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataStateType> for ParticipantAssociation {}
impl Cast<dyn DataStateTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataStoreType> for ParticipantAssociation {}
impl Cast<dyn DataStoreTypeMut> for ParticipantAssociation {}
impl Cast<dyn DataStoreReferenceType> for ParticipantAssociation {}
impl Cast<dyn DataStoreReferenceTypeMut> for ParticipantAssociation {}
impl Cast<dyn DocumentationType> for ParticipantAssociation {}
impl Cast<dyn DocumentationTypeMut> for ParticipantAssociation {}
impl Cast<dyn EndEventType> for ParticipantAssociation {}
impl Cast<dyn EndEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn EndPointType> for ParticipantAssociation {}
impl Cast<dyn EndPointTypeMut> for ParticipantAssociation {}
impl Cast<dyn ErrorType> for ParticipantAssociation {}
impl Cast<dyn ErrorTypeMut> for ParticipantAssociation {}
impl Cast<dyn ErrorEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn EscalationType> for ParticipantAssociation {}
impl Cast<dyn EscalationTypeMut> for ParticipantAssociation {}
impl Cast<dyn EscalationEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn EventType> for ParticipantAssociation {}
impl Cast<dyn EventTypeMut> for ParticipantAssociation {}
impl Cast<dyn EventBasedGatewayType> for ParticipantAssociation {}
impl Cast<dyn EventBasedGatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn EventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn EventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ExclusiveGatewayType> for ParticipantAssociation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn ExpressionType> for ParticipantAssociation {}
impl Cast<dyn ExpressionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ExtensionType> for ParticipantAssociation {}
impl Cast<dyn ExtensionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ExtensionElementsType> for ParticipantAssociation {}
impl Cast<dyn ExtensionElementsTypeMut> for ParticipantAssociation {}
impl Cast<dyn FlowElementType> for ParticipantAssociation {}
impl Cast<dyn FlowElementTypeMut> for ParticipantAssociation {}
impl Cast<dyn FlowNodeType> for ParticipantAssociation {}
impl Cast<dyn FlowNodeTypeMut> for ParticipantAssociation {}
impl Cast<dyn FormalExpressionType> for ParticipantAssociation {}
impl Cast<dyn FormalExpressionTypeMut> for ParticipantAssociation {}
impl Cast<dyn GatewayType> for ParticipantAssociation {}
impl Cast<dyn GatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalChoreographyTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalConversationType> for ParticipantAssociation {}
impl Cast<dyn GlobalConversationTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalManualTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalManualTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalScriptTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GlobalUserTaskType> for ParticipantAssociation {}
impl Cast<dyn GlobalUserTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn GroupType> for ParticipantAssociation {}
impl Cast<dyn GroupTypeMut> for ParticipantAssociation {}
impl Cast<dyn HumanPerformerType> for ParticipantAssociation {}
impl Cast<dyn HumanPerformerTypeMut> for ParticipantAssociation {}
impl Cast<dyn ImplicitThrowEventType> for ParticipantAssociation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn InclusiveGatewayType> for ParticipantAssociation {}
impl Cast<dyn InclusiveGatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn InputSetType> for ParticipantAssociation {}
impl Cast<dyn InputSetTypeMut> for ParticipantAssociation {}
impl Cast<dyn InterfaceType> for ParticipantAssociation {}
impl Cast<dyn InterfaceTypeMut> for ParticipantAssociation {}
impl Cast<dyn IntermediateCatchEventType> for ParticipantAssociation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn IntermediateThrowEventType> for ParticipantAssociation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn InputOutputBindingType> for ParticipantAssociation {}
impl Cast<dyn InputOutputBindingTypeMut> for ParticipantAssociation {}
impl Cast<dyn InputOutputSpecificationType> for ParticipantAssociation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ParticipantAssociation {}
impl Cast<dyn ItemDefinitionType> for ParticipantAssociation {}
impl Cast<dyn ItemDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn LaneType> for ParticipantAssociation {}
impl Cast<dyn LaneTypeMut> for ParticipantAssociation {}
impl Cast<dyn LaneSetType> for ParticipantAssociation {}
impl Cast<dyn LaneSetTypeMut> for ParticipantAssociation {}
impl Cast<dyn LinkEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn LoopCharacteristicsType> for ParticipantAssociation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ParticipantAssociation {}
impl Cast<dyn ManualTaskType> for ParticipantAssociation {}
impl Cast<dyn ManualTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn MessageType> for ParticipantAssociation {}
impl Cast<dyn MessageTypeMut> for ParticipantAssociation {}
impl Cast<dyn MessageEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn MessageFlowType> for ParticipantAssociation {}
impl Cast<dyn MessageFlowTypeMut> for ParticipantAssociation {}
impl Cast<dyn MessageFlowAssociationType> for ParticipantAssociation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ParticipantAssociation {}
impl Cast<dyn MonitoringType> for ParticipantAssociation {}
impl Cast<dyn MonitoringTypeMut> for ParticipantAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ParticipantAssociation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ParticipantAssociation {}
impl Cast<dyn OperationType> for ParticipantAssociation {}
impl Cast<dyn OperationTypeMut> for ParticipantAssociation {}
impl Cast<dyn OutputSetType> for ParticipantAssociation {}
impl Cast<dyn OutputSetTypeMut> for ParticipantAssociation {}
impl Cast<dyn ParallelGatewayType> for ParticipantAssociation {}
impl Cast<dyn ParallelGatewayTypeMut> for ParticipantAssociation {}
impl Cast<dyn ParticipantType> for ParticipantAssociation {}
impl Cast<dyn ParticipantTypeMut> for ParticipantAssociation {}
impl Cast<dyn ParticipantAssociationType> for ParticipantAssociation {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for ParticipantAssociation {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantMultiplicityType> for ParticipantAssociation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ParticipantAssociation {}
impl Cast<dyn PartnerEntityType> for ParticipantAssociation {}
impl Cast<dyn PartnerEntityTypeMut> for ParticipantAssociation {}
impl Cast<dyn PartnerRoleType> for ParticipantAssociation {}
impl Cast<dyn PartnerRoleTypeMut> for ParticipantAssociation {}
impl Cast<dyn PerformerType> for ParticipantAssociation {}
impl Cast<dyn PerformerTypeMut> for ParticipantAssociation {}
impl Cast<dyn PotentialOwnerType> for ParticipantAssociation {}
impl Cast<dyn PotentialOwnerTypeMut> for ParticipantAssociation {}
impl Cast<dyn ProcessType> for ParticipantAssociation {}
impl Cast<dyn ProcessTypeMut> for ParticipantAssociation {}
impl Cast<dyn PropertyType> for ParticipantAssociation {}
impl Cast<dyn PropertyTypeMut> for ParticipantAssociation {}
impl Cast<dyn ReceiveTaskType> for ParticipantAssociation {}
impl Cast<dyn ReceiveTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn RelationshipType> for ParticipantAssociation {}
impl Cast<dyn RelationshipTypeMut> for ParticipantAssociation {}
impl Cast<dyn RenderingType> for ParticipantAssociation {}
impl Cast<dyn RenderingTypeMut> for ParticipantAssociation {}
impl Cast<dyn ResourceType> for ParticipantAssociation {}
impl Cast<dyn ResourceTypeMut> for ParticipantAssociation {}
impl Cast<dyn ResourceAssignmentExpressionType> for ParticipantAssociation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ParticipantAssociation {}
impl Cast<dyn ResourceParameterType> for ParticipantAssociation {}
impl Cast<dyn ResourceParameterTypeMut> for ParticipantAssociation {}
impl Cast<dyn ResourceParameterBindingType> for ParticipantAssociation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ParticipantAssociation {}
impl Cast<dyn ResourceRoleType> for ParticipantAssociation {}
impl Cast<dyn ResourceRoleTypeMut> for ParticipantAssociation {}
impl Cast<dyn RootElementType> for ParticipantAssociation {}
impl Cast<dyn RootElementTypeMut> for ParticipantAssociation {}
impl Cast<dyn ScriptTaskType> for ParticipantAssociation {}
impl Cast<dyn ScriptTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn ScriptType> for ParticipantAssociation {}
impl Cast<dyn ScriptTypeMut> for ParticipantAssociation {}
impl Cast<dyn SendTaskType> for ParticipantAssociation {}
impl Cast<dyn SendTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn SequenceFlowType> for ParticipantAssociation {}
impl Cast<dyn SequenceFlowTypeMut> for ParticipantAssociation {}
impl Cast<dyn ServiceTaskType> for ParticipantAssociation {}
impl Cast<dyn ServiceTaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn SignalType> for ParticipantAssociation {}
impl Cast<dyn SignalTypeMut> for ParticipantAssociation {}
impl Cast<dyn SignalEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn StandardLoopCharacteristicsType> for ParticipantAssociation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ParticipantAssociation {}
impl Cast<dyn StartEventType> for ParticipantAssociation {}
impl Cast<dyn StartEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn SubChoreographyType> for ParticipantAssociation {}
impl Cast<dyn SubChoreographyTypeMut> for ParticipantAssociation {}
impl Cast<dyn SubConversationType> for ParticipantAssociation {}
impl Cast<dyn SubConversationTypeMut> for ParticipantAssociation {}
impl Cast<dyn SubProcessType> for ParticipantAssociation {}
impl Cast<dyn SubProcessTypeMut> for ParticipantAssociation {}
impl Cast<dyn TaskType> for ParticipantAssociation {}
impl Cast<dyn TaskTypeMut> for ParticipantAssociation {}
impl Cast<dyn TerminateEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn TextAnnotationType> for ParticipantAssociation {}
impl Cast<dyn TextAnnotationTypeMut> for ParticipantAssociation {}
impl Cast<dyn TextType> for ParticipantAssociation {}
impl Cast<dyn TextTypeMut> for ParticipantAssociation {}
impl Cast<dyn ThrowEventType> for ParticipantAssociation {}
impl Cast<dyn ThrowEventTypeMut> for ParticipantAssociation {}
impl Cast<dyn TimerEventDefinitionType> for ParticipantAssociation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ParticipantAssociation {}
impl Cast<dyn TransactionType> for ParticipantAssociation {}
impl Cast<dyn TransactionTypeMut> for ParticipantAssociation {}
impl Cast<dyn UserTaskType> for ParticipantAssociation {}
impl Cast<dyn UserTaskTypeMut> for ParticipantAssociation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:participantMultiplicity")]
pub struct ParticipantMultiplicity {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "minimum")]
    #[tia("ParticipantMultiplicityType",rg*="minimum","ParticipantMultiplicityTypeMut",s)]
    pub minimum: Option<Int>,
    #[xml(attr = "maximum")]
    #[tia("ParticipantMultiplicityType",rg*="maximum","ParticipantMultiplicityTypeMut",s)]
    pub maximum: Option<Int>,
}
impl DocumentElement for ParticipantMultiplicity {
    fn element(&self) -> Element {
        Element::ParticipantMultiplicity
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ParticipantMultiplicity {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `participantMultiplicity`
pub trait ParticipantMultiplicityType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `minimum`
    fn minimum(&self) -> &Option<Int>;
    /// Get value of attribute `maximum`
    fn maximum(&self) -> &Option<Int>;
}
dyn_clone::clone_trait_object!(ParticipantMultiplicityType);
impl_downcast!(ParticipantMultiplicityType);
/// Mutable access to `participantMultiplicity`
pub trait ParticipantMultiplicityTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ParticipantMultiplicityType
{
    /// Set value of attribute `minimum`
    fn set_minimum(&mut self, value: Option<Int>);
    /// Set value of attribute `maximum`
    fn set_maximum(&mut self, value: Option<Int>);
}
dyn_clone::clone_trait_object!(ParticipantMultiplicityTypeMut);
impl_downcast!(ParticipantMultiplicityTypeMut);
impl Cast<dyn DefinitionsType> for ParticipantMultiplicity {}
impl Cast<dyn DefinitionsTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ImportType> for ParticipantMultiplicity {}
impl Cast<dyn ImportTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ActivityType> for ParticipantMultiplicity {}
impl Cast<dyn ActivityTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn AdHocSubProcessType> for ParticipantMultiplicity {}
impl Cast<dyn AdHocSubProcessTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ArtifactType> for ParticipantMultiplicity {}
impl Cast<dyn ArtifactTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn AssignmentType> for ParticipantMultiplicity {}
impl Cast<dyn AssignmentTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn AssociationType> for ParticipantMultiplicity {}
impl Cast<dyn AssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn AuditingType> for ParticipantMultiplicity {}
impl Cast<dyn AuditingTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn BaseElementType> for ParticipantMultiplicity {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ParticipantMultiplicity {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ParticipantMultiplicity {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn BoundaryEventType> for ParticipantMultiplicity {}
impl Cast<dyn BoundaryEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn BusinessRuleTaskType> for ParticipantMultiplicity {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CallableElementType> for ParticipantMultiplicity {}
impl Cast<dyn CallableElementTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CallActivityType> for ParticipantMultiplicity {}
impl Cast<dyn CallActivityTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CallChoreographyType> for ParticipantMultiplicity {}
impl Cast<dyn CallChoreographyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CallConversationType> for ParticipantMultiplicity {}
impl Cast<dyn CallConversationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CancelEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CatchEventType> for ParticipantMultiplicity {}
impl Cast<dyn CatchEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CategoryType> for ParticipantMultiplicity {}
impl Cast<dyn CategoryTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CategoryValueType> for ParticipantMultiplicity {}
impl Cast<dyn CategoryValueTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyType> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyActivityType> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyActivityTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyTaskType> for ParticipantMultiplicity {}
impl Cast<dyn ChoreographyTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CollaborationType> for ParticipantMultiplicity {}
impl Cast<dyn CollaborationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CompensateEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ComplexGatewayType> for ParticipantMultiplicity {}
impl Cast<dyn ComplexGatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ConditionalEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ConversationType> for ParticipantMultiplicity {}
impl Cast<dyn ConversationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ConversationAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn ConversationAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ConversationLinkType> for ParticipantMultiplicity {}
impl Cast<dyn ConversationLinkTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ConversationNodeType> for ParticipantMultiplicity {}
impl Cast<dyn ConversationNodeTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationKeyType> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationKeyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyType> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyBindingType> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationSubscriptionType> for ParticipantMultiplicity {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn DataAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataInputType> for ParticipantMultiplicity {}
impl Cast<dyn DataInputTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataInputAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn DataInputAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataObjectType> for ParticipantMultiplicity {}
impl Cast<dyn DataObjectTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataObjectReferenceType> for ParticipantMultiplicity {}
impl Cast<dyn DataObjectReferenceTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataOutputType> for ParticipantMultiplicity {}
impl Cast<dyn DataOutputTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataOutputAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn DataOutputAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataStateType> for ParticipantMultiplicity {}
impl Cast<dyn DataStateTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataStoreType> for ParticipantMultiplicity {}
impl Cast<dyn DataStoreTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DataStoreReferenceType> for ParticipantMultiplicity {}
impl Cast<dyn DataStoreReferenceTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn DocumentationType> for ParticipantMultiplicity {}
impl Cast<dyn DocumentationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EndEventType> for ParticipantMultiplicity {}
impl Cast<dyn EndEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EndPointType> for ParticipantMultiplicity {}
impl Cast<dyn EndPointTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ErrorType> for ParticipantMultiplicity {}
impl Cast<dyn ErrorTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ErrorEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EscalationType> for ParticipantMultiplicity {}
impl Cast<dyn EscalationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EscalationEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EventType> for ParticipantMultiplicity {}
impl Cast<dyn EventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EventBasedGatewayType> for ParticipantMultiplicity {}
impl Cast<dyn EventBasedGatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn EventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn EventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ExclusiveGatewayType> for ParticipantMultiplicity {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ExpressionType> for ParticipantMultiplicity {}
impl Cast<dyn ExpressionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ExtensionType> for ParticipantMultiplicity {}
impl Cast<dyn ExtensionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ExtensionElementsType> for ParticipantMultiplicity {}
impl Cast<dyn ExtensionElementsTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn FlowElementType> for ParticipantMultiplicity {}
impl Cast<dyn FlowElementTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn FlowNodeType> for ParticipantMultiplicity {}
impl Cast<dyn FlowNodeTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn FormalExpressionType> for ParticipantMultiplicity {}
impl Cast<dyn FormalExpressionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GatewayType> for ParticipantMultiplicity {}
impl Cast<dyn GatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalChoreographyTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalConversationType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalConversationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalManualTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalManualTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalScriptTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GlobalUserTaskType> for ParticipantMultiplicity {}
impl Cast<dyn GlobalUserTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn GroupType> for ParticipantMultiplicity {}
impl Cast<dyn GroupTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn HumanPerformerType> for ParticipantMultiplicity {}
impl Cast<dyn HumanPerformerTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ImplicitThrowEventType> for ParticipantMultiplicity {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn InclusiveGatewayType> for ParticipantMultiplicity {}
impl Cast<dyn InclusiveGatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn InputSetType> for ParticipantMultiplicity {}
impl Cast<dyn InputSetTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn InterfaceType> for ParticipantMultiplicity {}
impl Cast<dyn InterfaceTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn IntermediateCatchEventType> for ParticipantMultiplicity {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn IntermediateThrowEventType> for ParticipantMultiplicity {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn InputOutputBindingType> for ParticipantMultiplicity {}
impl Cast<dyn InputOutputBindingTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn InputOutputSpecificationType> for ParticipantMultiplicity {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ItemDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn ItemDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn LaneType> for ParticipantMultiplicity {}
impl Cast<dyn LaneTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn LaneSetType> for ParticipantMultiplicity {}
impl Cast<dyn LaneSetTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn LinkEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn LoopCharacteristicsType> for ParticipantMultiplicity {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ManualTaskType> for ParticipantMultiplicity {}
impl Cast<dyn ManualTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MessageType> for ParticipantMultiplicity {}
impl Cast<dyn MessageTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MessageEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MessageFlowType> for ParticipantMultiplicity {}
impl Cast<dyn MessageFlowTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MessageFlowAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MonitoringType> for ParticipantMultiplicity {}
impl Cast<dyn MonitoringTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ParticipantMultiplicity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn OperationType> for ParticipantMultiplicity {}
impl Cast<dyn OperationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn OutputSetType> for ParticipantMultiplicity {}
impl Cast<dyn OutputSetTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ParallelGatewayType> for ParticipantMultiplicity {}
impl Cast<dyn ParallelGatewayTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ParticipantType> for ParticipantMultiplicity {}
impl Cast<dyn ParticipantTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ParticipantAssociationType> for ParticipantMultiplicity {}
impl Cast<dyn ParticipantAssociationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ParticipantMultiplicityType> for ParticipantMultiplicity {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ParticipantMultiplicity {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PartnerEntityType> for ParticipantMultiplicity {}
impl Cast<dyn PartnerEntityTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn PartnerRoleType> for ParticipantMultiplicity {}
impl Cast<dyn PartnerRoleTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn PerformerType> for ParticipantMultiplicity {}
impl Cast<dyn PerformerTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn PotentialOwnerType> for ParticipantMultiplicity {}
impl Cast<dyn PotentialOwnerTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ProcessType> for ParticipantMultiplicity {}
impl Cast<dyn ProcessTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn PropertyType> for ParticipantMultiplicity {}
impl Cast<dyn PropertyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ReceiveTaskType> for ParticipantMultiplicity {}
impl Cast<dyn ReceiveTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn RelationshipType> for ParticipantMultiplicity {}
impl Cast<dyn RelationshipTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn RenderingType> for ParticipantMultiplicity {}
impl Cast<dyn RenderingTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ResourceType> for ParticipantMultiplicity {}
impl Cast<dyn ResourceTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ResourceAssignmentExpressionType> for ParticipantMultiplicity {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ResourceParameterType> for ParticipantMultiplicity {}
impl Cast<dyn ResourceParameterTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ResourceParameterBindingType> for ParticipantMultiplicity {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ResourceRoleType> for ParticipantMultiplicity {}
impl Cast<dyn ResourceRoleTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn RootElementType> for ParticipantMultiplicity {}
impl Cast<dyn RootElementTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ScriptTaskType> for ParticipantMultiplicity {}
impl Cast<dyn ScriptTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ScriptType> for ParticipantMultiplicity {}
impl Cast<dyn ScriptTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SendTaskType> for ParticipantMultiplicity {}
impl Cast<dyn SendTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SequenceFlowType> for ParticipantMultiplicity {}
impl Cast<dyn SequenceFlowTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ServiceTaskType> for ParticipantMultiplicity {}
impl Cast<dyn ServiceTaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SignalType> for ParticipantMultiplicity {}
impl Cast<dyn SignalTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SignalEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn StandardLoopCharacteristicsType> for ParticipantMultiplicity {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn StartEventType> for ParticipantMultiplicity {}
impl Cast<dyn StartEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SubChoreographyType> for ParticipantMultiplicity {}
impl Cast<dyn SubChoreographyTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SubConversationType> for ParticipantMultiplicity {}
impl Cast<dyn SubConversationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn SubProcessType> for ParticipantMultiplicity {}
impl Cast<dyn SubProcessTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TaskType> for ParticipantMultiplicity {}
impl Cast<dyn TaskTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TerminateEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TextAnnotationType> for ParticipantMultiplicity {}
impl Cast<dyn TextAnnotationTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TextType> for ParticipantMultiplicity {}
impl Cast<dyn TextTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn ThrowEventType> for ParticipantMultiplicity {}
impl Cast<dyn ThrowEventTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TimerEventDefinitionType> for ParticipantMultiplicity {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn TransactionType> for ParticipantMultiplicity {}
impl Cast<dyn TransactionTypeMut> for ParticipantMultiplicity {}
impl Cast<dyn UserTaskType> for ParticipantMultiplicity {}
impl Cast<dyn UserTaskTypeMut> for ParticipantMultiplicity {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:partnerEntity")]
pub struct PartnerEntity {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("PartnerEntityType",rg*="name","PartnerEntityTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("PartnerEntityType",rg*="participant_refs","PartnerEntityTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
}
impl DocumentElement for PartnerEntity {
    fn element(&self) -> Element {
        Element::PartnerEntity
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for PartnerEntity {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for PartnerEntity {}
impl RootElementTypeMut for PartnerEntity {}
//

/// Access to `partnerEntity`
pub trait PartnerEntityType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `participantRef` child
    fn participant_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(PartnerEntityType);
impl_downcast!(PartnerEntityType);
/// Mutable access to `partnerEntity`
pub trait PartnerEntityTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + PartnerEntityType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `participantRef` child
    fn participant_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `participantRef` child
    fn set_participant_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(PartnerEntityTypeMut);
impl_downcast!(PartnerEntityTypeMut);
impl Cast<dyn DefinitionsType> for PartnerEntity {}
impl Cast<dyn DefinitionsTypeMut> for PartnerEntity {}
impl Cast<dyn ImportType> for PartnerEntity {}
impl Cast<dyn ImportTypeMut> for PartnerEntity {}
impl Cast<dyn ActivityType> for PartnerEntity {}
impl Cast<dyn ActivityTypeMut> for PartnerEntity {}
impl Cast<dyn AdHocSubProcessType> for PartnerEntity {}
impl Cast<dyn AdHocSubProcessTypeMut> for PartnerEntity {}
impl Cast<dyn ArtifactType> for PartnerEntity {}
impl Cast<dyn ArtifactTypeMut> for PartnerEntity {}
impl Cast<dyn AssignmentType> for PartnerEntity {}
impl Cast<dyn AssignmentTypeMut> for PartnerEntity {}
impl Cast<dyn AssociationType> for PartnerEntity {}
impl Cast<dyn AssociationTypeMut> for PartnerEntity {}
impl Cast<dyn AuditingType> for PartnerEntity {}
impl Cast<dyn AuditingTypeMut> for PartnerEntity {}
impl Cast<dyn BaseElementType> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for PartnerEntity {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for PartnerEntity {}
impl Cast<dyn BoundaryEventType> for PartnerEntity {}
impl Cast<dyn BoundaryEventTypeMut> for PartnerEntity {}
impl Cast<dyn BusinessRuleTaskType> for PartnerEntity {}
impl Cast<dyn BusinessRuleTaskTypeMut> for PartnerEntity {}
impl Cast<dyn CallableElementType> for PartnerEntity {}
impl Cast<dyn CallableElementTypeMut> for PartnerEntity {}
impl Cast<dyn CallActivityType> for PartnerEntity {}
impl Cast<dyn CallActivityTypeMut> for PartnerEntity {}
impl Cast<dyn CallChoreographyType> for PartnerEntity {}
impl Cast<dyn CallChoreographyTypeMut> for PartnerEntity {}
impl Cast<dyn CallConversationType> for PartnerEntity {}
impl Cast<dyn CallConversationTypeMut> for PartnerEntity {}
impl Cast<dyn CancelEventDefinitionType> for PartnerEntity {}
impl Cast<dyn CancelEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn CatchEventType> for PartnerEntity {}
impl Cast<dyn CatchEventTypeMut> for PartnerEntity {}
impl Cast<dyn CategoryType> for PartnerEntity {}
impl Cast<dyn CategoryTypeMut> for PartnerEntity {}
impl Cast<dyn CategoryValueType> for PartnerEntity {}
impl Cast<dyn CategoryValueTypeMut> for PartnerEntity {}
impl Cast<dyn ChoreographyType> for PartnerEntity {}
impl Cast<dyn ChoreographyTypeMut> for PartnerEntity {}
impl Cast<dyn ChoreographyActivityType> for PartnerEntity {}
impl Cast<dyn ChoreographyActivityTypeMut> for PartnerEntity {}
impl Cast<dyn ChoreographyTaskType> for PartnerEntity {}
impl Cast<dyn ChoreographyTaskTypeMut> for PartnerEntity {}
impl Cast<dyn CollaborationType> for PartnerEntity {}
impl Cast<dyn CollaborationTypeMut> for PartnerEntity {}
impl Cast<dyn CompensateEventDefinitionType> for PartnerEntity {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn ComplexBehaviorDefinitionType> for PartnerEntity {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn ComplexGatewayType> for PartnerEntity {}
impl Cast<dyn ComplexGatewayTypeMut> for PartnerEntity {}
impl Cast<dyn ConditionalEventDefinitionType> for PartnerEntity {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn ConversationType> for PartnerEntity {}
impl Cast<dyn ConversationTypeMut> for PartnerEntity {}
impl Cast<dyn ConversationAssociationType> for PartnerEntity {}
impl Cast<dyn ConversationAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn ConversationLinkType> for PartnerEntity {}
impl Cast<dyn ConversationLinkTypeMut> for PartnerEntity {}
impl Cast<dyn ConversationNodeType> for PartnerEntity {}
impl Cast<dyn ConversationNodeTypeMut> for PartnerEntity {}
impl Cast<dyn CorrelationKeyType> for PartnerEntity {}
impl Cast<dyn CorrelationKeyTypeMut> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyType> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyTypeMut> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyBindingType> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for PartnerEntity {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for PartnerEntity {}
impl Cast<dyn CorrelationSubscriptionType> for PartnerEntity {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for PartnerEntity {}
impl Cast<dyn DataAssociationType> for PartnerEntity {}
impl Cast<dyn DataAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn DataInputType> for PartnerEntity {}
impl Cast<dyn DataInputTypeMut> for PartnerEntity {}
impl Cast<dyn DataInputAssociationType> for PartnerEntity {}
impl Cast<dyn DataInputAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn DataObjectType> for PartnerEntity {}
impl Cast<dyn DataObjectTypeMut> for PartnerEntity {}
impl Cast<dyn DataObjectReferenceType> for PartnerEntity {}
impl Cast<dyn DataObjectReferenceTypeMut> for PartnerEntity {}
impl Cast<dyn DataOutputType> for PartnerEntity {}
impl Cast<dyn DataOutputTypeMut> for PartnerEntity {}
impl Cast<dyn DataOutputAssociationType> for PartnerEntity {}
impl Cast<dyn DataOutputAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn DataStateType> for PartnerEntity {}
impl Cast<dyn DataStateTypeMut> for PartnerEntity {}
impl Cast<dyn DataStoreType> for PartnerEntity {}
impl Cast<dyn DataStoreTypeMut> for PartnerEntity {}
impl Cast<dyn DataStoreReferenceType> for PartnerEntity {}
impl Cast<dyn DataStoreReferenceTypeMut> for PartnerEntity {}
impl Cast<dyn DocumentationType> for PartnerEntity {}
impl Cast<dyn DocumentationTypeMut> for PartnerEntity {}
impl Cast<dyn EndEventType> for PartnerEntity {}
impl Cast<dyn EndEventTypeMut> for PartnerEntity {}
impl Cast<dyn EndPointType> for PartnerEntity {}
impl Cast<dyn EndPointTypeMut> for PartnerEntity {}
impl Cast<dyn ErrorType> for PartnerEntity {}
impl Cast<dyn ErrorTypeMut> for PartnerEntity {}
impl Cast<dyn ErrorEventDefinitionType> for PartnerEntity {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn EscalationType> for PartnerEntity {}
impl Cast<dyn EscalationTypeMut> for PartnerEntity {}
impl Cast<dyn EscalationEventDefinitionType> for PartnerEntity {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn EventType> for PartnerEntity {}
impl Cast<dyn EventTypeMut> for PartnerEntity {}
impl Cast<dyn EventBasedGatewayType> for PartnerEntity {}
impl Cast<dyn EventBasedGatewayTypeMut> for PartnerEntity {}
impl Cast<dyn EventDefinitionType> for PartnerEntity {}
impl Cast<dyn EventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn ExclusiveGatewayType> for PartnerEntity {}
impl Cast<dyn ExclusiveGatewayTypeMut> for PartnerEntity {}
impl Cast<dyn ExpressionType> for PartnerEntity {}
impl Cast<dyn ExpressionTypeMut> for PartnerEntity {}
impl Cast<dyn ExtensionType> for PartnerEntity {}
impl Cast<dyn ExtensionTypeMut> for PartnerEntity {}
impl Cast<dyn ExtensionElementsType> for PartnerEntity {}
impl Cast<dyn ExtensionElementsTypeMut> for PartnerEntity {}
impl Cast<dyn FlowElementType> for PartnerEntity {}
impl Cast<dyn FlowElementTypeMut> for PartnerEntity {}
impl Cast<dyn FlowNodeType> for PartnerEntity {}
impl Cast<dyn FlowNodeTypeMut> for PartnerEntity {}
impl Cast<dyn FormalExpressionType> for PartnerEntity {}
impl Cast<dyn FormalExpressionTypeMut> for PartnerEntity {}
impl Cast<dyn GatewayType> for PartnerEntity {}
impl Cast<dyn GatewayTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalBusinessRuleTaskType> for PartnerEntity {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalChoreographyTaskType> for PartnerEntity {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalConversationType> for PartnerEntity {}
impl Cast<dyn GlobalConversationTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalManualTaskType> for PartnerEntity {}
impl Cast<dyn GlobalManualTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalScriptTaskType> for PartnerEntity {}
impl Cast<dyn GlobalScriptTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalTaskType> for PartnerEntity {}
impl Cast<dyn GlobalTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GlobalUserTaskType> for PartnerEntity {}
impl Cast<dyn GlobalUserTaskTypeMut> for PartnerEntity {}
impl Cast<dyn GroupType> for PartnerEntity {}
impl Cast<dyn GroupTypeMut> for PartnerEntity {}
impl Cast<dyn HumanPerformerType> for PartnerEntity {}
impl Cast<dyn HumanPerformerTypeMut> for PartnerEntity {}
impl Cast<dyn ImplicitThrowEventType> for PartnerEntity {}
impl Cast<dyn ImplicitThrowEventTypeMut> for PartnerEntity {}
impl Cast<dyn InclusiveGatewayType> for PartnerEntity {}
impl Cast<dyn InclusiveGatewayTypeMut> for PartnerEntity {}
impl Cast<dyn InputSetType> for PartnerEntity {}
impl Cast<dyn InputSetTypeMut> for PartnerEntity {}
impl Cast<dyn InterfaceType> for PartnerEntity {}
impl Cast<dyn InterfaceTypeMut> for PartnerEntity {}
impl Cast<dyn IntermediateCatchEventType> for PartnerEntity {}
impl Cast<dyn IntermediateCatchEventTypeMut> for PartnerEntity {}
impl Cast<dyn IntermediateThrowEventType> for PartnerEntity {}
impl Cast<dyn IntermediateThrowEventTypeMut> for PartnerEntity {}
impl Cast<dyn InputOutputBindingType> for PartnerEntity {}
impl Cast<dyn InputOutputBindingTypeMut> for PartnerEntity {}
impl Cast<dyn InputOutputSpecificationType> for PartnerEntity {}
impl Cast<dyn InputOutputSpecificationTypeMut> for PartnerEntity {}
impl Cast<dyn ItemDefinitionType> for PartnerEntity {}
impl Cast<dyn ItemDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn LaneType> for PartnerEntity {}
impl Cast<dyn LaneTypeMut> for PartnerEntity {}
impl Cast<dyn LaneSetType> for PartnerEntity {}
impl Cast<dyn LaneSetTypeMut> for PartnerEntity {}
impl Cast<dyn LinkEventDefinitionType> for PartnerEntity {}
impl Cast<dyn LinkEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn LoopCharacteristicsType> for PartnerEntity {}
impl Cast<dyn LoopCharacteristicsTypeMut> for PartnerEntity {}
impl Cast<dyn ManualTaskType> for PartnerEntity {}
impl Cast<dyn ManualTaskTypeMut> for PartnerEntity {}
impl Cast<dyn MessageType> for PartnerEntity {}
impl Cast<dyn MessageTypeMut> for PartnerEntity {}
impl Cast<dyn MessageEventDefinitionType> for PartnerEntity {}
impl Cast<dyn MessageEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn MessageFlowType> for PartnerEntity {}
impl Cast<dyn MessageFlowTypeMut> for PartnerEntity {}
impl Cast<dyn MessageFlowAssociationType> for PartnerEntity {}
impl Cast<dyn MessageFlowAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn MonitoringType> for PartnerEntity {}
impl Cast<dyn MonitoringTypeMut> for PartnerEntity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for PartnerEntity {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for PartnerEntity {}
impl Cast<dyn OperationType> for PartnerEntity {}
impl Cast<dyn OperationTypeMut> for PartnerEntity {}
impl Cast<dyn OutputSetType> for PartnerEntity {}
impl Cast<dyn OutputSetTypeMut> for PartnerEntity {}
impl Cast<dyn ParallelGatewayType> for PartnerEntity {}
impl Cast<dyn ParallelGatewayTypeMut> for PartnerEntity {}
impl Cast<dyn ParticipantType> for PartnerEntity {}
impl Cast<dyn ParticipantTypeMut> for PartnerEntity {}
impl Cast<dyn ParticipantAssociationType> for PartnerEntity {}
impl Cast<dyn ParticipantAssociationTypeMut> for PartnerEntity {}
impl Cast<dyn ParticipantMultiplicityType> for PartnerEntity {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for PartnerEntity {}
impl Cast<dyn PartnerEntityType> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PartnerEntityTypeMut> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PartnerRoleType> for PartnerEntity {}
impl Cast<dyn PartnerRoleTypeMut> for PartnerEntity {}
impl Cast<dyn PerformerType> for PartnerEntity {}
impl Cast<dyn PerformerTypeMut> for PartnerEntity {}
impl Cast<dyn PotentialOwnerType> for PartnerEntity {}
impl Cast<dyn PotentialOwnerTypeMut> for PartnerEntity {}
impl Cast<dyn ProcessType> for PartnerEntity {}
impl Cast<dyn ProcessTypeMut> for PartnerEntity {}
impl Cast<dyn PropertyType> for PartnerEntity {}
impl Cast<dyn PropertyTypeMut> for PartnerEntity {}
impl Cast<dyn ReceiveTaskType> for PartnerEntity {}
impl Cast<dyn ReceiveTaskTypeMut> for PartnerEntity {}
impl Cast<dyn RelationshipType> for PartnerEntity {}
impl Cast<dyn RelationshipTypeMut> for PartnerEntity {}
impl Cast<dyn RenderingType> for PartnerEntity {}
impl Cast<dyn RenderingTypeMut> for PartnerEntity {}
impl Cast<dyn ResourceType> for PartnerEntity {}
impl Cast<dyn ResourceTypeMut> for PartnerEntity {}
impl Cast<dyn ResourceAssignmentExpressionType> for PartnerEntity {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for PartnerEntity {}
impl Cast<dyn ResourceParameterType> for PartnerEntity {}
impl Cast<dyn ResourceParameterTypeMut> for PartnerEntity {}
impl Cast<dyn ResourceParameterBindingType> for PartnerEntity {}
impl Cast<dyn ResourceParameterBindingTypeMut> for PartnerEntity {}
impl Cast<dyn ResourceRoleType> for PartnerEntity {}
impl Cast<dyn ResourceRoleTypeMut> for PartnerEntity {}
impl Cast<dyn RootElementType> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for PartnerEntity {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for PartnerEntity {}
impl Cast<dyn ScriptTaskTypeMut> for PartnerEntity {}
impl Cast<dyn ScriptType> for PartnerEntity {}
impl Cast<dyn ScriptTypeMut> for PartnerEntity {}
impl Cast<dyn SendTaskType> for PartnerEntity {}
impl Cast<dyn SendTaskTypeMut> for PartnerEntity {}
impl Cast<dyn SequenceFlowType> for PartnerEntity {}
impl Cast<dyn SequenceFlowTypeMut> for PartnerEntity {}
impl Cast<dyn ServiceTaskType> for PartnerEntity {}
impl Cast<dyn ServiceTaskTypeMut> for PartnerEntity {}
impl Cast<dyn SignalType> for PartnerEntity {}
impl Cast<dyn SignalTypeMut> for PartnerEntity {}
impl Cast<dyn SignalEventDefinitionType> for PartnerEntity {}
impl Cast<dyn SignalEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn StandardLoopCharacteristicsType> for PartnerEntity {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for PartnerEntity {}
impl Cast<dyn StartEventType> for PartnerEntity {}
impl Cast<dyn StartEventTypeMut> for PartnerEntity {}
impl Cast<dyn SubChoreographyType> for PartnerEntity {}
impl Cast<dyn SubChoreographyTypeMut> for PartnerEntity {}
impl Cast<dyn SubConversationType> for PartnerEntity {}
impl Cast<dyn SubConversationTypeMut> for PartnerEntity {}
impl Cast<dyn SubProcessType> for PartnerEntity {}
impl Cast<dyn SubProcessTypeMut> for PartnerEntity {}
impl Cast<dyn TaskType> for PartnerEntity {}
impl Cast<dyn TaskTypeMut> for PartnerEntity {}
impl Cast<dyn TerminateEventDefinitionType> for PartnerEntity {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn TextAnnotationType> for PartnerEntity {}
impl Cast<dyn TextAnnotationTypeMut> for PartnerEntity {}
impl Cast<dyn TextType> for PartnerEntity {}
impl Cast<dyn TextTypeMut> for PartnerEntity {}
impl Cast<dyn ThrowEventType> for PartnerEntity {}
impl Cast<dyn ThrowEventTypeMut> for PartnerEntity {}
impl Cast<dyn TimerEventDefinitionType> for PartnerEntity {}
impl Cast<dyn TimerEventDefinitionTypeMut> for PartnerEntity {}
impl Cast<dyn TransactionType> for PartnerEntity {}
impl Cast<dyn TransactionTypeMut> for PartnerEntity {}
impl Cast<dyn UserTaskType> for PartnerEntity {}
impl Cast<dyn UserTaskTypeMut> for PartnerEntity {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:partnerRole")]
pub struct PartnerRole {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("PartnerRoleType",rg*="name","PartnerRoleTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("PartnerRoleType",rg*="participant_refs","PartnerRoleTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
}
impl DocumentElement for PartnerRole {
    fn element(&self) -> Element {
        Element::PartnerRole
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for PartnerRole {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for PartnerRole {}
impl RootElementTypeMut for PartnerRole {}
//

/// Access to `partnerRole`
pub trait PartnerRoleType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `participantRef` child
    fn participant_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(PartnerRoleType);
impl_downcast!(PartnerRoleType);
/// Mutable access to `partnerRole`
pub trait PartnerRoleTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + PartnerRoleType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `participantRef` child
    fn participant_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `participantRef` child
    fn set_participant_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(PartnerRoleTypeMut);
impl_downcast!(PartnerRoleTypeMut);
impl Cast<dyn DefinitionsType> for PartnerRole {}
impl Cast<dyn DefinitionsTypeMut> for PartnerRole {}
impl Cast<dyn ImportType> for PartnerRole {}
impl Cast<dyn ImportTypeMut> for PartnerRole {}
impl Cast<dyn ActivityType> for PartnerRole {}
impl Cast<dyn ActivityTypeMut> for PartnerRole {}
impl Cast<dyn AdHocSubProcessType> for PartnerRole {}
impl Cast<dyn AdHocSubProcessTypeMut> for PartnerRole {}
impl Cast<dyn ArtifactType> for PartnerRole {}
impl Cast<dyn ArtifactTypeMut> for PartnerRole {}
impl Cast<dyn AssignmentType> for PartnerRole {}
impl Cast<dyn AssignmentTypeMut> for PartnerRole {}
impl Cast<dyn AssociationType> for PartnerRole {}
impl Cast<dyn AssociationTypeMut> for PartnerRole {}
impl Cast<dyn AuditingType> for PartnerRole {}
impl Cast<dyn AuditingTypeMut> for PartnerRole {}
impl Cast<dyn BaseElementType> for PartnerRole {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for PartnerRole {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for PartnerRole {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for PartnerRole {}
impl Cast<dyn BoundaryEventType> for PartnerRole {}
impl Cast<dyn BoundaryEventTypeMut> for PartnerRole {}
impl Cast<dyn BusinessRuleTaskType> for PartnerRole {}
impl Cast<dyn BusinessRuleTaskTypeMut> for PartnerRole {}
impl Cast<dyn CallableElementType> for PartnerRole {}
impl Cast<dyn CallableElementTypeMut> for PartnerRole {}
impl Cast<dyn CallActivityType> for PartnerRole {}
impl Cast<dyn CallActivityTypeMut> for PartnerRole {}
impl Cast<dyn CallChoreographyType> for PartnerRole {}
impl Cast<dyn CallChoreographyTypeMut> for PartnerRole {}
impl Cast<dyn CallConversationType> for PartnerRole {}
impl Cast<dyn CallConversationTypeMut> for PartnerRole {}
impl Cast<dyn CancelEventDefinitionType> for PartnerRole {}
impl Cast<dyn CancelEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn CatchEventType> for PartnerRole {}
impl Cast<dyn CatchEventTypeMut> for PartnerRole {}
impl Cast<dyn CategoryType> for PartnerRole {}
impl Cast<dyn CategoryTypeMut> for PartnerRole {}
impl Cast<dyn CategoryValueType> for PartnerRole {}
impl Cast<dyn CategoryValueTypeMut> for PartnerRole {}
impl Cast<dyn ChoreographyType> for PartnerRole {}
impl Cast<dyn ChoreographyTypeMut> for PartnerRole {}
impl Cast<dyn ChoreographyActivityType> for PartnerRole {}
impl Cast<dyn ChoreographyActivityTypeMut> for PartnerRole {}
impl Cast<dyn ChoreographyTaskType> for PartnerRole {}
impl Cast<dyn ChoreographyTaskTypeMut> for PartnerRole {}
impl Cast<dyn CollaborationType> for PartnerRole {}
impl Cast<dyn CollaborationTypeMut> for PartnerRole {}
impl Cast<dyn CompensateEventDefinitionType> for PartnerRole {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn ComplexBehaviorDefinitionType> for PartnerRole {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn ComplexGatewayType> for PartnerRole {}
impl Cast<dyn ComplexGatewayTypeMut> for PartnerRole {}
impl Cast<dyn ConditionalEventDefinitionType> for PartnerRole {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn ConversationType> for PartnerRole {}
impl Cast<dyn ConversationTypeMut> for PartnerRole {}
impl Cast<dyn ConversationAssociationType> for PartnerRole {}
impl Cast<dyn ConversationAssociationTypeMut> for PartnerRole {}
impl Cast<dyn ConversationLinkType> for PartnerRole {}
impl Cast<dyn ConversationLinkTypeMut> for PartnerRole {}
impl Cast<dyn ConversationNodeType> for PartnerRole {}
impl Cast<dyn ConversationNodeTypeMut> for PartnerRole {}
impl Cast<dyn CorrelationKeyType> for PartnerRole {}
impl Cast<dyn CorrelationKeyTypeMut> for PartnerRole {}
impl Cast<dyn CorrelationPropertyType> for PartnerRole {}
impl Cast<dyn CorrelationPropertyTypeMut> for PartnerRole {}
impl Cast<dyn CorrelationPropertyBindingType> for PartnerRole {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for PartnerRole {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for PartnerRole {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for PartnerRole {}
impl Cast<dyn CorrelationSubscriptionType> for PartnerRole {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for PartnerRole {}
impl Cast<dyn DataAssociationType> for PartnerRole {}
impl Cast<dyn DataAssociationTypeMut> for PartnerRole {}
impl Cast<dyn DataInputType> for PartnerRole {}
impl Cast<dyn DataInputTypeMut> for PartnerRole {}
impl Cast<dyn DataInputAssociationType> for PartnerRole {}
impl Cast<dyn DataInputAssociationTypeMut> for PartnerRole {}
impl Cast<dyn DataObjectType> for PartnerRole {}
impl Cast<dyn DataObjectTypeMut> for PartnerRole {}
impl Cast<dyn DataObjectReferenceType> for PartnerRole {}
impl Cast<dyn DataObjectReferenceTypeMut> for PartnerRole {}
impl Cast<dyn DataOutputType> for PartnerRole {}
impl Cast<dyn DataOutputTypeMut> for PartnerRole {}
impl Cast<dyn DataOutputAssociationType> for PartnerRole {}
impl Cast<dyn DataOutputAssociationTypeMut> for PartnerRole {}
impl Cast<dyn DataStateType> for PartnerRole {}
impl Cast<dyn DataStateTypeMut> for PartnerRole {}
impl Cast<dyn DataStoreType> for PartnerRole {}
impl Cast<dyn DataStoreTypeMut> for PartnerRole {}
impl Cast<dyn DataStoreReferenceType> for PartnerRole {}
impl Cast<dyn DataStoreReferenceTypeMut> for PartnerRole {}
impl Cast<dyn DocumentationType> for PartnerRole {}
impl Cast<dyn DocumentationTypeMut> for PartnerRole {}
impl Cast<dyn EndEventType> for PartnerRole {}
impl Cast<dyn EndEventTypeMut> for PartnerRole {}
impl Cast<dyn EndPointType> for PartnerRole {}
impl Cast<dyn EndPointTypeMut> for PartnerRole {}
impl Cast<dyn ErrorType> for PartnerRole {}
impl Cast<dyn ErrorTypeMut> for PartnerRole {}
impl Cast<dyn ErrorEventDefinitionType> for PartnerRole {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn EscalationType> for PartnerRole {}
impl Cast<dyn EscalationTypeMut> for PartnerRole {}
impl Cast<dyn EscalationEventDefinitionType> for PartnerRole {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn EventType> for PartnerRole {}
impl Cast<dyn EventTypeMut> for PartnerRole {}
impl Cast<dyn EventBasedGatewayType> for PartnerRole {}
impl Cast<dyn EventBasedGatewayTypeMut> for PartnerRole {}
impl Cast<dyn EventDefinitionType> for PartnerRole {}
impl Cast<dyn EventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn ExclusiveGatewayType> for PartnerRole {}
impl Cast<dyn ExclusiveGatewayTypeMut> for PartnerRole {}
impl Cast<dyn ExpressionType> for PartnerRole {}
impl Cast<dyn ExpressionTypeMut> for PartnerRole {}
impl Cast<dyn ExtensionType> for PartnerRole {}
impl Cast<dyn ExtensionTypeMut> for PartnerRole {}
impl Cast<dyn ExtensionElementsType> for PartnerRole {}
impl Cast<dyn ExtensionElementsTypeMut> for PartnerRole {}
impl Cast<dyn FlowElementType> for PartnerRole {}
impl Cast<dyn FlowElementTypeMut> for PartnerRole {}
impl Cast<dyn FlowNodeType> for PartnerRole {}
impl Cast<dyn FlowNodeTypeMut> for PartnerRole {}
impl Cast<dyn FormalExpressionType> for PartnerRole {}
impl Cast<dyn FormalExpressionTypeMut> for PartnerRole {}
impl Cast<dyn GatewayType> for PartnerRole {}
impl Cast<dyn GatewayTypeMut> for PartnerRole {}
impl Cast<dyn GlobalBusinessRuleTaskType> for PartnerRole {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for PartnerRole {}
impl Cast<dyn GlobalChoreographyTaskType> for PartnerRole {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for PartnerRole {}
impl Cast<dyn GlobalConversationType> for PartnerRole {}
impl Cast<dyn GlobalConversationTypeMut> for PartnerRole {}
impl Cast<dyn GlobalManualTaskType> for PartnerRole {}
impl Cast<dyn GlobalManualTaskTypeMut> for PartnerRole {}
impl Cast<dyn GlobalScriptTaskType> for PartnerRole {}
impl Cast<dyn GlobalScriptTaskTypeMut> for PartnerRole {}
impl Cast<dyn GlobalTaskType> for PartnerRole {}
impl Cast<dyn GlobalTaskTypeMut> for PartnerRole {}
impl Cast<dyn GlobalUserTaskType> for PartnerRole {}
impl Cast<dyn GlobalUserTaskTypeMut> for PartnerRole {}
impl Cast<dyn GroupType> for PartnerRole {}
impl Cast<dyn GroupTypeMut> for PartnerRole {}
impl Cast<dyn HumanPerformerType> for PartnerRole {}
impl Cast<dyn HumanPerformerTypeMut> for PartnerRole {}
impl Cast<dyn ImplicitThrowEventType> for PartnerRole {}
impl Cast<dyn ImplicitThrowEventTypeMut> for PartnerRole {}
impl Cast<dyn InclusiveGatewayType> for PartnerRole {}
impl Cast<dyn InclusiveGatewayTypeMut> for PartnerRole {}
impl Cast<dyn InputSetType> for PartnerRole {}
impl Cast<dyn InputSetTypeMut> for PartnerRole {}
impl Cast<dyn InterfaceType> for PartnerRole {}
impl Cast<dyn InterfaceTypeMut> for PartnerRole {}
impl Cast<dyn IntermediateCatchEventType> for PartnerRole {}
impl Cast<dyn IntermediateCatchEventTypeMut> for PartnerRole {}
impl Cast<dyn IntermediateThrowEventType> for PartnerRole {}
impl Cast<dyn IntermediateThrowEventTypeMut> for PartnerRole {}
impl Cast<dyn InputOutputBindingType> for PartnerRole {}
impl Cast<dyn InputOutputBindingTypeMut> for PartnerRole {}
impl Cast<dyn InputOutputSpecificationType> for PartnerRole {}
impl Cast<dyn InputOutputSpecificationTypeMut> for PartnerRole {}
impl Cast<dyn ItemDefinitionType> for PartnerRole {}
impl Cast<dyn ItemDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn LaneType> for PartnerRole {}
impl Cast<dyn LaneTypeMut> for PartnerRole {}
impl Cast<dyn LaneSetType> for PartnerRole {}
impl Cast<dyn LaneSetTypeMut> for PartnerRole {}
impl Cast<dyn LinkEventDefinitionType> for PartnerRole {}
impl Cast<dyn LinkEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn LoopCharacteristicsType> for PartnerRole {}
impl Cast<dyn LoopCharacteristicsTypeMut> for PartnerRole {}
impl Cast<dyn ManualTaskType> for PartnerRole {}
impl Cast<dyn ManualTaskTypeMut> for PartnerRole {}
impl Cast<dyn MessageType> for PartnerRole {}
impl Cast<dyn MessageTypeMut> for PartnerRole {}
impl Cast<dyn MessageEventDefinitionType> for PartnerRole {}
impl Cast<dyn MessageEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn MessageFlowType> for PartnerRole {}
impl Cast<dyn MessageFlowTypeMut> for PartnerRole {}
impl Cast<dyn MessageFlowAssociationType> for PartnerRole {}
impl Cast<dyn MessageFlowAssociationTypeMut> for PartnerRole {}
impl Cast<dyn MonitoringType> for PartnerRole {}
impl Cast<dyn MonitoringTypeMut> for PartnerRole {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for PartnerRole {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for PartnerRole {}
impl Cast<dyn OperationType> for PartnerRole {}
impl Cast<dyn OperationTypeMut> for PartnerRole {}
impl Cast<dyn OutputSetType> for PartnerRole {}
impl Cast<dyn OutputSetTypeMut> for PartnerRole {}
impl Cast<dyn ParallelGatewayType> for PartnerRole {}
impl Cast<dyn ParallelGatewayTypeMut> for PartnerRole {}
impl Cast<dyn ParticipantType> for PartnerRole {}
impl Cast<dyn ParticipantTypeMut> for PartnerRole {}
impl Cast<dyn ParticipantAssociationType> for PartnerRole {}
impl Cast<dyn ParticipantAssociationTypeMut> for PartnerRole {}
impl Cast<dyn ParticipantMultiplicityType> for PartnerRole {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for PartnerRole {}
impl Cast<dyn PartnerEntityType> for PartnerRole {}
impl Cast<dyn PartnerEntityTypeMut> for PartnerRole {}
impl Cast<dyn PartnerRoleType> for PartnerRole {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PartnerRoleTypeMut> for PartnerRole {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PerformerType> for PartnerRole {}
impl Cast<dyn PerformerTypeMut> for PartnerRole {}
impl Cast<dyn PotentialOwnerType> for PartnerRole {}
impl Cast<dyn PotentialOwnerTypeMut> for PartnerRole {}
impl Cast<dyn ProcessType> for PartnerRole {}
impl Cast<dyn ProcessTypeMut> for PartnerRole {}
impl Cast<dyn PropertyType> for PartnerRole {}
impl Cast<dyn PropertyTypeMut> for PartnerRole {}
impl Cast<dyn ReceiveTaskType> for PartnerRole {}
impl Cast<dyn ReceiveTaskTypeMut> for PartnerRole {}
impl Cast<dyn RelationshipType> for PartnerRole {}
impl Cast<dyn RelationshipTypeMut> for PartnerRole {}
impl Cast<dyn RenderingType> for PartnerRole {}
impl Cast<dyn RenderingTypeMut> for PartnerRole {}
impl Cast<dyn ResourceType> for PartnerRole {}
impl Cast<dyn ResourceTypeMut> for PartnerRole {}
impl Cast<dyn ResourceAssignmentExpressionType> for PartnerRole {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for PartnerRole {}
impl Cast<dyn ResourceParameterType> for PartnerRole {}
impl Cast<dyn ResourceParameterTypeMut> for PartnerRole {}
impl Cast<dyn ResourceParameterBindingType> for PartnerRole {}
impl Cast<dyn ResourceParameterBindingTypeMut> for PartnerRole {}
impl Cast<dyn ResourceRoleType> for PartnerRole {}
impl Cast<dyn ResourceRoleTypeMut> for PartnerRole {}
impl Cast<dyn RootElementType> for PartnerRole {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for PartnerRole {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for PartnerRole {}
impl Cast<dyn ScriptTaskTypeMut> for PartnerRole {}
impl Cast<dyn ScriptType> for PartnerRole {}
impl Cast<dyn ScriptTypeMut> for PartnerRole {}
impl Cast<dyn SendTaskType> for PartnerRole {}
impl Cast<dyn SendTaskTypeMut> for PartnerRole {}
impl Cast<dyn SequenceFlowType> for PartnerRole {}
impl Cast<dyn SequenceFlowTypeMut> for PartnerRole {}
impl Cast<dyn ServiceTaskType> for PartnerRole {}
impl Cast<dyn ServiceTaskTypeMut> for PartnerRole {}
impl Cast<dyn SignalType> for PartnerRole {}
impl Cast<dyn SignalTypeMut> for PartnerRole {}
impl Cast<dyn SignalEventDefinitionType> for PartnerRole {}
impl Cast<dyn SignalEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn StandardLoopCharacteristicsType> for PartnerRole {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for PartnerRole {}
impl Cast<dyn StartEventType> for PartnerRole {}
impl Cast<dyn StartEventTypeMut> for PartnerRole {}
impl Cast<dyn SubChoreographyType> for PartnerRole {}
impl Cast<dyn SubChoreographyTypeMut> for PartnerRole {}
impl Cast<dyn SubConversationType> for PartnerRole {}
impl Cast<dyn SubConversationTypeMut> for PartnerRole {}
impl Cast<dyn SubProcessType> for PartnerRole {}
impl Cast<dyn SubProcessTypeMut> for PartnerRole {}
impl Cast<dyn TaskType> for PartnerRole {}
impl Cast<dyn TaskTypeMut> for PartnerRole {}
impl Cast<dyn TerminateEventDefinitionType> for PartnerRole {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn TextAnnotationType> for PartnerRole {}
impl Cast<dyn TextAnnotationTypeMut> for PartnerRole {}
impl Cast<dyn TextType> for PartnerRole {}
impl Cast<dyn TextTypeMut> for PartnerRole {}
impl Cast<dyn ThrowEventType> for PartnerRole {}
impl Cast<dyn ThrowEventTypeMut> for PartnerRole {}
impl Cast<dyn TimerEventDefinitionType> for PartnerRole {}
impl Cast<dyn TimerEventDefinitionTypeMut> for PartnerRole {}
impl Cast<dyn TransactionType> for PartnerRole {}
impl Cast<dyn TransactionTypeMut> for PartnerRole {}
impl Cast<dyn UserTaskType> for PartnerRole {}
impl Cast<dyn UserTaskTypeMut> for PartnerRole {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:performer")]
pub struct Performer {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceRoleType",rg*="name","ResourceRoleTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:resourceRef")]
    #[tia("ResourceRoleType",rg*="resource_ref","ResourceRoleTypeMut",s,rmg*="resource_ref_mut")]
    pub resource_ref: String,
    #[xml(child = "bpmn:resourceParameterBinding")]
    #[tia("ResourceRoleType",rg*="resource_parameter_bindings","ResourceRoleTypeMut",s,rmg*="resource_parameter_bindings_mut")]
    pub resource_parameter_bindings: Vec<ResourceParameterBinding>,
    #[xml(child = "bpmn:resourceAssignmentExpression")]
    #[tia("ResourceRoleType",rg*="resource_assignment_expression","ResourceRoleTypeMut",s,rmg*="resource_assignment_expression_mut")]
    pub resource_assignment_expression: Option<ResourceAssignmentExpression>,
}
impl DocumentElement for Performer {
    fn element(&self) -> Element {
        Element::Performer
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Performer {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl PerformerType for Performer {}
impl PerformerTypeMut for Performer {}
//

/// Access to `performer`
pub trait PerformerType: ResourceRoleType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(PerformerType);
impl_downcast!(PerformerType);
/// Mutable access to `performer`
pub trait PerformerTypeMut:
    ResourceRoleTypeMut + Downcast + Debug + Send + DynClone + PerformerType
{
}
dyn_clone::clone_trait_object!(PerformerTypeMut);
impl_downcast!(PerformerTypeMut);
impl Cast<dyn DefinitionsType> for Performer {}
impl Cast<dyn DefinitionsTypeMut> for Performer {}
impl Cast<dyn ImportType> for Performer {}
impl Cast<dyn ImportTypeMut> for Performer {}
impl Cast<dyn ActivityType> for Performer {}
impl Cast<dyn ActivityTypeMut> for Performer {}
impl Cast<dyn AdHocSubProcessType> for Performer {}
impl Cast<dyn AdHocSubProcessTypeMut> for Performer {}
impl Cast<dyn ArtifactType> for Performer {}
impl Cast<dyn ArtifactTypeMut> for Performer {}
impl Cast<dyn AssignmentType> for Performer {}
impl Cast<dyn AssignmentTypeMut> for Performer {}
impl Cast<dyn AssociationType> for Performer {}
impl Cast<dyn AssociationTypeMut> for Performer {}
impl Cast<dyn AuditingType> for Performer {}
impl Cast<dyn AuditingTypeMut> for Performer {}
impl Cast<dyn BaseElementType> for Performer {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Performer {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Performer {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Performer {}
impl Cast<dyn BoundaryEventType> for Performer {}
impl Cast<dyn BoundaryEventTypeMut> for Performer {}
impl Cast<dyn BusinessRuleTaskType> for Performer {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Performer {}
impl Cast<dyn CallableElementType> for Performer {}
impl Cast<dyn CallableElementTypeMut> for Performer {}
impl Cast<dyn CallActivityType> for Performer {}
impl Cast<dyn CallActivityTypeMut> for Performer {}
impl Cast<dyn CallChoreographyType> for Performer {}
impl Cast<dyn CallChoreographyTypeMut> for Performer {}
impl Cast<dyn CallConversationType> for Performer {}
impl Cast<dyn CallConversationTypeMut> for Performer {}
impl Cast<dyn CancelEventDefinitionType> for Performer {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Performer {}
impl Cast<dyn CatchEventType> for Performer {}
impl Cast<dyn CatchEventTypeMut> for Performer {}
impl Cast<dyn CategoryType> for Performer {}
impl Cast<dyn CategoryTypeMut> for Performer {}
impl Cast<dyn CategoryValueType> for Performer {}
impl Cast<dyn CategoryValueTypeMut> for Performer {}
impl Cast<dyn ChoreographyType> for Performer {}
impl Cast<dyn ChoreographyTypeMut> for Performer {}
impl Cast<dyn ChoreographyActivityType> for Performer {}
impl Cast<dyn ChoreographyActivityTypeMut> for Performer {}
impl Cast<dyn ChoreographyTaskType> for Performer {}
impl Cast<dyn ChoreographyTaskTypeMut> for Performer {}
impl Cast<dyn CollaborationType> for Performer {}
impl Cast<dyn CollaborationTypeMut> for Performer {}
impl Cast<dyn CompensateEventDefinitionType> for Performer {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Performer {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Performer {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Performer {}
impl Cast<dyn ComplexGatewayType> for Performer {}
impl Cast<dyn ComplexGatewayTypeMut> for Performer {}
impl Cast<dyn ConditionalEventDefinitionType> for Performer {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Performer {}
impl Cast<dyn ConversationType> for Performer {}
impl Cast<dyn ConversationTypeMut> for Performer {}
impl Cast<dyn ConversationAssociationType> for Performer {}
impl Cast<dyn ConversationAssociationTypeMut> for Performer {}
impl Cast<dyn ConversationLinkType> for Performer {}
impl Cast<dyn ConversationLinkTypeMut> for Performer {}
impl Cast<dyn ConversationNodeType> for Performer {}
impl Cast<dyn ConversationNodeTypeMut> for Performer {}
impl Cast<dyn CorrelationKeyType> for Performer {}
impl Cast<dyn CorrelationKeyTypeMut> for Performer {}
impl Cast<dyn CorrelationPropertyType> for Performer {}
impl Cast<dyn CorrelationPropertyTypeMut> for Performer {}
impl Cast<dyn CorrelationPropertyBindingType> for Performer {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Performer {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Performer {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Performer {}
impl Cast<dyn CorrelationSubscriptionType> for Performer {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Performer {}
impl Cast<dyn DataAssociationType> for Performer {}
impl Cast<dyn DataAssociationTypeMut> for Performer {}
impl Cast<dyn DataInputType> for Performer {}
impl Cast<dyn DataInputTypeMut> for Performer {}
impl Cast<dyn DataInputAssociationType> for Performer {}
impl Cast<dyn DataInputAssociationTypeMut> for Performer {}
impl Cast<dyn DataObjectType> for Performer {}
impl Cast<dyn DataObjectTypeMut> for Performer {}
impl Cast<dyn DataObjectReferenceType> for Performer {}
impl Cast<dyn DataObjectReferenceTypeMut> for Performer {}
impl Cast<dyn DataOutputType> for Performer {}
impl Cast<dyn DataOutputTypeMut> for Performer {}
impl Cast<dyn DataOutputAssociationType> for Performer {}
impl Cast<dyn DataOutputAssociationTypeMut> for Performer {}
impl Cast<dyn DataStateType> for Performer {}
impl Cast<dyn DataStateTypeMut> for Performer {}
impl Cast<dyn DataStoreType> for Performer {}
impl Cast<dyn DataStoreTypeMut> for Performer {}
impl Cast<dyn DataStoreReferenceType> for Performer {}
impl Cast<dyn DataStoreReferenceTypeMut> for Performer {}
impl Cast<dyn DocumentationType> for Performer {}
impl Cast<dyn DocumentationTypeMut> for Performer {}
impl Cast<dyn EndEventType> for Performer {}
impl Cast<dyn EndEventTypeMut> for Performer {}
impl Cast<dyn EndPointType> for Performer {}
impl Cast<dyn EndPointTypeMut> for Performer {}
impl Cast<dyn ErrorType> for Performer {}
impl Cast<dyn ErrorTypeMut> for Performer {}
impl Cast<dyn ErrorEventDefinitionType> for Performer {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Performer {}
impl Cast<dyn EscalationType> for Performer {}
impl Cast<dyn EscalationTypeMut> for Performer {}
impl Cast<dyn EscalationEventDefinitionType> for Performer {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Performer {}
impl Cast<dyn EventType> for Performer {}
impl Cast<dyn EventTypeMut> for Performer {}
impl Cast<dyn EventBasedGatewayType> for Performer {}
impl Cast<dyn EventBasedGatewayTypeMut> for Performer {}
impl Cast<dyn EventDefinitionType> for Performer {}
impl Cast<dyn EventDefinitionTypeMut> for Performer {}
impl Cast<dyn ExclusiveGatewayType> for Performer {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Performer {}
impl Cast<dyn ExpressionType> for Performer {}
impl Cast<dyn ExpressionTypeMut> for Performer {}
impl Cast<dyn ExtensionType> for Performer {}
impl Cast<dyn ExtensionTypeMut> for Performer {}
impl Cast<dyn ExtensionElementsType> for Performer {}
impl Cast<dyn ExtensionElementsTypeMut> for Performer {}
impl Cast<dyn FlowElementType> for Performer {}
impl Cast<dyn FlowElementTypeMut> for Performer {}
impl Cast<dyn FlowNodeType> for Performer {}
impl Cast<dyn FlowNodeTypeMut> for Performer {}
impl Cast<dyn FormalExpressionType> for Performer {}
impl Cast<dyn FormalExpressionTypeMut> for Performer {}
impl Cast<dyn GatewayType> for Performer {}
impl Cast<dyn GatewayTypeMut> for Performer {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Performer {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Performer {}
impl Cast<dyn GlobalChoreographyTaskType> for Performer {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Performer {}
impl Cast<dyn GlobalConversationType> for Performer {}
impl Cast<dyn GlobalConversationTypeMut> for Performer {}
impl Cast<dyn GlobalManualTaskType> for Performer {}
impl Cast<dyn GlobalManualTaskTypeMut> for Performer {}
impl Cast<dyn GlobalScriptTaskType> for Performer {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Performer {}
impl Cast<dyn GlobalTaskType> for Performer {}
impl Cast<dyn GlobalTaskTypeMut> for Performer {}
impl Cast<dyn GlobalUserTaskType> for Performer {}
impl Cast<dyn GlobalUserTaskTypeMut> for Performer {}
impl Cast<dyn GroupType> for Performer {}
impl Cast<dyn GroupTypeMut> for Performer {}
impl Cast<dyn HumanPerformerType> for Performer {}
impl Cast<dyn HumanPerformerTypeMut> for Performer {}
impl Cast<dyn ImplicitThrowEventType> for Performer {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Performer {}
impl Cast<dyn InclusiveGatewayType> for Performer {}
impl Cast<dyn InclusiveGatewayTypeMut> for Performer {}
impl Cast<dyn InputSetType> for Performer {}
impl Cast<dyn InputSetTypeMut> for Performer {}
impl Cast<dyn InterfaceType> for Performer {}
impl Cast<dyn InterfaceTypeMut> for Performer {}
impl Cast<dyn IntermediateCatchEventType> for Performer {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Performer {}
impl Cast<dyn IntermediateThrowEventType> for Performer {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Performer {}
impl Cast<dyn InputOutputBindingType> for Performer {}
impl Cast<dyn InputOutputBindingTypeMut> for Performer {}
impl Cast<dyn InputOutputSpecificationType> for Performer {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Performer {}
impl Cast<dyn ItemDefinitionType> for Performer {}
impl Cast<dyn ItemDefinitionTypeMut> for Performer {}
impl Cast<dyn LaneType> for Performer {}
impl Cast<dyn LaneTypeMut> for Performer {}
impl Cast<dyn LaneSetType> for Performer {}
impl Cast<dyn LaneSetTypeMut> for Performer {}
impl Cast<dyn LinkEventDefinitionType> for Performer {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Performer {}
impl Cast<dyn LoopCharacteristicsType> for Performer {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Performer {}
impl Cast<dyn ManualTaskType> for Performer {}
impl Cast<dyn ManualTaskTypeMut> for Performer {}
impl Cast<dyn MessageType> for Performer {}
impl Cast<dyn MessageTypeMut> for Performer {}
impl Cast<dyn MessageEventDefinitionType> for Performer {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Performer {}
impl Cast<dyn MessageFlowType> for Performer {}
impl Cast<dyn MessageFlowTypeMut> for Performer {}
impl Cast<dyn MessageFlowAssociationType> for Performer {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Performer {}
impl Cast<dyn MonitoringType> for Performer {}
impl Cast<dyn MonitoringTypeMut> for Performer {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Performer {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Performer {}
impl Cast<dyn OperationType> for Performer {}
impl Cast<dyn OperationTypeMut> for Performer {}
impl Cast<dyn OutputSetType> for Performer {}
impl Cast<dyn OutputSetTypeMut> for Performer {}
impl Cast<dyn ParallelGatewayType> for Performer {}
impl Cast<dyn ParallelGatewayTypeMut> for Performer {}
impl Cast<dyn ParticipantType> for Performer {}
impl Cast<dyn ParticipantTypeMut> for Performer {}
impl Cast<dyn ParticipantAssociationType> for Performer {}
impl Cast<dyn ParticipantAssociationTypeMut> for Performer {}
impl Cast<dyn ParticipantMultiplicityType> for Performer {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Performer {}
impl Cast<dyn PartnerEntityType> for Performer {}
impl Cast<dyn PartnerEntityTypeMut> for Performer {}
impl Cast<dyn PartnerRoleType> for Performer {}
impl Cast<dyn PartnerRoleTypeMut> for Performer {}
impl Cast<dyn PerformerType> for Performer {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PerformerTypeMut> for Performer {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PotentialOwnerType> for Performer {}
impl Cast<dyn PotentialOwnerTypeMut> for Performer {}
impl Cast<dyn ProcessType> for Performer {}
impl Cast<dyn ProcessTypeMut> for Performer {}
impl Cast<dyn PropertyType> for Performer {}
impl Cast<dyn PropertyTypeMut> for Performer {}
impl Cast<dyn ReceiveTaskType> for Performer {}
impl Cast<dyn ReceiveTaskTypeMut> for Performer {}
impl Cast<dyn RelationshipType> for Performer {}
impl Cast<dyn RelationshipTypeMut> for Performer {}
impl Cast<dyn RenderingType> for Performer {}
impl Cast<dyn RenderingTypeMut> for Performer {}
impl Cast<dyn ResourceType> for Performer {}
impl Cast<dyn ResourceTypeMut> for Performer {}
impl Cast<dyn ResourceAssignmentExpressionType> for Performer {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Performer {}
impl Cast<dyn ResourceParameterType> for Performer {}
impl Cast<dyn ResourceParameterTypeMut> for Performer {}
impl Cast<dyn ResourceParameterBindingType> for Performer {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Performer {}
impl Cast<dyn ResourceRoleType> for Performer {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceRoleTypeMut> for Performer {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementType> for Performer {}
impl Cast<dyn RootElementTypeMut> for Performer {}
impl Cast<dyn ScriptTaskType> for Performer {}
impl Cast<dyn ScriptTaskTypeMut> for Performer {}
impl Cast<dyn ScriptType> for Performer {}
impl Cast<dyn ScriptTypeMut> for Performer {}
impl Cast<dyn SendTaskType> for Performer {}
impl Cast<dyn SendTaskTypeMut> for Performer {}
impl Cast<dyn SequenceFlowType> for Performer {}
impl Cast<dyn SequenceFlowTypeMut> for Performer {}
impl Cast<dyn ServiceTaskType> for Performer {}
impl Cast<dyn ServiceTaskTypeMut> for Performer {}
impl Cast<dyn SignalType> for Performer {}
impl Cast<dyn SignalTypeMut> for Performer {}
impl Cast<dyn SignalEventDefinitionType> for Performer {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Performer {}
impl Cast<dyn StandardLoopCharacteristicsType> for Performer {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Performer {}
impl Cast<dyn StartEventType> for Performer {}
impl Cast<dyn StartEventTypeMut> for Performer {}
impl Cast<dyn SubChoreographyType> for Performer {}
impl Cast<dyn SubChoreographyTypeMut> for Performer {}
impl Cast<dyn SubConversationType> for Performer {}
impl Cast<dyn SubConversationTypeMut> for Performer {}
impl Cast<dyn SubProcessType> for Performer {}
impl Cast<dyn SubProcessTypeMut> for Performer {}
impl Cast<dyn TaskType> for Performer {}
impl Cast<dyn TaskTypeMut> for Performer {}
impl Cast<dyn TerminateEventDefinitionType> for Performer {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Performer {}
impl Cast<dyn TextAnnotationType> for Performer {}
impl Cast<dyn TextAnnotationTypeMut> for Performer {}
impl Cast<dyn TextType> for Performer {}
impl Cast<dyn TextTypeMut> for Performer {}
impl Cast<dyn ThrowEventType> for Performer {}
impl Cast<dyn ThrowEventTypeMut> for Performer {}
impl Cast<dyn TimerEventDefinitionType> for Performer {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Performer {}
impl Cast<dyn TransactionType> for Performer {}
impl Cast<dyn TransactionTypeMut> for Performer {}
impl Cast<dyn UserTaskType> for Performer {}
impl Cast<dyn UserTaskTypeMut> for Performer {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:potentialOwner")]
pub struct PotentialOwner {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceRoleType",rg*="name","ResourceRoleTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:resourceRef")]
    #[tia("ResourceRoleType",rg*="resource_ref","ResourceRoleTypeMut",s,rmg*="resource_ref_mut")]
    pub resource_ref: String,
    #[xml(child = "bpmn:resourceParameterBinding")]
    #[tia("ResourceRoleType",rg*="resource_parameter_bindings","ResourceRoleTypeMut",s,rmg*="resource_parameter_bindings_mut")]
    pub resource_parameter_bindings: Vec<ResourceParameterBinding>,
    #[xml(child = "bpmn:resourceAssignmentExpression")]
    #[tia("ResourceRoleType",rg*="resource_assignment_expression","ResourceRoleTypeMut",s,rmg*="resource_assignment_expression_mut")]
    pub resource_assignment_expression: Option<ResourceAssignmentExpression>,
}
impl DocumentElement for PotentialOwner {
    fn element(&self) -> Element {
        Element::PotentialOwner
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for PotentialOwner {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl PotentialOwnerType for PotentialOwner {}
impl PotentialOwnerTypeMut for PotentialOwner {}
impl HumanPerformerType for PotentialOwner {}
impl HumanPerformerTypeMut for PotentialOwner {}
impl PerformerType for PotentialOwner {}
impl PerformerTypeMut for PotentialOwner {}
//

/// Access to `potentialOwner`
pub trait PotentialOwnerType: HumanPerformerType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(PotentialOwnerType);
impl_downcast!(PotentialOwnerType);
/// Mutable access to `potentialOwner`
pub trait PotentialOwnerTypeMut:
    HumanPerformerTypeMut + Downcast + Debug + Send + DynClone + PotentialOwnerType
{
}
dyn_clone::clone_trait_object!(PotentialOwnerTypeMut);
impl_downcast!(PotentialOwnerTypeMut);
impl Cast<dyn DefinitionsType> for PotentialOwner {}
impl Cast<dyn DefinitionsTypeMut> for PotentialOwner {}
impl Cast<dyn ImportType> for PotentialOwner {}
impl Cast<dyn ImportTypeMut> for PotentialOwner {}
impl Cast<dyn ActivityType> for PotentialOwner {}
impl Cast<dyn ActivityTypeMut> for PotentialOwner {}
impl Cast<dyn AdHocSubProcessType> for PotentialOwner {}
impl Cast<dyn AdHocSubProcessTypeMut> for PotentialOwner {}
impl Cast<dyn ArtifactType> for PotentialOwner {}
impl Cast<dyn ArtifactTypeMut> for PotentialOwner {}
impl Cast<dyn AssignmentType> for PotentialOwner {}
impl Cast<dyn AssignmentTypeMut> for PotentialOwner {}
impl Cast<dyn AssociationType> for PotentialOwner {}
impl Cast<dyn AssociationTypeMut> for PotentialOwner {}
impl Cast<dyn AuditingType> for PotentialOwner {}
impl Cast<dyn AuditingTypeMut> for PotentialOwner {}
impl Cast<dyn BaseElementType> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for PotentialOwner {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for PotentialOwner {}
impl Cast<dyn BoundaryEventType> for PotentialOwner {}
impl Cast<dyn BoundaryEventTypeMut> for PotentialOwner {}
impl Cast<dyn BusinessRuleTaskType> for PotentialOwner {}
impl Cast<dyn BusinessRuleTaskTypeMut> for PotentialOwner {}
impl Cast<dyn CallableElementType> for PotentialOwner {}
impl Cast<dyn CallableElementTypeMut> for PotentialOwner {}
impl Cast<dyn CallActivityType> for PotentialOwner {}
impl Cast<dyn CallActivityTypeMut> for PotentialOwner {}
impl Cast<dyn CallChoreographyType> for PotentialOwner {}
impl Cast<dyn CallChoreographyTypeMut> for PotentialOwner {}
impl Cast<dyn CallConversationType> for PotentialOwner {}
impl Cast<dyn CallConversationTypeMut> for PotentialOwner {}
impl Cast<dyn CancelEventDefinitionType> for PotentialOwner {}
impl Cast<dyn CancelEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn CatchEventType> for PotentialOwner {}
impl Cast<dyn CatchEventTypeMut> for PotentialOwner {}
impl Cast<dyn CategoryType> for PotentialOwner {}
impl Cast<dyn CategoryTypeMut> for PotentialOwner {}
impl Cast<dyn CategoryValueType> for PotentialOwner {}
impl Cast<dyn CategoryValueTypeMut> for PotentialOwner {}
impl Cast<dyn ChoreographyType> for PotentialOwner {}
impl Cast<dyn ChoreographyTypeMut> for PotentialOwner {}
impl Cast<dyn ChoreographyActivityType> for PotentialOwner {}
impl Cast<dyn ChoreographyActivityTypeMut> for PotentialOwner {}
impl Cast<dyn ChoreographyTaskType> for PotentialOwner {}
impl Cast<dyn ChoreographyTaskTypeMut> for PotentialOwner {}
impl Cast<dyn CollaborationType> for PotentialOwner {}
impl Cast<dyn CollaborationTypeMut> for PotentialOwner {}
impl Cast<dyn CompensateEventDefinitionType> for PotentialOwner {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn ComplexBehaviorDefinitionType> for PotentialOwner {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn ComplexGatewayType> for PotentialOwner {}
impl Cast<dyn ComplexGatewayTypeMut> for PotentialOwner {}
impl Cast<dyn ConditionalEventDefinitionType> for PotentialOwner {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn ConversationType> for PotentialOwner {}
impl Cast<dyn ConversationTypeMut> for PotentialOwner {}
impl Cast<dyn ConversationAssociationType> for PotentialOwner {}
impl Cast<dyn ConversationAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn ConversationLinkType> for PotentialOwner {}
impl Cast<dyn ConversationLinkTypeMut> for PotentialOwner {}
impl Cast<dyn ConversationNodeType> for PotentialOwner {}
impl Cast<dyn ConversationNodeTypeMut> for PotentialOwner {}
impl Cast<dyn CorrelationKeyType> for PotentialOwner {}
impl Cast<dyn CorrelationKeyTypeMut> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyType> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyTypeMut> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyBindingType> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for PotentialOwner {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for PotentialOwner {}
impl Cast<dyn CorrelationSubscriptionType> for PotentialOwner {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for PotentialOwner {}
impl Cast<dyn DataAssociationType> for PotentialOwner {}
impl Cast<dyn DataAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn DataInputType> for PotentialOwner {}
impl Cast<dyn DataInputTypeMut> for PotentialOwner {}
impl Cast<dyn DataInputAssociationType> for PotentialOwner {}
impl Cast<dyn DataInputAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn DataObjectType> for PotentialOwner {}
impl Cast<dyn DataObjectTypeMut> for PotentialOwner {}
impl Cast<dyn DataObjectReferenceType> for PotentialOwner {}
impl Cast<dyn DataObjectReferenceTypeMut> for PotentialOwner {}
impl Cast<dyn DataOutputType> for PotentialOwner {}
impl Cast<dyn DataOutputTypeMut> for PotentialOwner {}
impl Cast<dyn DataOutputAssociationType> for PotentialOwner {}
impl Cast<dyn DataOutputAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn DataStateType> for PotentialOwner {}
impl Cast<dyn DataStateTypeMut> for PotentialOwner {}
impl Cast<dyn DataStoreType> for PotentialOwner {}
impl Cast<dyn DataStoreTypeMut> for PotentialOwner {}
impl Cast<dyn DataStoreReferenceType> for PotentialOwner {}
impl Cast<dyn DataStoreReferenceTypeMut> for PotentialOwner {}
impl Cast<dyn DocumentationType> for PotentialOwner {}
impl Cast<dyn DocumentationTypeMut> for PotentialOwner {}
impl Cast<dyn EndEventType> for PotentialOwner {}
impl Cast<dyn EndEventTypeMut> for PotentialOwner {}
impl Cast<dyn EndPointType> for PotentialOwner {}
impl Cast<dyn EndPointTypeMut> for PotentialOwner {}
impl Cast<dyn ErrorType> for PotentialOwner {}
impl Cast<dyn ErrorTypeMut> for PotentialOwner {}
impl Cast<dyn ErrorEventDefinitionType> for PotentialOwner {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn EscalationType> for PotentialOwner {}
impl Cast<dyn EscalationTypeMut> for PotentialOwner {}
impl Cast<dyn EscalationEventDefinitionType> for PotentialOwner {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn EventType> for PotentialOwner {}
impl Cast<dyn EventTypeMut> for PotentialOwner {}
impl Cast<dyn EventBasedGatewayType> for PotentialOwner {}
impl Cast<dyn EventBasedGatewayTypeMut> for PotentialOwner {}
impl Cast<dyn EventDefinitionType> for PotentialOwner {}
impl Cast<dyn EventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn ExclusiveGatewayType> for PotentialOwner {}
impl Cast<dyn ExclusiveGatewayTypeMut> for PotentialOwner {}
impl Cast<dyn ExpressionType> for PotentialOwner {}
impl Cast<dyn ExpressionTypeMut> for PotentialOwner {}
impl Cast<dyn ExtensionType> for PotentialOwner {}
impl Cast<dyn ExtensionTypeMut> for PotentialOwner {}
impl Cast<dyn ExtensionElementsType> for PotentialOwner {}
impl Cast<dyn ExtensionElementsTypeMut> for PotentialOwner {}
impl Cast<dyn FlowElementType> for PotentialOwner {}
impl Cast<dyn FlowElementTypeMut> for PotentialOwner {}
impl Cast<dyn FlowNodeType> for PotentialOwner {}
impl Cast<dyn FlowNodeTypeMut> for PotentialOwner {}
impl Cast<dyn FormalExpressionType> for PotentialOwner {}
impl Cast<dyn FormalExpressionTypeMut> for PotentialOwner {}
impl Cast<dyn GatewayType> for PotentialOwner {}
impl Cast<dyn GatewayTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalBusinessRuleTaskType> for PotentialOwner {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalChoreographyTaskType> for PotentialOwner {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalConversationType> for PotentialOwner {}
impl Cast<dyn GlobalConversationTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalManualTaskType> for PotentialOwner {}
impl Cast<dyn GlobalManualTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalScriptTaskType> for PotentialOwner {}
impl Cast<dyn GlobalScriptTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalTaskType> for PotentialOwner {}
impl Cast<dyn GlobalTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GlobalUserTaskType> for PotentialOwner {}
impl Cast<dyn GlobalUserTaskTypeMut> for PotentialOwner {}
impl Cast<dyn GroupType> for PotentialOwner {}
impl Cast<dyn GroupTypeMut> for PotentialOwner {}
impl Cast<dyn HumanPerformerType> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn HumanPerformerTypeMut> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ImplicitThrowEventType> for PotentialOwner {}
impl Cast<dyn ImplicitThrowEventTypeMut> for PotentialOwner {}
impl Cast<dyn InclusiveGatewayType> for PotentialOwner {}
impl Cast<dyn InclusiveGatewayTypeMut> for PotentialOwner {}
impl Cast<dyn InputSetType> for PotentialOwner {}
impl Cast<dyn InputSetTypeMut> for PotentialOwner {}
impl Cast<dyn InterfaceType> for PotentialOwner {}
impl Cast<dyn InterfaceTypeMut> for PotentialOwner {}
impl Cast<dyn IntermediateCatchEventType> for PotentialOwner {}
impl Cast<dyn IntermediateCatchEventTypeMut> for PotentialOwner {}
impl Cast<dyn IntermediateThrowEventType> for PotentialOwner {}
impl Cast<dyn IntermediateThrowEventTypeMut> for PotentialOwner {}
impl Cast<dyn InputOutputBindingType> for PotentialOwner {}
impl Cast<dyn InputOutputBindingTypeMut> for PotentialOwner {}
impl Cast<dyn InputOutputSpecificationType> for PotentialOwner {}
impl Cast<dyn InputOutputSpecificationTypeMut> for PotentialOwner {}
impl Cast<dyn ItemDefinitionType> for PotentialOwner {}
impl Cast<dyn ItemDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn LaneType> for PotentialOwner {}
impl Cast<dyn LaneTypeMut> for PotentialOwner {}
impl Cast<dyn LaneSetType> for PotentialOwner {}
impl Cast<dyn LaneSetTypeMut> for PotentialOwner {}
impl Cast<dyn LinkEventDefinitionType> for PotentialOwner {}
impl Cast<dyn LinkEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn LoopCharacteristicsType> for PotentialOwner {}
impl Cast<dyn LoopCharacteristicsTypeMut> for PotentialOwner {}
impl Cast<dyn ManualTaskType> for PotentialOwner {}
impl Cast<dyn ManualTaskTypeMut> for PotentialOwner {}
impl Cast<dyn MessageType> for PotentialOwner {}
impl Cast<dyn MessageTypeMut> for PotentialOwner {}
impl Cast<dyn MessageEventDefinitionType> for PotentialOwner {}
impl Cast<dyn MessageEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn MessageFlowType> for PotentialOwner {}
impl Cast<dyn MessageFlowTypeMut> for PotentialOwner {}
impl Cast<dyn MessageFlowAssociationType> for PotentialOwner {}
impl Cast<dyn MessageFlowAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn MonitoringType> for PotentialOwner {}
impl Cast<dyn MonitoringTypeMut> for PotentialOwner {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for PotentialOwner {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for PotentialOwner {}
impl Cast<dyn OperationType> for PotentialOwner {}
impl Cast<dyn OperationTypeMut> for PotentialOwner {}
impl Cast<dyn OutputSetType> for PotentialOwner {}
impl Cast<dyn OutputSetTypeMut> for PotentialOwner {}
impl Cast<dyn ParallelGatewayType> for PotentialOwner {}
impl Cast<dyn ParallelGatewayTypeMut> for PotentialOwner {}
impl Cast<dyn ParticipantType> for PotentialOwner {}
impl Cast<dyn ParticipantTypeMut> for PotentialOwner {}
impl Cast<dyn ParticipantAssociationType> for PotentialOwner {}
impl Cast<dyn ParticipantAssociationTypeMut> for PotentialOwner {}
impl Cast<dyn ParticipantMultiplicityType> for PotentialOwner {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for PotentialOwner {}
impl Cast<dyn PartnerEntityType> for PotentialOwner {}
impl Cast<dyn PartnerEntityTypeMut> for PotentialOwner {}
impl Cast<dyn PartnerRoleType> for PotentialOwner {}
impl Cast<dyn PartnerRoleTypeMut> for PotentialOwner {}
impl Cast<dyn PerformerType> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PerformerTypeMut> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PotentialOwnerType> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ProcessType> for PotentialOwner {}
impl Cast<dyn ProcessTypeMut> for PotentialOwner {}
impl Cast<dyn PropertyType> for PotentialOwner {}
impl Cast<dyn PropertyTypeMut> for PotentialOwner {}
impl Cast<dyn ReceiveTaskType> for PotentialOwner {}
impl Cast<dyn ReceiveTaskTypeMut> for PotentialOwner {}
impl Cast<dyn RelationshipType> for PotentialOwner {}
impl Cast<dyn RelationshipTypeMut> for PotentialOwner {}
impl Cast<dyn RenderingType> for PotentialOwner {}
impl Cast<dyn RenderingTypeMut> for PotentialOwner {}
impl Cast<dyn ResourceType> for PotentialOwner {}
impl Cast<dyn ResourceTypeMut> for PotentialOwner {}
impl Cast<dyn ResourceAssignmentExpressionType> for PotentialOwner {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for PotentialOwner {}
impl Cast<dyn ResourceParameterType> for PotentialOwner {}
impl Cast<dyn ResourceParameterTypeMut> for PotentialOwner {}
impl Cast<dyn ResourceParameterBindingType> for PotentialOwner {}
impl Cast<dyn ResourceParameterBindingTypeMut> for PotentialOwner {}
impl Cast<dyn ResourceRoleType> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceRoleTypeMut> for PotentialOwner {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementType> for PotentialOwner {}
impl Cast<dyn RootElementTypeMut> for PotentialOwner {}
impl Cast<dyn ScriptTaskType> for PotentialOwner {}
impl Cast<dyn ScriptTaskTypeMut> for PotentialOwner {}
impl Cast<dyn ScriptType> for PotentialOwner {}
impl Cast<dyn ScriptTypeMut> for PotentialOwner {}
impl Cast<dyn SendTaskType> for PotentialOwner {}
impl Cast<dyn SendTaskTypeMut> for PotentialOwner {}
impl Cast<dyn SequenceFlowType> for PotentialOwner {}
impl Cast<dyn SequenceFlowTypeMut> for PotentialOwner {}
impl Cast<dyn ServiceTaskType> for PotentialOwner {}
impl Cast<dyn ServiceTaskTypeMut> for PotentialOwner {}
impl Cast<dyn SignalType> for PotentialOwner {}
impl Cast<dyn SignalTypeMut> for PotentialOwner {}
impl Cast<dyn SignalEventDefinitionType> for PotentialOwner {}
impl Cast<dyn SignalEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn StandardLoopCharacteristicsType> for PotentialOwner {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for PotentialOwner {}
impl Cast<dyn StartEventType> for PotentialOwner {}
impl Cast<dyn StartEventTypeMut> for PotentialOwner {}
impl Cast<dyn SubChoreographyType> for PotentialOwner {}
impl Cast<dyn SubChoreographyTypeMut> for PotentialOwner {}
impl Cast<dyn SubConversationType> for PotentialOwner {}
impl Cast<dyn SubConversationTypeMut> for PotentialOwner {}
impl Cast<dyn SubProcessType> for PotentialOwner {}
impl Cast<dyn SubProcessTypeMut> for PotentialOwner {}
impl Cast<dyn TaskType> for PotentialOwner {}
impl Cast<dyn TaskTypeMut> for PotentialOwner {}
impl Cast<dyn TerminateEventDefinitionType> for PotentialOwner {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn TextAnnotationType> for PotentialOwner {}
impl Cast<dyn TextAnnotationTypeMut> for PotentialOwner {}
impl Cast<dyn TextType> for PotentialOwner {}
impl Cast<dyn TextTypeMut> for PotentialOwner {}
impl Cast<dyn ThrowEventType> for PotentialOwner {}
impl Cast<dyn ThrowEventTypeMut> for PotentialOwner {}
impl Cast<dyn TimerEventDefinitionType> for PotentialOwner {}
impl Cast<dyn TimerEventDefinitionTypeMut> for PotentialOwner {}
impl Cast<dyn TransactionType> for PotentialOwner {}
impl Cast<dyn TransactionTypeMut> for PotentialOwner {}
impl Cast<dyn UserTaskType> for PotentialOwner {}
impl Cast<dyn UserTaskTypeMut> for PotentialOwner {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:process")]
pub struct Process {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("CallableElementType",rg*="name","CallableElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:supportedInterfaceRef")]
    #[tia("CallableElementType",rg*="supported_interface_refs","CallableElementTypeMut",s,rmg*="supported_interface_refs_mut")]
    pub supported_interface_refs: Vec<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("CallableElementType",rg*="io_specification","CallableElementTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:ioBinding")]
    #[tia("CallableElementType",rg*="io_bindings","CallableElementTypeMut",s,rmg*="io_bindings_mut")]
    pub io_bindings: Vec<InputOutputBinding>,
    #[xml(attr = "processType")]
    #[tia("ProcessType",rg*="process_type","ProcessTypeMut",s)]
    pub process_type: Option<String>,
    #[xml(attr = "isClosed")]
    #[tia("ProcessType",rg*="is_closed","ProcessTypeMut",s)]
    pub is_closed: Option<bool>,
    #[xml(attr = "isExecutable")]
    #[tia("ProcessType",rg*="is_executable","ProcessTypeMut",s)]
    pub is_executable: Option<bool>,
    #[xml(attr = "definitionalCollaborationRef")]
    #[tia("ProcessType",rg*="definitional_collaboration_ref","ProcessTypeMut",s)]
    pub definitional_collaboration_ref: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("ProcessType",rg*="auditing","ProcessTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("ProcessType",rg*="monitoring","ProcessTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(child = "bpmn:property")]
    #[tia("ProcessType",rg*="properties","ProcessTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:laneSet")]
    #[tia("ProcessType",rg*="lane_sets","ProcessTypeMut",s,rmg*="lane_sets_mut")]
    pub lane_sets: Vec<LaneSet>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("ProcessType",rg*="flow_elements","ProcessTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("ProcessType",rg*="artifacts","ProcessTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ProcessType",rg*="resource_roles","ProcessTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(child = "bpmn:correlationSubscription")]
    #[tia("ProcessType",rg*="correlation_subscriptions","ProcessTypeMut",s,rmg*="correlation_subscriptions_mut")]
    pub correlation_subscriptions: Vec<CorrelationSubscription>,
    #[xml(flatten_text = "bpmn:supports")]
    #[tia("ProcessType",rg*="supportses","ProcessTypeMut",s,rmg*="supportses_mut")]
    pub supportses: Vec<String>,
}
impl DocumentElement for Process {
    fn element(&self) -> Element {
        Element::Process
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Process {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.auditing.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.monitoring.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.properties.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.lane_sets.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.flow_elements.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.resource_roles.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.correlation_subscriptions.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.auditing.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.monitoring.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.properties.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.lane_sets.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.flow_elements.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.resource_roles.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.correlation_subscriptions.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Process {}
impl RootElementTypeMut for Process {}
//

/// Access to `process`
pub trait ProcessType: CallableElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `processType`
    fn process_type(&self) -> &Option<String>;
    /// Get value of attribute `isClosed`
    fn is_closed(&self) -> &Option<bool>;
    /// Get value of attribute `isExecutable`
    fn is_executable(&self) -> &Option<bool>;
    /// Get value of attribute `definitionalCollaborationRef`
    fn definitional_collaboration_ref(&self) -> &Option<String>;
    /// Get value of `auditing` child
    fn auditing(&self) -> &Option<Auditing>;
    /// Get value of `monitoring` child
    fn monitoring(&self) -> &Option<Monitoring>;
    /// Get value of `property` child
    fn properties(&self) -> &Vec<Property>;
    /// Get value of `laneSet` child
    fn lane_sets(&self) -> &Vec<LaneSet>;
    /// Get value of `flowElement` child
    fn flow_elements(&self) -> &Vec<FlowElement>;
    /// Get value of `artifact` child
    fn artifacts(&self) -> &Vec<Artifact>;
    /// Get value of `resourceRole` child
    fn resource_roles(&self) -> &Vec<ResourceRole>;
    /// Get value of `correlationSubscription` child
    fn correlation_subscriptions(&self) -> &Vec<CorrelationSubscription>;
    /// Get value of `supports` child
    fn supportses(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(ProcessType);
impl_downcast!(ProcessType);
/// Mutable access to `process`
pub trait ProcessTypeMut:
    CallableElementTypeMut + Downcast + Debug + Send + DynClone + ProcessType
{
    /// Set value of attribute `processType`
    fn set_process_type(&mut self, value: Option<String>);
    /// Set value of attribute `isClosed`
    fn set_is_closed(&mut self, value: Option<bool>);
    /// Set value of attribute `isExecutable`
    fn set_is_executable(&mut self, value: Option<bool>);
    /// Set value of attribute `definitionalCollaborationRef`
    fn set_definitional_collaboration_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `auditing` child
    fn auditing_mut(&mut self) -> &mut Option<Auditing>;
    /// Set value of `auditing` child
    fn set_auditing(&mut self, value: Option<Auditing>);
    /// Get a mutable value of `monitoring` child
    fn monitoring_mut(&mut self) -> &mut Option<Monitoring>;
    /// Set value of `monitoring` child
    fn set_monitoring(&mut self, value: Option<Monitoring>);
    /// Get a mutable value of `property` child
    fn properties_mut(&mut self) -> &mut Vec<Property>;
    /// Set value of `property` child
    fn set_properties(&mut self, value: Vec<Property>);
    /// Get a mutable value of `laneSet` child
    fn lane_sets_mut(&mut self) -> &mut Vec<LaneSet>;
    /// Set value of `laneSet` child
    fn set_lane_sets(&mut self, value: Vec<LaneSet>);
    /// Get a mutable value of `flowElement` child
    fn flow_elements_mut(&mut self) -> &mut Vec<FlowElement>;
    /// Set value of `flowElement` child
    fn set_flow_elements(&mut self, value: Vec<FlowElement>);
    /// Get a mutable value of `artifact` child
    fn artifacts_mut(&mut self) -> &mut Vec<Artifact>;
    /// Set value of `artifact` child
    fn set_artifacts(&mut self, value: Vec<Artifact>);
    /// Get a mutable value of `resourceRole` child
    fn resource_roles_mut(&mut self) -> &mut Vec<ResourceRole>;
    /// Set value of `resourceRole` child
    fn set_resource_roles(&mut self, value: Vec<ResourceRole>);
    /// Get a mutable value of `correlationSubscription` child
    fn correlation_subscriptions_mut(&mut self) -> &mut Vec<CorrelationSubscription>;
    /// Set value of `correlationSubscription` child
    fn set_correlation_subscriptions(&mut self, value: Vec<CorrelationSubscription>);
    /// Get a mutable value of `supports` child
    fn supportses_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `supports` child
    fn set_supportses(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(ProcessTypeMut);
impl_downcast!(ProcessTypeMut);
impl Cast<dyn DefinitionsType> for Process {}
impl Cast<dyn DefinitionsTypeMut> for Process {}
impl Cast<dyn ImportType> for Process {}
impl Cast<dyn ImportTypeMut> for Process {}
impl Cast<dyn ActivityType> for Process {}
impl Cast<dyn ActivityTypeMut> for Process {}
impl Cast<dyn AdHocSubProcessType> for Process {}
impl Cast<dyn AdHocSubProcessTypeMut> for Process {}
impl Cast<dyn ArtifactType> for Process {}
impl Cast<dyn ArtifactTypeMut> for Process {}
impl Cast<dyn AssignmentType> for Process {}
impl Cast<dyn AssignmentTypeMut> for Process {}
impl Cast<dyn AssociationType> for Process {}
impl Cast<dyn AssociationTypeMut> for Process {}
impl Cast<dyn AuditingType> for Process {}
impl Cast<dyn AuditingTypeMut> for Process {}
impl Cast<dyn BaseElementType> for Process {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Process {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Process {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Process {}
impl Cast<dyn BoundaryEventType> for Process {}
impl Cast<dyn BoundaryEventTypeMut> for Process {}
impl Cast<dyn BusinessRuleTaskType> for Process {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Process {}
impl Cast<dyn CallableElementType> for Process {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallableElementTypeMut> for Process {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CallActivityType> for Process {}
impl Cast<dyn CallActivityTypeMut> for Process {}
impl Cast<dyn CallChoreographyType> for Process {}
impl Cast<dyn CallChoreographyTypeMut> for Process {}
impl Cast<dyn CallConversationType> for Process {}
impl Cast<dyn CallConversationTypeMut> for Process {}
impl Cast<dyn CancelEventDefinitionType> for Process {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Process {}
impl Cast<dyn CatchEventType> for Process {}
impl Cast<dyn CatchEventTypeMut> for Process {}
impl Cast<dyn CategoryType> for Process {}
impl Cast<dyn CategoryTypeMut> for Process {}
impl Cast<dyn CategoryValueType> for Process {}
impl Cast<dyn CategoryValueTypeMut> for Process {}
impl Cast<dyn ChoreographyType> for Process {}
impl Cast<dyn ChoreographyTypeMut> for Process {}
impl Cast<dyn ChoreographyActivityType> for Process {}
impl Cast<dyn ChoreographyActivityTypeMut> for Process {}
impl Cast<dyn ChoreographyTaskType> for Process {}
impl Cast<dyn ChoreographyTaskTypeMut> for Process {}
impl Cast<dyn CollaborationType> for Process {}
impl Cast<dyn CollaborationTypeMut> for Process {}
impl Cast<dyn CompensateEventDefinitionType> for Process {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Process {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Process {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Process {}
impl Cast<dyn ComplexGatewayType> for Process {}
impl Cast<dyn ComplexGatewayTypeMut> for Process {}
impl Cast<dyn ConditionalEventDefinitionType> for Process {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Process {}
impl Cast<dyn ConversationType> for Process {}
impl Cast<dyn ConversationTypeMut> for Process {}
impl Cast<dyn ConversationAssociationType> for Process {}
impl Cast<dyn ConversationAssociationTypeMut> for Process {}
impl Cast<dyn ConversationLinkType> for Process {}
impl Cast<dyn ConversationLinkTypeMut> for Process {}
impl Cast<dyn ConversationNodeType> for Process {}
impl Cast<dyn ConversationNodeTypeMut> for Process {}
impl Cast<dyn CorrelationKeyType> for Process {}
impl Cast<dyn CorrelationKeyTypeMut> for Process {}
impl Cast<dyn CorrelationPropertyType> for Process {}
impl Cast<dyn CorrelationPropertyTypeMut> for Process {}
impl Cast<dyn CorrelationPropertyBindingType> for Process {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Process {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Process {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Process {}
impl Cast<dyn CorrelationSubscriptionType> for Process {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Process {}
impl Cast<dyn DataAssociationType> for Process {}
impl Cast<dyn DataAssociationTypeMut> for Process {}
impl Cast<dyn DataInputType> for Process {}
impl Cast<dyn DataInputTypeMut> for Process {}
impl Cast<dyn DataInputAssociationType> for Process {}
impl Cast<dyn DataInputAssociationTypeMut> for Process {}
impl Cast<dyn DataObjectType> for Process {}
impl Cast<dyn DataObjectTypeMut> for Process {}
impl Cast<dyn DataObjectReferenceType> for Process {}
impl Cast<dyn DataObjectReferenceTypeMut> for Process {}
impl Cast<dyn DataOutputType> for Process {}
impl Cast<dyn DataOutputTypeMut> for Process {}
impl Cast<dyn DataOutputAssociationType> for Process {}
impl Cast<dyn DataOutputAssociationTypeMut> for Process {}
impl Cast<dyn DataStateType> for Process {}
impl Cast<dyn DataStateTypeMut> for Process {}
impl Cast<dyn DataStoreType> for Process {}
impl Cast<dyn DataStoreTypeMut> for Process {}
impl Cast<dyn DataStoreReferenceType> for Process {}
impl Cast<dyn DataStoreReferenceTypeMut> for Process {}
impl Cast<dyn DocumentationType> for Process {}
impl Cast<dyn DocumentationTypeMut> for Process {}
impl Cast<dyn EndEventType> for Process {}
impl Cast<dyn EndEventTypeMut> for Process {}
impl Cast<dyn EndPointType> for Process {}
impl Cast<dyn EndPointTypeMut> for Process {}
impl Cast<dyn ErrorType> for Process {}
impl Cast<dyn ErrorTypeMut> for Process {}
impl Cast<dyn ErrorEventDefinitionType> for Process {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Process {}
impl Cast<dyn EscalationType> for Process {}
impl Cast<dyn EscalationTypeMut> for Process {}
impl Cast<dyn EscalationEventDefinitionType> for Process {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Process {}
impl Cast<dyn EventType> for Process {}
impl Cast<dyn EventTypeMut> for Process {}
impl Cast<dyn EventBasedGatewayType> for Process {}
impl Cast<dyn EventBasedGatewayTypeMut> for Process {}
impl Cast<dyn EventDefinitionType> for Process {}
impl Cast<dyn EventDefinitionTypeMut> for Process {}
impl Cast<dyn ExclusiveGatewayType> for Process {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Process {}
impl Cast<dyn ExpressionType> for Process {}
impl Cast<dyn ExpressionTypeMut> for Process {}
impl Cast<dyn ExtensionType> for Process {}
impl Cast<dyn ExtensionTypeMut> for Process {}
impl Cast<dyn ExtensionElementsType> for Process {}
impl Cast<dyn ExtensionElementsTypeMut> for Process {}
impl Cast<dyn FlowElementType> for Process {}
impl Cast<dyn FlowElementTypeMut> for Process {}
impl Cast<dyn FlowNodeType> for Process {}
impl Cast<dyn FlowNodeTypeMut> for Process {}
impl Cast<dyn FormalExpressionType> for Process {}
impl Cast<dyn FormalExpressionTypeMut> for Process {}
impl Cast<dyn GatewayType> for Process {}
impl Cast<dyn GatewayTypeMut> for Process {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Process {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Process {}
impl Cast<dyn GlobalChoreographyTaskType> for Process {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Process {}
impl Cast<dyn GlobalConversationType> for Process {}
impl Cast<dyn GlobalConversationTypeMut> for Process {}
impl Cast<dyn GlobalManualTaskType> for Process {}
impl Cast<dyn GlobalManualTaskTypeMut> for Process {}
impl Cast<dyn GlobalScriptTaskType> for Process {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Process {}
impl Cast<dyn GlobalTaskType> for Process {}
impl Cast<dyn GlobalTaskTypeMut> for Process {}
impl Cast<dyn GlobalUserTaskType> for Process {}
impl Cast<dyn GlobalUserTaskTypeMut> for Process {}
impl Cast<dyn GroupType> for Process {}
impl Cast<dyn GroupTypeMut> for Process {}
impl Cast<dyn HumanPerformerType> for Process {}
impl Cast<dyn HumanPerformerTypeMut> for Process {}
impl Cast<dyn ImplicitThrowEventType> for Process {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Process {}
impl Cast<dyn InclusiveGatewayType> for Process {}
impl Cast<dyn InclusiveGatewayTypeMut> for Process {}
impl Cast<dyn InputSetType> for Process {}
impl Cast<dyn InputSetTypeMut> for Process {}
impl Cast<dyn InterfaceType> for Process {}
impl Cast<dyn InterfaceTypeMut> for Process {}
impl Cast<dyn IntermediateCatchEventType> for Process {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Process {}
impl Cast<dyn IntermediateThrowEventType> for Process {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Process {}
impl Cast<dyn InputOutputBindingType> for Process {}
impl Cast<dyn InputOutputBindingTypeMut> for Process {}
impl Cast<dyn InputOutputSpecificationType> for Process {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Process {}
impl Cast<dyn ItemDefinitionType> for Process {}
impl Cast<dyn ItemDefinitionTypeMut> for Process {}
impl Cast<dyn LaneType> for Process {}
impl Cast<dyn LaneTypeMut> for Process {}
impl Cast<dyn LaneSetType> for Process {}
impl Cast<dyn LaneSetTypeMut> for Process {}
impl Cast<dyn LinkEventDefinitionType> for Process {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Process {}
impl Cast<dyn LoopCharacteristicsType> for Process {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Process {}
impl Cast<dyn ManualTaskType> for Process {}
impl Cast<dyn ManualTaskTypeMut> for Process {}
impl Cast<dyn MessageType> for Process {}
impl Cast<dyn MessageTypeMut> for Process {}
impl Cast<dyn MessageEventDefinitionType> for Process {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Process {}
impl Cast<dyn MessageFlowType> for Process {}
impl Cast<dyn MessageFlowTypeMut> for Process {}
impl Cast<dyn MessageFlowAssociationType> for Process {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Process {}
impl Cast<dyn MonitoringType> for Process {}
impl Cast<dyn MonitoringTypeMut> for Process {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Process {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Process {}
impl Cast<dyn OperationType> for Process {}
impl Cast<dyn OperationTypeMut> for Process {}
impl Cast<dyn OutputSetType> for Process {}
impl Cast<dyn OutputSetTypeMut> for Process {}
impl Cast<dyn ParallelGatewayType> for Process {}
impl Cast<dyn ParallelGatewayTypeMut> for Process {}
impl Cast<dyn ParticipantType> for Process {}
impl Cast<dyn ParticipantTypeMut> for Process {}
impl Cast<dyn ParticipantAssociationType> for Process {}
impl Cast<dyn ParticipantAssociationTypeMut> for Process {}
impl Cast<dyn ParticipantMultiplicityType> for Process {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Process {}
impl Cast<dyn PartnerEntityType> for Process {}
impl Cast<dyn PartnerEntityTypeMut> for Process {}
impl Cast<dyn PartnerRoleType> for Process {}
impl Cast<dyn PartnerRoleTypeMut> for Process {}
impl Cast<dyn PerformerType> for Process {}
impl Cast<dyn PerformerTypeMut> for Process {}
impl Cast<dyn PotentialOwnerType> for Process {}
impl Cast<dyn PotentialOwnerTypeMut> for Process {}
impl Cast<dyn ProcessType> for Process {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ProcessTypeMut> for Process {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PropertyType> for Process {}
impl Cast<dyn PropertyTypeMut> for Process {}
impl Cast<dyn ReceiveTaskType> for Process {}
impl Cast<dyn ReceiveTaskTypeMut> for Process {}
impl Cast<dyn RelationshipType> for Process {}
impl Cast<dyn RelationshipTypeMut> for Process {}
impl Cast<dyn RenderingType> for Process {}
impl Cast<dyn RenderingTypeMut> for Process {}
impl Cast<dyn ResourceType> for Process {}
impl Cast<dyn ResourceTypeMut> for Process {}
impl Cast<dyn ResourceAssignmentExpressionType> for Process {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Process {}
impl Cast<dyn ResourceParameterType> for Process {}
impl Cast<dyn ResourceParameterTypeMut> for Process {}
impl Cast<dyn ResourceParameterBindingType> for Process {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Process {}
impl Cast<dyn ResourceRoleType> for Process {}
impl Cast<dyn ResourceRoleTypeMut> for Process {}
impl Cast<dyn RootElementType> for Process {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Process {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Process {}
impl Cast<dyn ScriptTaskTypeMut> for Process {}
impl Cast<dyn ScriptType> for Process {}
impl Cast<dyn ScriptTypeMut> for Process {}
impl Cast<dyn SendTaskType> for Process {}
impl Cast<dyn SendTaskTypeMut> for Process {}
impl Cast<dyn SequenceFlowType> for Process {}
impl Cast<dyn SequenceFlowTypeMut> for Process {}
impl Cast<dyn ServiceTaskType> for Process {}
impl Cast<dyn ServiceTaskTypeMut> for Process {}
impl Cast<dyn SignalType> for Process {}
impl Cast<dyn SignalTypeMut> for Process {}
impl Cast<dyn SignalEventDefinitionType> for Process {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Process {}
impl Cast<dyn StandardLoopCharacteristicsType> for Process {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Process {}
impl Cast<dyn StartEventType> for Process {}
impl Cast<dyn StartEventTypeMut> for Process {}
impl Cast<dyn SubChoreographyType> for Process {}
impl Cast<dyn SubChoreographyTypeMut> for Process {}
impl Cast<dyn SubConversationType> for Process {}
impl Cast<dyn SubConversationTypeMut> for Process {}
impl Cast<dyn SubProcessType> for Process {}
impl Cast<dyn SubProcessTypeMut> for Process {}
impl Cast<dyn TaskType> for Process {}
impl Cast<dyn TaskTypeMut> for Process {}
impl Cast<dyn TerminateEventDefinitionType> for Process {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Process {}
impl Cast<dyn TextAnnotationType> for Process {}
impl Cast<dyn TextAnnotationTypeMut> for Process {}
impl Cast<dyn TextType> for Process {}
impl Cast<dyn TextTypeMut> for Process {}
impl Cast<dyn ThrowEventType> for Process {}
impl Cast<dyn ThrowEventTypeMut> for Process {}
impl Cast<dyn TimerEventDefinitionType> for Process {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Process {}
impl Cast<dyn TransactionType> for Process {}
impl Cast<dyn TransactionTypeMut> for Process {}
impl Cast<dyn UserTaskType> for Process {}
impl Cast<dyn UserTaskTypeMut> for Process {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:property")]
pub struct Property {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("PropertyType",rg*="name","PropertyTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "itemSubjectRef")]
    #[tia("PropertyType",rg*="item_subject_ref","PropertyTypeMut",s)]
    pub item_subject_ref: Option<String>,
    #[xml(child = "bpmn:dataState")]
    #[tia("PropertyType",rg*="data_state","PropertyTypeMut",s,rmg*="data_state_mut")]
    pub data_state: Option<DataState>,
}
impl DocumentElement for Property {
    fn element(&self) -> Element {
        Element::Property
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Property {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.data_state.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `property`
pub trait PropertyType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `itemSubjectRef`
    fn item_subject_ref(&self) -> &Option<String>;
    /// Get value of `dataState` child
    fn data_state(&self) -> &Option<DataState>;
}
dyn_clone::clone_trait_object!(PropertyType);
impl_downcast!(PropertyType);
/// Mutable access to `property`
pub trait PropertyTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + PropertyType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `itemSubjectRef`
    fn set_item_subject_ref(&mut self, value: Option<String>);
    /// Get a mutable value of `dataState` child
    fn data_state_mut(&mut self) -> &mut Option<DataState>;
    /// Set value of `dataState` child
    fn set_data_state(&mut self, value: Option<DataState>);
}
dyn_clone::clone_trait_object!(PropertyTypeMut);
impl_downcast!(PropertyTypeMut);
impl Cast<dyn DefinitionsType> for Property {}
impl Cast<dyn DefinitionsTypeMut> for Property {}
impl Cast<dyn ImportType> for Property {}
impl Cast<dyn ImportTypeMut> for Property {}
impl Cast<dyn ActivityType> for Property {}
impl Cast<dyn ActivityTypeMut> for Property {}
impl Cast<dyn AdHocSubProcessType> for Property {}
impl Cast<dyn AdHocSubProcessTypeMut> for Property {}
impl Cast<dyn ArtifactType> for Property {}
impl Cast<dyn ArtifactTypeMut> for Property {}
impl Cast<dyn AssignmentType> for Property {}
impl Cast<dyn AssignmentTypeMut> for Property {}
impl Cast<dyn AssociationType> for Property {}
impl Cast<dyn AssociationTypeMut> for Property {}
impl Cast<dyn AuditingType> for Property {}
impl Cast<dyn AuditingTypeMut> for Property {}
impl Cast<dyn BaseElementType> for Property {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Property {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Property {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Property {}
impl Cast<dyn BoundaryEventType> for Property {}
impl Cast<dyn BoundaryEventTypeMut> for Property {}
impl Cast<dyn BusinessRuleTaskType> for Property {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Property {}
impl Cast<dyn CallableElementType> for Property {}
impl Cast<dyn CallableElementTypeMut> for Property {}
impl Cast<dyn CallActivityType> for Property {}
impl Cast<dyn CallActivityTypeMut> for Property {}
impl Cast<dyn CallChoreographyType> for Property {}
impl Cast<dyn CallChoreographyTypeMut> for Property {}
impl Cast<dyn CallConversationType> for Property {}
impl Cast<dyn CallConversationTypeMut> for Property {}
impl Cast<dyn CancelEventDefinitionType> for Property {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Property {}
impl Cast<dyn CatchEventType> for Property {}
impl Cast<dyn CatchEventTypeMut> for Property {}
impl Cast<dyn CategoryType> for Property {}
impl Cast<dyn CategoryTypeMut> for Property {}
impl Cast<dyn CategoryValueType> for Property {}
impl Cast<dyn CategoryValueTypeMut> for Property {}
impl Cast<dyn ChoreographyType> for Property {}
impl Cast<dyn ChoreographyTypeMut> for Property {}
impl Cast<dyn ChoreographyActivityType> for Property {}
impl Cast<dyn ChoreographyActivityTypeMut> for Property {}
impl Cast<dyn ChoreographyTaskType> for Property {}
impl Cast<dyn ChoreographyTaskTypeMut> for Property {}
impl Cast<dyn CollaborationType> for Property {}
impl Cast<dyn CollaborationTypeMut> for Property {}
impl Cast<dyn CompensateEventDefinitionType> for Property {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Property {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Property {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Property {}
impl Cast<dyn ComplexGatewayType> for Property {}
impl Cast<dyn ComplexGatewayTypeMut> for Property {}
impl Cast<dyn ConditionalEventDefinitionType> for Property {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Property {}
impl Cast<dyn ConversationType> for Property {}
impl Cast<dyn ConversationTypeMut> for Property {}
impl Cast<dyn ConversationAssociationType> for Property {}
impl Cast<dyn ConversationAssociationTypeMut> for Property {}
impl Cast<dyn ConversationLinkType> for Property {}
impl Cast<dyn ConversationLinkTypeMut> for Property {}
impl Cast<dyn ConversationNodeType> for Property {}
impl Cast<dyn ConversationNodeTypeMut> for Property {}
impl Cast<dyn CorrelationKeyType> for Property {}
impl Cast<dyn CorrelationKeyTypeMut> for Property {}
impl Cast<dyn CorrelationPropertyType> for Property {}
impl Cast<dyn CorrelationPropertyTypeMut> for Property {}
impl Cast<dyn CorrelationPropertyBindingType> for Property {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Property {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Property {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Property {}
impl Cast<dyn CorrelationSubscriptionType> for Property {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Property {}
impl Cast<dyn DataAssociationType> for Property {}
impl Cast<dyn DataAssociationTypeMut> for Property {}
impl Cast<dyn DataInputType> for Property {}
impl Cast<dyn DataInputTypeMut> for Property {}
impl Cast<dyn DataInputAssociationType> for Property {}
impl Cast<dyn DataInputAssociationTypeMut> for Property {}
impl Cast<dyn DataObjectType> for Property {}
impl Cast<dyn DataObjectTypeMut> for Property {}
impl Cast<dyn DataObjectReferenceType> for Property {}
impl Cast<dyn DataObjectReferenceTypeMut> for Property {}
impl Cast<dyn DataOutputType> for Property {}
impl Cast<dyn DataOutputTypeMut> for Property {}
impl Cast<dyn DataOutputAssociationType> for Property {}
impl Cast<dyn DataOutputAssociationTypeMut> for Property {}
impl Cast<dyn DataStateType> for Property {}
impl Cast<dyn DataStateTypeMut> for Property {}
impl Cast<dyn DataStoreType> for Property {}
impl Cast<dyn DataStoreTypeMut> for Property {}
impl Cast<dyn DataStoreReferenceType> for Property {}
impl Cast<dyn DataStoreReferenceTypeMut> for Property {}
impl Cast<dyn DocumentationType> for Property {}
impl Cast<dyn DocumentationTypeMut> for Property {}
impl Cast<dyn EndEventType> for Property {}
impl Cast<dyn EndEventTypeMut> for Property {}
impl Cast<dyn EndPointType> for Property {}
impl Cast<dyn EndPointTypeMut> for Property {}
impl Cast<dyn ErrorType> for Property {}
impl Cast<dyn ErrorTypeMut> for Property {}
impl Cast<dyn ErrorEventDefinitionType> for Property {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Property {}
impl Cast<dyn EscalationType> for Property {}
impl Cast<dyn EscalationTypeMut> for Property {}
impl Cast<dyn EscalationEventDefinitionType> for Property {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Property {}
impl Cast<dyn EventType> for Property {}
impl Cast<dyn EventTypeMut> for Property {}
impl Cast<dyn EventBasedGatewayType> for Property {}
impl Cast<dyn EventBasedGatewayTypeMut> for Property {}
impl Cast<dyn EventDefinitionType> for Property {}
impl Cast<dyn EventDefinitionTypeMut> for Property {}
impl Cast<dyn ExclusiveGatewayType> for Property {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Property {}
impl Cast<dyn ExpressionType> for Property {}
impl Cast<dyn ExpressionTypeMut> for Property {}
impl Cast<dyn ExtensionType> for Property {}
impl Cast<dyn ExtensionTypeMut> for Property {}
impl Cast<dyn ExtensionElementsType> for Property {}
impl Cast<dyn ExtensionElementsTypeMut> for Property {}
impl Cast<dyn FlowElementType> for Property {}
impl Cast<dyn FlowElementTypeMut> for Property {}
impl Cast<dyn FlowNodeType> for Property {}
impl Cast<dyn FlowNodeTypeMut> for Property {}
impl Cast<dyn FormalExpressionType> for Property {}
impl Cast<dyn FormalExpressionTypeMut> for Property {}
impl Cast<dyn GatewayType> for Property {}
impl Cast<dyn GatewayTypeMut> for Property {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Property {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Property {}
impl Cast<dyn GlobalChoreographyTaskType> for Property {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Property {}
impl Cast<dyn GlobalConversationType> for Property {}
impl Cast<dyn GlobalConversationTypeMut> for Property {}
impl Cast<dyn GlobalManualTaskType> for Property {}
impl Cast<dyn GlobalManualTaskTypeMut> for Property {}
impl Cast<dyn GlobalScriptTaskType> for Property {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Property {}
impl Cast<dyn GlobalTaskType> for Property {}
impl Cast<dyn GlobalTaskTypeMut> for Property {}
impl Cast<dyn GlobalUserTaskType> for Property {}
impl Cast<dyn GlobalUserTaskTypeMut> for Property {}
impl Cast<dyn GroupType> for Property {}
impl Cast<dyn GroupTypeMut> for Property {}
impl Cast<dyn HumanPerformerType> for Property {}
impl Cast<dyn HumanPerformerTypeMut> for Property {}
impl Cast<dyn ImplicitThrowEventType> for Property {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Property {}
impl Cast<dyn InclusiveGatewayType> for Property {}
impl Cast<dyn InclusiveGatewayTypeMut> for Property {}
impl Cast<dyn InputSetType> for Property {}
impl Cast<dyn InputSetTypeMut> for Property {}
impl Cast<dyn InterfaceType> for Property {}
impl Cast<dyn InterfaceTypeMut> for Property {}
impl Cast<dyn IntermediateCatchEventType> for Property {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Property {}
impl Cast<dyn IntermediateThrowEventType> for Property {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Property {}
impl Cast<dyn InputOutputBindingType> for Property {}
impl Cast<dyn InputOutputBindingTypeMut> for Property {}
impl Cast<dyn InputOutputSpecificationType> for Property {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Property {}
impl Cast<dyn ItemDefinitionType> for Property {}
impl Cast<dyn ItemDefinitionTypeMut> for Property {}
impl Cast<dyn LaneType> for Property {}
impl Cast<dyn LaneTypeMut> for Property {}
impl Cast<dyn LaneSetType> for Property {}
impl Cast<dyn LaneSetTypeMut> for Property {}
impl Cast<dyn LinkEventDefinitionType> for Property {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Property {}
impl Cast<dyn LoopCharacteristicsType> for Property {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Property {}
impl Cast<dyn ManualTaskType> for Property {}
impl Cast<dyn ManualTaskTypeMut> for Property {}
impl Cast<dyn MessageType> for Property {}
impl Cast<dyn MessageTypeMut> for Property {}
impl Cast<dyn MessageEventDefinitionType> for Property {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Property {}
impl Cast<dyn MessageFlowType> for Property {}
impl Cast<dyn MessageFlowTypeMut> for Property {}
impl Cast<dyn MessageFlowAssociationType> for Property {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Property {}
impl Cast<dyn MonitoringType> for Property {}
impl Cast<dyn MonitoringTypeMut> for Property {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Property {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Property {}
impl Cast<dyn OperationType> for Property {}
impl Cast<dyn OperationTypeMut> for Property {}
impl Cast<dyn OutputSetType> for Property {}
impl Cast<dyn OutputSetTypeMut> for Property {}
impl Cast<dyn ParallelGatewayType> for Property {}
impl Cast<dyn ParallelGatewayTypeMut> for Property {}
impl Cast<dyn ParticipantType> for Property {}
impl Cast<dyn ParticipantTypeMut> for Property {}
impl Cast<dyn ParticipantAssociationType> for Property {}
impl Cast<dyn ParticipantAssociationTypeMut> for Property {}
impl Cast<dyn ParticipantMultiplicityType> for Property {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Property {}
impl Cast<dyn PartnerEntityType> for Property {}
impl Cast<dyn PartnerEntityTypeMut> for Property {}
impl Cast<dyn PartnerRoleType> for Property {}
impl Cast<dyn PartnerRoleTypeMut> for Property {}
impl Cast<dyn PerformerType> for Property {}
impl Cast<dyn PerformerTypeMut> for Property {}
impl Cast<dyn PotentialOwnerType> for Property {}
impl Cast<dyn PotentialOwnerTypeMut> for Property {}
impl Cast<dyn ProcessType> for Property {}
impl Cast<dyn ProcessTypeMut> for Property {}
impl Cast<dyn PropertyType> for Property {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn PropertyTypeMut> for Property {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ReceiveTaskType> for Property {}
impl Cast<dyn ReceiveTaskTypeMut> for Property {}
impl Cast<dyn RelationshipType> for Property {}
impl Cast<dyn RelationshipTypeMut> for Property {}
impl Cast<dyn RenderingType> for Property {}
impl Cast<dyn RenderingTypeMut> for Property {}
impl Cast<dyn ResourceType> for Property {}
impl Cast<dyn ResourceTypeMut> for Property {}
impl Cast<dyn ResourceAssignmentExpressionType> for Property {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Property {}
impl Cast<dyn ResourceParameterType> for Property {}
impl Cast<dyn ResourceParameterTypeMut> for Property {}
impl Cast<dyn ResourceParameterBindingType> for Property {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Property {}
impl Cast<dyn ResourceRoleType> for Property {}
impl Cast<dyn ResourceRoleTypeMut> for Property {}
impl Cast<dyn RootElementType> for Property {}
impl Cast<dyn RootElementTypeMut> for Property {}
impl Cast<dyn ScriptTaskType> for Property {}
impl Cast<dyn ScriptTaskTypeMut> for Property {}
impl Cast<dyn ScriptType> for Property {}
impl Cast<dyn ScriptTypeMut> for Property {}
impl Cast<dyn SendTaskType> for Property {}
impl Cast<dyn SendTaskTypeMut> for Property {}
impl Cast<dyn SequenceFlowType> for Property {}
impl Cast<dyn SequenceFlowTypeMut> for Property {}
impl Cast<dyn ServiceTaskType> for Property {}
impl Cast<dyn ServiceTaskTypeMut> for Property {}
impl Cast<dyn SignalType> for Property {}
impl Cast<dyn SignalTypeMut> for Property {}
impl Cast<dyn SignalEventDefinitionType> for Property {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Property {}
impl Cast<dyn StandardLoopCharacteristicsType> for Property {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Property {}
impl Cast<dyn StartEventType> for Property {}
impl Cast<dyn StartEventTypeMut> for Property {}
impl Cast<dyn SubChoreographyType> for Property {}
impl Cast<dyn SubChoreographyTypeMut> for Property {}
impl Cast<dyn SubConversationType> for Property {}
impl Cast<dyn SubConversationTypeMut> for Property {}
impl Cast<dyn SubProcessType> for Property {}
impl Cast<dyn SubProcessTypeMut> for Property {}
impl Cast<dyn TaskType> for Property {}
impl Cast<dyn TaskTypeMut> for Property {}
impl Cast<dyn TerminateEventDefinitionType> for Property {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Property {}
impl Cast<dyn TextAnnotationType> for Property {}
impl Cast<dyn TextAnnotationTypeMut> for Property {}
impl Cast<dyn TextType> for Property {}
impl Cast<dyn TextTypeMut> for Property {}
impl Cast<dyn ThrowEventType> for Property {}
impl Cast<dyn ThrowEventTypeMut> for Property {}
impl Cast<dyn TimerEventDefinitionType> for Property {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Property {}
impl Cast<dyn TransactionType> for Property {}
impl Cast<dyn TransactionTypeMut> for Property {}
impl Cast<dyn UserTaskType> for Property {}
impl Cast<dyn UserTaskTypeMut> for Property {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:receiveTask")]
pub struct ReceiveTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "implementation")]
    #[tia("ReceiveTaskType",rg*="implementation","ReceiveTaskTypeMut",s)]
    pub implementation: Option<String>,
    #[xml(attr = "instantiate")]
    #[tia("ReceiveTaskType",rg*="instantiate","ReceiveTaskTypeMut",s)]
    pub instantiate: Option<bool>,
    #[xml(attr = "messageRef")]
    #[tia("ReceiveTaskType",rg*="message_ref","ReceiveTaskTypeMut",s)]
    pub message_ref: Option<String>,
    #[xml(attr = "operationRef")]
    #[tia("ReceiveTaskType",rg*="operation_ref","ReceiveTaskTypeMut",s)]
    pub operation_ref: Option<String>,
}
impl DocumentElement for ReceiveTask {
    fn element(&self) -> Element {
        Element::ReceiveTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ReceiveTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TaskType for ReceiveTask {}
impl TaskTypeMut for ReceiveTask {}
//

/// Access to `receiveTask`
pub trait ReceiveTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
    /// Get value of attribute `instantiate`
    fn instantiate(&self) -> &Option<bool>;
    /// Get value of attribute `messageRef`
    fn message_ref(&self) -> &Option<String>;
    /// Get value of attribute `operationRef`
    fn operation_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ReceiveTaskType);
impl_downcast!(ReceiveTaskType);
/// Mutable access to `receiveTask`
pub trait ReceiveTaskTypeMut:
    TaskTypeMut + Downcast + Debug + Send + DynClone + ReceiveTaskType
{
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
    /// Set value of attribute `instantiate`
    fn set_instantiate(&mut self, value: Option<bool>);
    /// Set value of attribute `messageRef`
    fn set_message_ref(&mut self, value: Option<String>);
    /// Set value of attribute `operationRef`
    fn set_operation_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ReceiveTaskTypeMut);
impl_downcast!(ReceiveTaskTypeMut);
impl Cast<dyn DefinitionsType> for ReceiveTask {}
impl Cast<dyn DefinitionsTypeMut> for ReceiveTask {}
impl Cast<dyn ImportType> for ReceiveTask {}
impl Cast<dyn ImportTypeMut> for ReceiveTask {}
impl Cast<dyn ActivityType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for ReceiveTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for ReceiveTask {}
impl Cast<dyn ArtifactType> for ReceiveTask {}
impl Cast<dyn ArtifactTypeMut> for ReceiveTask {}
impl Cast<dyn AssignmentType> for ReceiveTask {}
impl Cast<dyn AssignmentTypeMut> for ReceiveTask {}
impl Cast<dyn AssociationType> for ReceiveTask {}
impl Cast<dyn AssociationTypeMut> for ReceiveTask {}
impl Cast<dyn AuditingType> for ReceiveTask {}
impl Cast<dyn AuditingTypeMut> for ReceiveTask {}
impl Cast<dyn BaseElementType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ReceiveTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ReceiveTask {}
impl Cast<dyn BoundaryEventType> for ReceiveTask {}
impl Cast<dyn BoundaryEventTypeMut> for ReceiveTask {}
impl Cast<dyn BusinessRuleTaskType> for ReceiveTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ReceiveTask {}
impl Cast<dyn CallableElementType> for ReceiveTask {}
impl Cast<dyn CallableElementTypeMut> for ReceiveTask {}
impl Cast<dyn CallActivityType> for ReceiveTask {}
impl Cast<dyn CallActivityTypeMut> for ReceiveTask {}
impl Cast<dyn CallChoreographyType> for ReceiveTask {}
impl Cast<dyn CallChoreographyTypeMut> for ReceiveTask {}
impl Cast<dyn CallConversationType> for ReceiveTask {}
impl Cast<dyn CallConversationTypeMut> for ReceiveTask {}
impl Cast<dyn CancelEventDefinitionType> for ReceiveTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn CatchEventType> for ReceiveTask {}
impl Cast<dyn CatchEventTypeMut> for ReceiveTask {}
impl Cast<dyn CategoryType> for ReceiveTask {}
impl Cast<dyn CategoryTypeMut> for ReceiveTask {}
impl Cast<dyn CategoryValueType> for ReceiveTask {}
impl Cast<dyn CategoryValueTypeMut> for ReceiveTask {}
impl Cast<dyn ChoreographyType> for ReceiveTask {}
impl Cast<dyn ChoreographyTypeMut> for ReceiveTask {}
impl Cast<dyn ChoreographyActivityType> for ReceiveTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for ReceiveTask {}
impl Cast<dyn ChoreographyTaskType> for ReceiveTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for ReceiveTask {}
impl Cast<dyn CollaborationType> for ReceiveTask {}
impl Cast<dyn CollaborationTypeMut> for ReceiveTask {}
impl Cast<dyn CompensateEventDefinitionType> for ReceiveTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ReceiveTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn ComplexGatewayType> for ReceiveTask {}
impl Cast<dyn ComplexGatewayTypeMut> for ReceiveTask {}
impl Cast<dyn ConditionalEventDefinitionType> for ReceiveTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn ConversationType> for ReceiveTask {}
impl Cast<dyn ConversationTypeMut> for ReceiveTask {}
impl Cast<dyn ConversationAssociationType> for ReceiveTask {}
impl Cast<dyn ConversationAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn ConversationLinkType> for ReceiveTask {}
impl Cast<dyn ConversationLinkTypeMut> for ReceiveTask {}
impl Cast<dyn ConversationNodeType> for ReceiveTask {}
impl Cast<dyn ConversationNodeTypeMut> for ReceiveTask {}
impl Cast<dyn CorrelationKeyType> for ReceiveTask {}
impl Cast<dyn CorrelationKeyTypeMut> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyType> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyBindingType> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ReceiveTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ReceiveTask {}
impl Cast<dyn CorrelationSubscriptionType> for ReceiveTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ReceiveTask {}
impl Cast<dyn DataAssociationType> for ReceiveTask {}
impl Cast<dyn DataAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn DataInputType> for ReceiveTask {}
impl Cast<dyn DataInputTypeMut> for ReceiveTask {}
impl Cast<dyn DataInputAssociationType> for ReceiveTask {}
impl Cast<dyn DataInputAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn DataObjectType> for ReceiveTask {}
impl Cast<dyn DataObjectTypeMut> for ReceiveTask {}
impl Cast<dyn DataObjectReferenceType> for ReceiveTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for ReceiveTask {}
impl Cast<dyn DataOutputType> for ReceiveTask {}
impl Cast<dyn DataOutputTypeMut> for ReceiveTask {}
impl Cast<dyn DataOutputAssociationType> for ReceiveTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn DataStateType> for ReceiveTask {}
impl Cast<dyn DataStateTypeMut> for ReceiveTask {}
impl Cast<dyn DataStoreType> for ReceiveTask {}
impl Cast<dyn DataStoreTypeMut> for ReceiveTask {}
impl Cast<dyn DataStoreReferenceType> for ReceiveTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for ReceiveTask {}
impl Cast<dyn DocumentationType> for ReceiveTask {}
impl Cast<dyn DocumentationTypeMut> for ReceiveTask {}
impl Cast<dyn EndEventType> for ReceiveTask {}
impl Cast<dyn EndEventTypeMut> for ReceiveTask {}
impl Cast<dyn EndPointType> for ReceiveTask {}
impl Cast<dyn EndPointTypeMut> for ReceiveTask {}
impl Cast<dyn ErrorType> for ReceiveTask {}
impl Cast<dyn ErrorTypeMut> for ReceiveTask {}
impl Cast<dyn ErrorEventDefinitionType> for ReceiveTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn EscalationType> for ReceiveTask {}
impl Cast<dyn EscalationTypeMut> for ReceiveTask {}
impl Cast<dyn EscalationEventDefinitionType> for ReceiveTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn EventType> for ReceiveTask {}
impl Cast<dyn EventTypeMut> for ReceiveTask {}
impl Cast<dyn EventBasedGatewayType> for ReceiveTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for ReceiveTask {}
impl Cast<dyn EventDefinitionType> for ReceiveTask {}
impl Cast<dyn EventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn ExclusiveGatewayType> for ReceiveTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ReceiveTask {}
impl Cast<dyn ExpressionType> for ReceiveTask {}
impl Cast<dyn ExpressionTypeMut> for ReceiveTask {}
impl Cast<dyn ExtensionType> for ReceiveTask {}
impl Cast<dyn ExtensionTypeMut> for ReceiveTask {}
impl Cast<dyn ExtensionElementsType> for ReceiveTask {}
impl Cast<dyn ExtensionElementsTypeMut> for ReceiveTask {}
impl Cast<dyn FlowElementType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ReceiveTask {}
impl Cast<dyn FormalExpressionTypeMut> for ReceiveTask {}
impl Cast<dyn GatewayType> for ReceiveTask {}
impl Cast<dyn GatewayTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ReceiveTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalChoreographyTaskType> for ReceiveTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalConversationType> for ReceiveTask {}
impl Cast<dyn GlobalConversationTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalManualTaskType> for ReceiveTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalScriptTaskType> for ReceiveTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalTaskType> for ReceiveTask {}
impl Cast<dyn GlobalTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GlobalUserTaskType> for ReceiveTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for ReceiveTask {}
impl Cast<dyn GroupType> for ReceiveTask {}
impl Cast<dyn GroupTypeMut> for ReceiveTask {}
impl Cast<dyn HumanPerformerType> for ReceiveTask {}
impl Cast<dyn HumanPerformerTypeMut> for ReceiveTask {}
impl Cast<dyn ImplicitThrowEventType> for ReceiveTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ReceiveTask {}
impl Cast<dyn InclusiveGatewayType> for ReceiveTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for ReceiveTask {}
impl Cast<dyn InputSetType> for ReceiveTask {}
impl Cast<dyn InputSetTypeMut> for ReceiveTask {}
impl Cast<dyn InterfaceType> for ReceiveTask {}
impl Cast<dyn InterfaceTypeMut> for ReceiveTask {}
impl Cast<dyn IntermediateCatchEventType> for ReceiveTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ReceiveTask {}
impl Cast<dyn IntermediateThrowEventType> for ReceiveTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ReceiveTask {}
impl Cast<dyn InputOutputBindingType> for ReceiveTask {}
impl Cast<dyn InputOutputBindingTypeMut> for ReceiveTask {}
impl Cast<dyn InputOutputSpecificationType> for ReceiveTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ReceiveTask {}
impl Cast<dyn ItemDefinitionType> for ReceiveTask {}
impl Cast<dyn ItemDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn LaneType> for ReceiveTask {}
impl Cast<dyn LaneTypeMut> for ReceiveTask {}
impl Cast<dyn LaneSetType> for ReceiveTask {}
impl Cast<dyn LaneSetTypeMut> for ReceiveTask {}
impl Cast<dyn LinkEventDefinitionType> for ReceiveTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn LoopCharacteristicsType> for ReceiveTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ReceiveTask {}
impl Cast<dyn ManualTaskType> for ReceiveTask {}
impl Cast<dyn ManualTaskTypeMut> for ReceiveTask {}
impl Cast<dyn MessageType> for ReceiveTask {}
impl Cast<dyn MessageTypeMut> for ReceiveTask {}
impl Cast<dyn MessageEventDefinitionType> for ReceiveTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn MessageFlowType> for ReceiveTask {}
impl Cast<dyn MessageFlowTypeMut> for ReceiveTask {}
impl Cast<dyn MessageFlowAssociationType> for ReceiveTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn MonitoringType> for ReceiveTask {}
impl Cast<dyn MonitoringTypeMut> for ReceiveTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ReceiveTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ReceiveTask {}
impl Cast<dyn OperationType> for ReceiveTask {}
impl Cast<dyn OperationTypeMut> for ReceiveTask {}
impl Cast<dyn OutputSetType> for ReceiveTask {}
impl Cast<dyn OutputSetTypeMut> for ReceiveTask {}
impl Cast<dyn ParallelGatewayType> for ReceiveTask {}
impl Cast<dyn ParallelGatewayTypeMut> for ReceiveTask {}
impl Cast<dyn ParticipantType> for ReceiveTask {}
impl Cast<dyn ParticipantTypeMut> for ReceiveTask {}
impl Cast<dyn ParticipantAssociationType> for ReceiveTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for ReceiveTask {}
impl Cast<dyn ParticipantMultiplicityType> for ReceiveTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ReceiveTask {}
impl Cast<dyn PartnerEntityType> for ReceiveTask {}
impl Cast<dyn PartnerEntityTypeMut> for ReceiveTask {}
impl Cast<dyn PartnerRoleType> for ReceiveTask {}
impl Cast<dyn PartnerRoleTypeMut> for ReceiveTask {}
impl Cast<dyn PerformerType> for ReceiveTask {}
impl Cast<dyn PerformerTypeMut> for ReceiveTask {}
impl Cast<dyn PotentialOwnerType> for ReceiveTask {}
impl Cast<dyn PotentialOwnerTypeMut> for ReceiveTask {}
impl Cast<dyn ProcessType> for ReceiveTask {}
impl Cast<dyn ProcessTypeMut> for ReceiveTask {}
impl Cast<dyn PropertyType> for ReceiveTask {}
impl Cast<dyn PropertyTypeMut> for ReceiveTask {}
impl Cast<dyn ReceiveTaskType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RelationshipType> for ReceiveTask {}
impl Cast<dyn RelationshipTypeMut> for ReceiveTask {}
impl Cast<dyn RenderingType> for ReceiveTask {}
impl Cast<dyn RenderingTypeMut> for ReceiveTask {}
impl Cast<dyn ResourceType> for ReceiveTask {}
impl Cast<dyn ResourceTypeMut> for ReceiveTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for ReceiveTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ReceiveTask {}
impl Cast<dyn ResourceParameterType> for ReceiveTask {}
impl Cast<dyn ResourceParameterTypeMut> for ReceiveTask {}
impl Cast<dyn ResourceParameterBindingType> for ReceiveTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ReceiveTask {}
impl Cast<dyn ResourceRoleType> for ReceiveTask {}
impl Cast<dyn ResourceRoleTypeMut> for ReceiveTask {}
impl Cast<dyn RootElementType> for ReceiveTask {}
impl Cast<dyn RootElementTypeMut> for ReceiveTask {}
impl Cast<dyn ScriptTaskType> for ReceiveTask {}
impl Cast<dyn ScriptTaskTypeMut> for ReceiveTask {}
impl Cast<dyn ScriptType> for ReceiveTask {}
impl Cast<dyn ScriptTypeMut> for ReceiveTask {}
impl Cast<dyn SendTaskType> for ReceiveTask {}
impl Cast<dyn SendTaskTypeMut> for ReceiveTask {}
impl Cast<dyn SequenceFlowType> for ReceiveTask {}
impl Cast<dyn SequenceFlowTypeMut> for ReceiveTask {}
impl Cast<dyn ServiceTaskType> for ReceiveTask {}
impl Cast<dyn ServiceTaskTypeMut> for ReceiveTask {}
impl Cast<dyn SignalType> for ReceiveTask {}
impl Cast<dyn SignalTypeMut> for ReceiveTask {}
impl Cast<dyn SignalEventDefinitionType> for ReceiveTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for ReceiveTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ReceiveTask {}
impl Cast<dyn StartEventType> for ReceiveTask {}
impl Cast<dyn StartEventTypeMut> for ReceiveTask {}
impl Cast<dyn SubChoreographyType> for ReceiveTask {}
impl Cast<dyn SubChoreographyTypeMut> for ReceiveTask {}
impl Cast<dyn SubConversationType> for ReceiveTask {}
impl Cast<dyn SubConversationTypeMut> for ReceiveTask {}
impl Cast<dyn SubProcessType> for ReceiveTask {}
impl Cast<dyn SubProcessTypeMut> for ReceiveTask {}
impl Cast<dyn TaskType> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for ReceiveTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for ReceiveTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn TextAnnotationType> for ReceiveTask {}
impl Cast<dyn TextAnnotationTypeMut> for ReceiveTask {}
impl Cast<dyn TextType> for ReceiveTask {}
impl Cast<dyn TextTypeMut> for ReceiveTask {}
impl Cast<dyn ThrowEventType> for ReceiveTask {}
impl Cast<dyn ThrowEventTypeMut> for ReceiveTask {}
impl Cast<dyn TimerEventDefinitionType> for ReceiveTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ReceiveTask {}
impl Cast<dyn TransactionType> for ReceiveTask {}
impl Cast<dyn TransactionTypeMut> for ReceiveTask {}
impl Cast<dyn UserTaskType> for ReceiveTask {}
impl Cast<dyn UserTaskTypeMut> for ReceiveTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:relationship")]
pub struct Relationship {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "type")]
    #[tia("RelationshipType",rg*="typ","RelationshipTypeMut",s)]
    pub typ: String,
    #[xml(attr = "direction")]
    #[tia("RelationshipType",rg*="direction","RelationshipTypeMut",s)]
    pub direction: Option<String>,
    #[xml(flatten_text = "bpmn:source")]
    #[tia("RelationshipType",rg*="sources","RelationshipTypeMut",s,rmg*="sources_mut")]
    pub sources: Vec<String>,
    #[xml(flatten_text = "bpmn:target")]
    #[tia("RelationshipType",rg*="targets","RelationshipTypeMut",s,rmg*="targets_mut")]
    pub targets: Vec<String>,
}
impl DocumentElement for Relationship {
    fn element(&self) -> Element {
        Element::Relationship
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Relationship {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `relationship`
pub trait RelationshipType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `type`
    fn typ(&self) -> &String;
    /// Get value of attribute `direction`
    fn direction(&self) -> &Option<String>;
    /// Get value of `source` child
    fn sources(&self) -> &Vec<String>;
    /// Get value of `target` child
    fn targets(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(RelationshipType);
impl_downcast!(RelationshipType);
/// Mutable access to `relationship`
pub trait RelationshipTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + RelationshipType
{
    /// Set value of attribute `type`
    fn set_typ(&mut self, value: String);
    /// Set value of attribute `direction`
    fn set_direction(&mut self, value: Option<String>);
    /// Get a mutable value of `source` child
    fn sources_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `source` child
    fn set_sources(&mut self, value: Vec<String>);
    /// Get a mutable value of `target` child
    fn targets_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `target` child
    fn set_targets(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(RelationshipTypeMut);
impl_downcast!(RelationshipTypeMut);
impl Cast<dyn DefinitionsType> for Relationship {}
impl Cast<dyn DefinitionsTypeMut> for Relationship {}
impl Cast<dyn ImportType> for Relationship {}
impl Cast<dyn ImportTypeMut> for Relationship {}
impl Cast<dyn ActivityType> for Relationship {}
impl Cast<dyn ActivityTypeMut> for Relationship {}
impl Cast<dyn AdHocSubProcessType> for Relationship {}
impl Cast<dyn AdHocSubProcessTypeMut> for Relationship {}
impl Cast<dyn ArtifactType> for Relationship {}
impl Cast<dyn ArtifactTypeMut> for Relationship {}
impl Cast<dyn AssignmentType> for Relationship {}
impl Cast<dyn AssignmentTypeMut> for Relationship {}
impl Cast<dyn AssociationType> for Relationship {}
impl Cast<dyn AssociationTypeMut> for Relationship {}
impl Cast<dyn AuditingType> for Relationship {}
impl Cast<dyn AuditingTypeMut> for Relationship {}
impl Cast<dyn BaseElementType> for Relationship {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Relationship {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Relationship {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Relationship {}
impl Cast<dyn BoundaryEventType> for Relationship {}
impl Cast<dyn BoundaryEventTypeMut> for Relationship {}
impl Cast<dyn BusinessRuleTaskType> for Relationship {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Relationship {}
impl Cast<dyn CallableElementType> for Relationship {}
impl Cast<dyn CallableElementTypeMut> for Relationship {}
impl Cast<dyn CallActivityType> for Relationship {}
impl Cast<dyn CallActivityTypeMut> for Relationship {}
impl Cast<dyn CallChoreographyType> for Relationship {}
impl Cast<dyn CallChoreographyTypeMut> for Relationship {}
impl Cast<dyn CallConversationType> for Relationship {}
impl Cast<dyn CallConversationTypeMut> for Relationship {}
impl Cast<dyn CancelEventDefinitionType> for Relationship {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn CatchEventType> for Relationship {}
impl Cast<dyn CatchEventTypeMut> for Relationship {}
impl Cast<dyn CategoryType> for Relationship {}
impl Cast<dyn CategoryTypeMut> for Relationship {}
impl Cast<dyn CategoryValueType> for Relationship {}
impl Cast<dyn CategoryValueTypeMut> for Relationship {}
impl Cast<dyn ChoreographyType> for Relationship {}
impl Cast<dyn ChoreographyTypeMut> for Relationship {}
impl Cast<dyn ChoreographyActivityType> for Relationship {}
impl Cast<dyn ChoreographyActivityTypeMut> for Relationship {}
impl Cast<dyn ChoreographyTaskType> for Relationship {}
impl Cast<dyn ChoreographyTaskTypeMut> for Relationship {}
impl Cast<dyn CollaborationType> for Relationship {}
impl Cast<dyn CollaborationTypeMut> for Relationship {}
impl Cast<dyn CompensateEventDefinitionType> for Relationship {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Relationship {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Relationship {}
impl Cast<dyn ComplexGatewayType> for Relationship {}
impl Cast<dyn ComplexGatewayTypeMut> for Relationship {}
impl Cast<dyn ConditionalEventDefinitionType> for Relationship {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn ConversationType> for Relationship {}
impl Cast<dyn ConversationTypeMut> for Relationship {}
impl Cast<dyn ConversationAssociationType> for Relationship {}
impl Cast<dyn ConversationAssociationTypeMut> for Relationship {}
impl Cast<dyn ConversationLinkType> for Relationship {}
impl Cast<dyn ConversationLinkTypeMut> for Relationship {}
impl Cast<dyn ConversationNodeType> for Relationship {}
impl Cast<dyn ConversationNodeTypeMut> for Relationship {}
impl Cast<dyn CorrelationKeyType> for Relationship {}
impl Cast<dyn CorrelationKeyTypeMut> for Relationship {}
impl Cast<dyn CorrelationPropertyType> for Relationship {}
impl Cast<dyn CorrelationPropertyTypeMut> for Relationship {}
impl Cast<dyn CorrelationPropertyBindingType> for Relationship {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Relationship {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Relationship {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Relationship {}
impl Cast<dyn CorrelationSubscriptionType> for Relationship {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Relationship {}
impl Cast<dyn DataAssociationType> for Relationship {}
impl Cast<dyn DataAssociationTypeMut> for Relationship {}
impl Cast<dyn DataInputType> for Relationship {}
impl Cast<dyn DataInputTypeMut> for Relationship {}
impl Cast<dyn DataInputAssociationType> for Relationship {}
impl Cast<dyn DataInputAssociationTypeMut> for Relationship {}
impl Cast<dyn DataObjectType> for Relationship {}
impl Cast<dyn DataObjectTypeMut> for Relationship {}
impl Cast<dyn DataObjectReferenceType> for Relationship {}
impl Cast<dyn DataObjectReferenceTypeMut> for Relationship {}
impl Cast<dyn DataOutputType> for Relationship {}
impl Cast<dyn DataOutputTypeMut> for Relationship {}
impl Cast<dyn DataOutputAssociationType> for Relationship {}
impl Cast<dyn DataOutputAssociationTypeMut> for Relationship {}
impl Cast<dyn DataStateType> for Relationship {}
impl Cast<dyn DataStateTypeMut> for Relationship {}
impl Cast<dyn DataStoreType> for Relationship {}
impl Cast<dyn DataStoreTypeMut> for Relationship {}
impl Cast<dyn DataStoreReferenceType> for Relationship {}
impl Cast<dyn DataStoreReferenceTypeMut> for Relationship {}
impl Cast<dyn DocumentationType> for Relationship {}
impl Cast<dyn DocumentationTypeMut> for Relationship {}
impl Cast<dyn EndEventType> for Relationship {}
impl Cast<dyn EndEventTypeMut> for Relationship {}
impl Cast<dyn EndPointType> for Relationship {}
impl Cast<dyn EndPointTypeMut> for Relationship {}
impl Cast<dyn ErrorType> for Relationship {}
impl Cast<dyn ErrorTypeMut> for Relationship {}
impl Cast<dyn ErrorEventDefinitionType> for Relationship {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn EscalationType> for Relationship {}
impl Cast<dyn EscalationTypeMut> for Relationship {}
impl Cast<dyn EscalationEventDefinitionType> for Relationship {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn EventType> for Relationship {}
impl Cast<dyn EventTypeMut> for Relationship {}
impl Cast<dyn EventBasedGatewayType> for Relationship {}
impl Cast<dyn EventBasedGatewayTypeMut> for Relationship {}
impl Cast<dyn EventDefinitionType> for Relationship {}
impl Cast<dyn EventDefinitionTypeMut> for Relationship {}
impl Cast<dyn ExclusiveGatewayType> for Relationship {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Relationship {}
impl Cast<dyn ExpressionType> for Relationship {}
impl Cast<dyn ExpressionTypeMut> for Relationship {}
impl Cast<dyn ExtensionType> for Relationship {}
impl Cast<dyn ExtensionTypeMut> for Relationship {}
impl Cast<dyn ExtensionElementsType> for Relationship {}
impl Cast<dyn ExtensionElementsTypeMut> for Relationship {}
impl Cast<dyn FlowElementType> for Relationship {}
impl Cast<dyn FlowElementTypeMut> for Relationship {}
impl Cast<dyn FlowNodeType> for Relationship {}
impl Cast<dyn FlowNodeTypeMut> for Relationship {}
impl Cast<dyn FormalExpressionType> for Relationship {}
impl Cast<dyn FormalExpressionTypeMut> for Relationship {}
impl Cast<dyn GatewayType> for Relationship {}
impl Cast<dyn GatewayTypeMut> for Relationship {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Relationship {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Relationship {}
impl Cast<dyn GlobalChoreographyTaskType> for Relationship {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Relationship {}
impl Cast<dyn GlobalConversationType> for Relationship {}
impl Cast<dyn GlobalConversationTypeMut> for Relationship {}
impl Cast<dyn GlobalManualTaskType> for Relationship {}
impl Cast<dyn GlobalManualTaskTypeMut> for Relationship {}
impl Cast<dyn GlobalScriptTaskType> for Relationship {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Relationship {}
impl Cast<dyn GlobalTaskType> for Relationship {}
impl Cast<dyn GlobalTaskTypeMut> for Relationship {}
impl Cast<dyn GlobalUserTaskType> for Relationship {}
impl Cast<dyn GlobalUserTaskTypeMut> for Relationship {}
impl Cast<dyn GroupType> for Relationship {}
impl Cast<dyn GroupTypeMut> for Relationship {}
impl Cast<dyn HumanPerformerType> for Relationship {}
impl Cast<dyn HumanPerformerTypeMut> for Relationship {}
impl Cast<dyn ImplicitThrowEventType> for Relationship {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Relationship {}
impl Cast<dyn InclusiveGatewayType> for Relationship {}
impl Cast<dyn InclusiveGatewayTypeMut> for Relationship {}
impl Cast<dyn InputSetType> for Relationship {}
impl Cast<dyn InputSetTypeMut> for Relationship {}
impl Cast<dyn InterfaceType> for Relationship {}
impl Cast<dyn InterfaceTypeMut> for Relationship {}
impl Cast<dyn IntermediateCatchEventType> for Relationship {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Relationship {}
impl Cast<dyn IntermediateThrowEventType> for Relationship {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Relationship {}
impl Cast<dyn InputOutputBindingType> for Relationship {}
impl Cast<dyn InputOutputBindingTypeMut> for Relationship {}
impl Cast<dyn InputOutputSpecificationType> for Relationship {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Relationship {}
impl Cast<dyn ItemDefinitionType> for Relationship {}
impl Cast<dyn ItemDefinitionTypeMut> for Relationship {}
impl Cast<dyn LaneType> for Relationship {}
impl Cast<dyn LaneTypeMut> for Relationship {}
impl Cast<dyn LaneSetType> for Relationship {}
impl Cast<dyn LaneSetTypeMut> for Relationship {}
impl Cast<dyn LinkEventDefinitionType> for Relationship {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn LoopCharacteristicsType> for Relationship {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Relationship {}
impl Cast<dyn ManualTaskType> for Relationship {}
impl Cast<dyn ManualTaskTypeMut> for Relationship {}
impl Cast<dyn MessageType> for Relationship {}
impl Cast<dyn MessageTypeMut> for Relationship {}
impl Cast<dyn MessageEventDefinitionType> for Relationship {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn MessageFlowType> for Relationship {}
impl Cast<dyn MessageFlowTypeMut> for Relationship {}
impl Cast<dyn MessageFlowAssociationType> for Relationship {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Relationship {}
impl Cast<dyn MonitoringType> for Relationship {}
impl Cast<dyn MonitoringTypeMut> for Relationship {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Relationship {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Relationship {}
impl Cast<dyn OperationType> for Relationship {}
impl Cast<dyn OperationTypeMut> for Relationship {}
impl Cast<dyn OutputSetType> for Relationship {}
impl Cast<dyn OutputSetTypeMut> for Relationship {}
impl Cast<dyn ParallelGatewayType> for Relationship {}
impl Cast<dyn ParallelGatewayTypeMut> for Relationship {}
impl Cast<dyn ParticipantType> for Relationship {}
impl Cast<dyn ParticipantTypeMut> for Relationship {}
impl Cast<dyn ParticipantAssociationType> for Relationship {}
impl Cast<dyn ParticipantAssociationTypeMut> for Relationship {}
impl Cast<dyn ParticipantMultiplicityType> for Relationship {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Relationship {}
impl Cast<dyn PartnerEntityType> for Relationship {}
impl Cast<dyn PartnerEntityTypeMut> for Relationship {}
impl Cast<dyn PartnerRoleType> for Relationship {}
impl Cast<dyn PartnerRoleTypeMut> for Relationship {}
impl Cast<dyn PerformerType> for Relationship {}
impl Cast<dyn PerformerTypeMut> for Relationship {}
impl Cast<dyn PotentialOwnerType> for Relationship {}
impl Cast<dyn PotentialOwnerTypeMut> for Relationship {}
impl Cast<dyn ProcessType> for Relationship {}
impl Cast<dyn ProcessTypeMut> for Relationship {}
impl Cast<dyn PropertyType> for Relationship {}
impl Cast<dyn PropertyTypeMut> for Relationship {}
impl Cast<dyn ReceiveTaskType> for Relationship {}
impl Cast<dyn ReceiveTaskTypeMut> for Relationship {}
impl Cast<dyn RelationshipType> for Relationship {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RelationshipTypeMut> for Relationship {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RenderingType> for Relationship {}
impl Cast<dyn RenderingTypeMut> for Relationship {}
impl Cast<dyn ResourceType> for Relationship {}
impl Cast<dyn ResourceTypeMut> for Relationship {}
impl Cast<dyn ResourceAssignmentExpressionType> for Relationship {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Relationship {}
impl Cast<dyn ResourceParameterType> for Relationship {}
impl Cast<dyn ResourceParameterTypeMut> for Relationship {}
impl Cast<dyn ResourceParameterBindingType> for Relationship {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Relationship {}
impl Cast<dyn ResourceRoleType> for Relationship {}
impl Cast<dyn ResourceRoleTypeMut> for Relationship {}
impl Cast<dyn RootElementType> for Relationship {}
impl Cast<dyn RootElementTypeMut> for Relationship {}
impl Cast<dyn ScriptTaskType> for Relationship {}
impl Cast<dyn ScriptTaskTypeMut> for Relationship {}
impl Cast<dyn ScriptType> for Relationship {}
impl Cast<dyn ScriptTypeMut> for Relationship {}
impl Cast<dyn SendTaskType> for Relationship {}
impl Cast<dyn SendTaskTypeMut> for Relationship {}
impl Cast<dyn SequenceFlowType> for Relationship {}
impl Cast<dyn SequenceFlowTypeMut> for Relationship {}
impl Cast<dyn ServiceTaskType> for Relationship {}
impl Cast<dyn ServiceTaskTypeMut> for Relationship {}
impl Cast<dyn SignalType> for Relationship {}
impl Cast<dyn SignalTypeMut> for Relationship {}
impl Cast<dyn SignalEventDefinitionType> for Relationship {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn StandardLoopCharacteristicsType> for Relationship {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Relationship {}
impl Cast<dyn StartEventType> for Relationship {}
impl Cast<dyn StartEventTypeMut> for Relationship {}
impl Cast<dyn SubChoreographyType> for Relationship {}
impl Cast<dyn SubChoreographyTypeMut> for Relationship {}
impl Cast<dyn SubConversationType> for Relationship {}
impl Cast<dyn SubConversationTypeMut> for Relationship {}
impl Cast<dyn SubProcessType> for Relationship {}
impl Cast<dyn SubProcessTypeMut> for Relationship {}
impl Cast<dyn TaskType> for Relationship {}
impl Cast<dyn TaskTypeMut> for Relationship {}
impl Cast<dyn TerminateEventDefinitionType> for Relationship {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn TextAnnotationType> for Relationship {}
impl Cast<dyn TextAnnotationTypeMut> for Relationship {}
impl Cast<dyn TextType> for Relationship {}
impl Cast<dyn TextTypeMut> for Relationship {}
impl Cast<dyn ThrowEventType> for Relationship {}
impl Cast<dyn ThrowEventTypeMut> for Relationship {}
impl Cast<dyn TimerEventDefinitionType> for Relationship {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Relationship {}
impl Cast<dyn TransactionType> for Relationship {}
impl Cast<dyn TransactionTypeMut> for Relationship {}
impl Cast<dyn UserTaskType> for Relationship {}
impl Cast<dyn UserTaskTypeMut> for Relationship {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:rendering")]
pub struct Rendering {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for Rendering {
    fn element(&self) -> Element {
        Element::Rendering
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Rendering {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RenderingType for Rendering {}
impl RenderingTypeMut for Rendering {}
//

/// Access to `rendering`
pub trait RenderingType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(RenderingType);
impl_downcast!(RenderingType);
/// Mutable access to `rendering`
pub trait RenderingTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + RenderingType
{
}
dyn_clone::clone_trait_object!(RenderingTypeMut);
impl_downcast!(RenderingTypeMut);
impl Cast<dyn DefinitionsType> for Rendering {}
impl Cast<dyn DefinitionsTypeMut> for Rendering {}
impl Cast<dyn ImportType> for Rendering {}
impl Cast<dyn ImportTypeMut> for Rendering {}
impl Cast<dyn ActivityType> for Rendering {}
impl Cast<dyn ActivityTypeMut> for Rendering {}
impl Cast<dyn AdHocSubProcessType> for Rendering {}
impl Cast<dyn AdHocSubProcessTypeMut> for Rendering {}
impl Cast<dyn ArtifactType> for Rendering {}
impl Cast<dyn ArtifactTypeMut> for Rendering {}
impl Cast<dyn AssignmentType> for Rendering {}
impl Cast<dyn AssignmentTypeMut> for Rendering {}
impl Cast<dyn AssociationType> for Rendering {}
impl Cast<dyn AssociationTypeMut> for Rendering {}
impl Cast<dyn AuditingType> for Rendering {}
impl Cast<dyn AuditingTypeMut> for Rendering {}
impl Cast<dyn BaseElementType> for Rendering {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Rendering {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Rendering {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Rendering {}
impl Cast<dyn BoundaryEventType> for Rendering {}
impl Cast<dyn BoundaryEventTypeMut> for Rendering {}
impl Cast<dyn BusinessRuleTaskType> for Rendering {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Rendering {}
impl Cast<dyn CallableElementType> for Rendering {}
impl Cast<dyn CallableElementTypeMut> for Rendering {}
impl Cast<dyn CallActivityType> for Rendering {}
impl Cast<dyn CallActivityTypeMut> for Rendering {}
impl Cast<dyn CallChoreographyType> for Rendering {}
impl Cast<dyn CallChoreographyTypeMut> for Rendering {}
impl Cast<dyn CallConversationType> for Rendering {}
impl Cast<dyn CallConversationTypeMut> for Rendering {}
impl Cast<dyn CancelEventDefinitionType> for Rendering {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn CatchEventType> for Rendering {}
impl Cast<dyn CatchEventTypeMut> for Rendering {}
impl Cast<dyn CategoryType> for Rendering {}
impl Cast<dyn CategoryTypeMut> for Rendering {}
impl Cast<dyn CategoryValueType> for Rendering {}
impl Cast<dyn CategoryValueTypeMut> for Rendering {}
impl Cast<dyn ChoreographyType> for Rendering {}
impl Cast<dyn ChoreographyTypeMut> for Rendering {}
impl Cast<dyn ChoreographyActivityType> for Rendering {}
impl Cast<dyn ChoreographyActivityTypeMut> for Rendering {}
impl Cast<dyn ChoreographyTaskType> for Rendering {}
impl Cast<dyn ChoreographyTaskTypeMut> for Rendering {}
impl Cast<dyn CollaborationType> for Rendering {}
impl Cast<dyn CollaborationTypeMut> for Rendering {}
impl Cast<dyn CompensateEventDefinitionType> for Rendering {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Rendering {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Rendering {}
impl Cast<dyn ComplexGatewayType> for Rendering {}
impl Cast<dyn ComplexGatewayTypeMut> for Rendering {}
impl Cast<dyn ConditionalEventDefinitionType> for Rendering {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn ConversationType> for Rendering {}
impl Cast<dyn ConversationTypeMut> for Rendering {}
impl Cast<dyn ConversationAssociationType> for Rendering {}
impl Cast<dyn ConversationAssociationTypeMut> for Rendering {}
impl Cast<dyn ConversationLinkType> for Rendering {}
impl Cast<dyn ConversationLinkTypeMut> for Rendering {}
impl Cast<dyn ConversationNodeType> for Rendering {}
impl Cast<dyn ConversationNodeTypeMut> for Rendering {}
impl Cast<dyn CorrelationKeyType> for Rendering {}
impl Cast<dyn CorrelationKeyTypeMut> for Rendering {}
impl Cast<dyn CorrelationPropertyType> for Rendering {}
impl Cast<dyn CorrelationPropertyTypeMut> for Rendering {}
impl Cast<dyn CorrelationPropertyBindingType> for Rendering {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Rendering {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Rendering {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Rendering {}
impl Cast<dyn CorrelationSubscriptionType> for Rendering {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Rendering {}
impl Cast<dyn DataAssociationType> for Rendering {}
impl Cast<dyn DataAssociationTypeMut> for Rendering {}
impl Cast<dyn DataInputType> for Rendering {}
impl Cast<dyn DataInputTypeMut> for Rendering {}
impl Cast<dyn DataInputAssociationType> for Rendering {}
impl Cast<dyn DataInputAssociationTypeMut> for Rendering {}
impl Cast<dyn DataObjectType> for Rendering {}
impl Cast<dyn DataObjectTypeMut> for Rendering {}
impl Cast<dyn DataObjectReferenceType> for Rendering {}
impl Cast<dyn DataObjectReferenceTypeMut> for Rendering {}
impl Cast<dyn DataOutputType> for Rendering {}
impl Cast<dyn DataOutputTypeMut> for Rendering {}
impl Cast<dyn DataOutputAssociationType> for Rendering {}
impl Cast<dyn DataOutputAssociationTypeMut> for Rendering {}
impl Cast<dyn DataStateType> for Rendering {}
impl Cast<dyn DataStateTypeMut> for Rendering {}
impl Cast<dyn DataStoreType> for Rendering {}
impl Cast<dyn DataStoreTypeMut> for Rendering {}
impl Cast<dyn DataStoreReferenceType> for Rendering {}
impl Cast<dyn DataStoreReferenceTypeMut> for Rendering {}
impl Cast<dyn DocumentationType> for Rendering {}
impl Cast<dyn DocumentationTypeMut> for Rendering {}
impl Cast<dyn EndEventType> for Rendering {}
impl Cast<dyn EndEventTypeMut> for Rendering {}
impl Cast<dyn EndPointType> for Rendering {}
impl Cast<dyn EndPointTypeMut> for Rendering {}
impl Cast<dyn ErrorType> for Rendering {}
impl Cast<dyn ErrorTypeMut> for Rendering {}
impl Cast<dyn ErrorEventDefinitionType> for Rendering {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn EscalationType> for Rendering {}
impl Cast<dyn EscalationTypeMut> for Rendering {}
impl Cast<dyn EscalationEventDefinitionType> for Rendering {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn EventType> for Rendering {}
impl Cast<dyn EventTypeMut> for Rendering {}
impl Cast<dyn EventBasedGatewayType> for Rendering {}
impl Cast<dyn EventBasedGatewayTypeMut> for Rendering {}
impl Cast<dyn EventDefinitionType> for Rendering {}
impl Cast<dyn EventDefinitionTypeMut> for Rendering {}
impl Cast<dyn ExclusiveGatewayType> for Rendering {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Rendering {}
impl Cast<dyn ExpressionType> for Rendering {}
impl Cast<dyn ExpressionTypeMut> for Rendering {}
impl Cast<dyn ExtensionType> for Rendering {}
impl Cast<dyn ExtensionTypeMut> for Rendering {}
impl Cast<dyn ExtensionElementsType> for Rendering {}
impl Cast<dyn ExtensionElementsTypeMut> for Rendering {}
impl Cast<dyn FlowElementType> for Rendering {}
impl Cast<dyn FlowElementTypeMut> for Rendering {}
impl Cast<dyn FlowNodeType> for Rendering {}
impl Cast<dyn FlowNodeTypeMut> for Rendering {}
impl Cast<dyn FormalExpressionType> for Rendering {}
impl Cast<dyn FormalExpressionTypeMut> for Rendering {}
impl Cast<dyn GatewayType> for Rendering {}
impl Cast<dyn GatewayTypeMut> for Rendering {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Rendering {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Rendering {}
impl Cast<dyn GlobalChoreographyTaskType> for Rendering {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Rendering {}
impl Cast<dyn GlobalConversationType> for Rendering {}
impl Cast<dyn GlobalConversationTypeMut> for Rendering {}
impl Cast<dyn GlobalManualTaskType> for Rendering {}
impl Cast<dyn GlobalManualTaskTypeMut> for Rendering {}
impl Cast<dyn GlobalScriptTaskType> for Rendering {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Rendering {}
impl Cast<dyn GlobalTaskType> for Rendering {}
impl Cast<dyn GlobalTaskTypeMut> for Rendering {}
impl Cast<dyn GlobalUserTaskType> for Rendering {}
impl Cast<dyn GlobalUserTaskTypeMut> for Rendering {}
impl Cast<dyn GroupType> for Rendering {}
impl Cast<dyn GroupTypeMut> for Rendering {}
impl Cast<dyn HumanPerformerType> for Rendering {}
impl Cast<dyn HumanPerformerTypeMut> for Rendering {}
impl Cast<dyn ImplicitThrowEventType> for Rendering {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Rendering {}
impl Cast<dyn InclusiveGatewayType> for Rendering {}
impl Cast<dyn InclusiveGatewayTypeMut> for Rendering {}
impl Cast<dyn InputSetType> for Rendering {}
impl Cast<dyn InputSetTypeMut> for Rendering {}
impl Cast<dyn InterfaceType> for Rendering {}
impl Cast<dyn InterfaceTypeMut> for Rendering {}
impl Cast<dyn IntermediateCatchEventType> for Rendering {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Rendering {}
impl Cast<dyn IntermediateThrowEventType> for Rendering {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Rendering {}
impl Cast<dyn InputOutputBindingType> for Rendering {}
impl Cast<dyn InputOutputBindingTypeMut> for Rendering {}
impl Cast<dyn InputOutputSpecificationType> for Rendering {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Rendering {}
impl Cast<dyn ItemDefinitionType> for Rendering {}
impl Cast<dyn ItemDefinitionTypeMut> for Rendering {}
impl Cast<dyn LaneType> for Rendering {}
impl Cast<dyn LaneTypeMut> for Rendering {}
impl Cast<dyn LaneSetType> for Rendering {}
impl Cast<dyn LaneSetTypeMut> for Rendering {}
impl Cast<dyn LinkEventDefinitionType> for Rendering {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn LoopCharacteristicsType> for Rendering {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Rendering {}
impl Cast<dyn ManualTaskType> for Rendering {}
impl Cast<dyn ManualTaskTypeMut> for Rendering {}
impl Cast<dyn MessageType> for Rendering {}
impl Cast<dyn MessageTypeMut> for Rendering {}
impl Cast<dyn MessageEventDefinitionType> for Rendering {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn MessageFlowType> for Rendering {}
impl Cast<dyn MessageFlowTypeMut> for Rendering {}
impl Cast<dyn MessageFlowAssociationType> for Rendering {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Rendering {}
impl Cast<dyn MonitoringType> for Rendering {}
impl Cast<dyn MonitoringTypeMut> for Rendering {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Rendering {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Rendering {}
impl Cast<dyn OperationType> for Rendering {}
impl Cast<dyn OperationTypeMut> for Rendering {}
impl Cast<dyn OutputSetType> for Rendering {}
impl Cast<dyn OutputSetTypeMut> for Rendering {}
impl Cast<dyn ParallelGatewayType> for Rendering {}
impl Cast<dyn ParallelGatewayTypeMut> for Rendering {}
impl Cast<dyn ParticipantType> for Rendering {}
impl Cast<dyn ParticipantTypeMut> for Rendering {}
impl Cast<dyn ParticipantAssociationType> for Rendering {}
impl Cast<dyn ParticipantAssociationTypeMut> for Rendering {}
impl Cast<dyn ParticipantMultiplicityType> for Rendering {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Rendering {}
impl Cast<dyn PartnerEntityType> for Rendering {}
impl Cast<dyn PartnerEntityTypeMut> for Rendering {}
impl Cast<dyn PartnerRoleType> for Rendering {}
impl Cast<dyn PartnerRoleTypeMut> for Rendering {}
impl Cast<dyn PerformerType> for Rendering {}
impl Cast<dyn PerformerTypeMut> for Rendering {}
impl Cast<dyn PotentialOwnerType> for Rendering {}
impl Cast<dyn PotentialOwnerTypeMut> for Rendering {}
impl Cast<dyn ProcessType> for Rendering {}
impl Cast<dyn ProcessTypeMut> for Rendering {}
impl Cast<dyn PropertyType> for Rendering {}
impl Cast<dyn PropertyTypeMut> for Rendering {}
impl Cast<dyn ReceiveTaskType> for Rendering {}
impl Cast<dyn ReceiveTaskTypeMut> for Rendering {}
impl Cast<dyn RelationshipType> for Rendering {}
impl Cast<dyn RelationshipTypeMut> for Rendering {}
impl Cast<dyn RenderingType> for Rendering {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RenderingTypeMut> for Rendering {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceType> for Rendering {}
impl Cast<dyn ResourceTypeMut> for Rendering {}
impl Cast<dyn ResourceAssignmentExpressionType> for Rendering {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Rendering {}
impl Cast<dyn ResourceParameterType> for Rendering {}
impl Cast<dyn ResourceParameterTypeMut> for Rendering {}
impl Cast<dyn ResourceParameterBindingType> for Rendering {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Rendering {}
impl Cast<dyn ResourceRoleType> for Rendering {}
impl Cast<dyn ResourceRoleTypeMut> for Rendering {}
impl Cast<dyn RootElementType> for Rendering {}
impl Cast<dyn RootElementTypeMut> for Rendering {}
impl Cast<dyn ScriptTaskType> for Rendering {}
impl Cast<dyn ScriptTaskTypeMut> for Rendering {}
impl Cast<dyn ScriptType> for Rendering {}
impl Cast<dyn ScriptTypeMut> for Rendering {}
impl Cast<dyn SendTaskType> for Rendering {}
impl Cast<dyn SendTaskTypeMut> for Rendering {}
impl Cast<dyn SequenceFlowType> for Rendering {}
impl Cast<dyn SequenceFlowTypeMut> for Rendering {}
impl Cast<dyn ServiceTaskType> for Rendering {}
impl Cast<dyn ServiceTaskTypeMut> for Rendering {}
impl Cast<dyn SignalType> for Rendering {}
impl Cast<dyn SignalTypeMut> for Rendering {}
impl Cast<dyn SignalEventDefinitionType> for Rendering {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn StandardLoopCharacteristicsType> for Rendering {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Rendering {}
impl Cast<dyn StartEventType> for Rendering {}
impl Cast<dyn StartEventTypeMut> for Rendering {}
impl Cast<dyn SubChoreographyType> for Rendering {}
impl Cast<dyn SubChoreographyTypeMut> for Rendering {}
impl Cast<dyn SubConversationType> for Rendering {}
impl Cast<dyn SubConversationTypeMut> for Rendering {}
impl Cast<dyn SubProcessType> for Rendering {}
impl Cast<dyn SubProcessTypeMut> for Rendering {}
impl Cast<dyn TaskType> for Rendering {}
impl Cast<dyn TaskTypeMut> for Rendering {}
impl Cast<dyn TerminateEventDefinitionType> for Rendering {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn TextAnnotationType> for Rendering {}
impl Cast<dyn TextAnnotationTypeMut> for Rendering {}
impl Cast<dyn TextType> for Rendering {}
impl Cast<dyn TextTypeMut> for Rendering {}
impl Cast<dyn ThrowEventType> for Rendering {}
impl Cast<dyn ThrowEventTypeMut> for Rendering {}
impl Cast<dyn TimerEventDefinitionType> for Rendering {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Rendering {}
impl Cast<dyn TransactionType> for Rendering {}
impl Cast<dyn TransactionTypeMut> for Rendering {}
impl Cast<dyn UserTaskType> for Rendering {}
impl Cast<dyn UserTaskTypeMut> for Rendering {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:resource")]
pub struct Resource {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceType",rg*="name","ResourceTypeMut",s)]
    pub name: String,
    #[xml(child = "bpmn:resourceParameter")]
    #[tia("ResourceType",rg*="resource_parameters","ResourceTypeMut",s,rmg*="resource_parameters_mut")]
    pub resource_parameters: Vec<ResourceParameter>,
}
impl DocumentElement for Resource {
    fn element(&self) -> Element {
        Element::Resource
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Resource {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_parameters.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_parameters.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl RootElementType for Resource {}
impl RootElementTypeMut for Resource {}
//

/// Access to `resource`
pub trait ResourceType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &String;
    /// Get value of `resourceParameter` child
    fn resource_parameters(&self) -> &Vec<ResourceParameter>;
}
dyn_clone::clone_trait_object!(ResourceType);
impl_downcast!(ResourceType);
/// Mutable access to `resource`
pub trait ResourceTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + ResourceType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: String);
    /// Get a mutable value of `resourceParameter` child
    fn resource_parameters_mut(&mut self) -> &mut Vec<ResourceParameter>;
    /// Set value of `resourceParameter` child
    fn set_resource_parameters(&mut self, value: Vec<ResourceParameter>);
}
dyn_clone::clone_trait_object!(ResourceTypeMut);
impl_downcast!(ResourceTypeMut);
impl Cast<dyn DefinitionsType> for Resource {}
impl Cast<dyn DefinitionsTypeMut> for Resource {}
impl Cast<dyn ImportType> for Resource {}
impl Cast<dyn ImportTypeMut> for Resource {}
impl Cast<dyn ActivityType> for Resource {}
impl Cast<dyn ActivityTypeMut> for Resource {}
impl Cast<dyn AdHocSubProcessType> for Resource {}
impl Cast<dyn AdHocSubProcessTypeMut> for Resource {}
impl Cast<dyn ArtifactType> for Resource {}
impl Cast<dyn ArtifactTypeMut> for Resource {}
impl Cast<dyn AssignmentType> for Resource {}
impl Cast<dyn AssignmentTypeMut> for Resource {}
impl Cast<dyn AssociationType> for Resource {}
impl Cast<dyn AssociationTypeMut> for Resource {}
impl Cast<dyn AuditingType> for Resource {}
impl Cast<dyn AuditingTypeMut> for Resource {}
impl Cast<dyn BaseElementType> for Resource {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Resource {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Resource {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Resource {}
impl Cast<dyn BoundaryEventType> for Resource {}
impl Cast<dyn BoundaryEventTypeMut> for Resource {}
impl Cast<dyn BusinessRuleTaskType> for Resource {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Resource {}
impl Cast<dyn CallableElementType> for Resource {}
impl Cast<dyn CallableElementTypeMut> for Resource {}
impl Cast<dyn CallActivityType> for Resource {}
impl Cast<dyn CallActivityTypeMut> for Resource {}
impl Cast<dyn CallChoreographyType> for Resource {}
impl Cast<dyn CallChoreographyTypeMut> for Resource {}
impl Cast<dyn CallConversationType> for Resource {}
impl Cast<dyn CallConversationTypeMut> for Resource {}
impl Cast<dyn CancelEventDefinitionType> for Resource {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Resource {}
impl Cast<dyn CatchEventType> for Resource {}
impl Cast<dyn CatchEventTypeMut> for Resource {}
impl Cast<dyn CategoryType> for Resource {}
impl Cast<dyn CategoryTypeMut> for Resource {}
impl Cast<dyn CategoryValueType> for Resource {}
impl Cast<dyn CategoryValueTypeMut> for Resource {}
impl Cast<dyn ChoreographyType> for Resource {}
impl Cast<dyn ChoreographyTypeMut> for Resource {}
impl Cast<dyn ChoreographyActivityType> for Resource {}
impl Cast<dyn ChoreographyActivityTypeMut> for Resource {}
impl Cast<dyn ChoreographyTaskType> for Resource {}
impl Cast<dyn ChoreographyTaskTypeMut> for Resource {}
impl Cast<dyn CollaborationType> for Resource {}
impl Cast<dyn CollaborationTypeMut> for Resource {}
impl Cast<dyn CompensateEventDefinitionType> for Resource {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Resource {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Resource {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Resource {}
impl Cast<dyn ComplexGatewayType> for Resource {}
impl Cast<dyn ComplexGatewayTypeMut> for Resource {}
impl Cast<dyn ConditionalEventDefinitionType> for Resource {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Resource {}
impl Cast<dyn ConversationType> for Resource {}
impl Cast<dyn ConversationTypeMut> for Resource {}
impl Cast<dyn ConversationAssociationType> for Resource {}
impl Cast<dyn ConversationAssociationTypeMut> for Resource {}
impl Cast<dyn ConversationLinkType> for Resource {}
impl Cast<dyn ConversationLinkTypeMut> for Resource {}
impl Cast<dyn ConversationNodeType> for Resource {}
impl Cast<dyn ConversationNodeTypeMut> for Resource {}
impl Cast<dyn CorrelationKeyType> for Resource {}
impl Cast<dyn CorrelationKeyTypeMut> for Resource {}
impl Cast<dyn CorrelationPropertyType> for Resource {}
impl Cast<dyn CorrelationPropertyTypeMut> for Resource {}
impl Cast<dyn CorrelationPropertyBindingType> for Resource {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Resource {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Resource {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Resource {}
impl Cast<dyn CorrelationSubscriptionType> for Resource {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Resource {}
impl Cast<dyn DataAssociationType> for Resource {}
impl Cast<dyn DataAssociationTypeMut> for Resource {}
impl Cast<dyn DataInputType> for Resource {}
impl Cast<dyn DataInputTypeMut> for Resource {}
impl Cast<dyn DataInputAssociationType> for Resource {}
impl Cast<dyn DataInputAssociationTypeMut> for Resource {}
impl Cast<dyn DataObjectType> for Resource {}
impl Cast<dyn DataObjectTypeMut> for Resource {}
impl Cast<dyn DataObjectReferenceType> for Resource {}
impl Cast<dyn DataObjectReferenceTypeMut> for Resource {}
impl Cast<dyn DataOutputType> for Resource {}
impl Cast<dyn DataOutputTypeMut> for Resource {}
impl Cast<dyn DataOutputAssociationType> for Resource {}
impl Cast<dyn DataOutputAssociationTypeMut> for Resource {}
impl Cast<dyn DataStateType> for Resource {}
impl Cast<dyn DataStateTypeMut> for Resource {}
impl Cast<dyn DataStoreType> for Resource {}
impl Cast<dyn DataStoreTypeMut> for Resource {}
impl Cast<dyn DataStoreReferenceType> for Resource {}
impl Cast<dyn DataStoreReferenceTypeMut> for Resource {}
impl Cast<dyn DocumentationType> for Resource {}
impl Cast<dyn DocumentationTypeMut> for Resource {}
impl Cast<dyn EndEventType> for Resource {}
impl Cast<dyn EndEventTypeMut> for Resource {}
impl Cast<dyn EndPointType> for Resource {}
impl Cast<dyn EndPointTypeMut> for Resource {}
impl Cast<dyn ErrorType> for Resource {}
impl Cast<dyn ErrorTypeMut> for Resource {}
impl Cast<dyn ErrorEventDefinitionType> for Resource {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Resource {}
impl Cast<dyn EscalationType> for Resource {}
impl Cast<dyn EscalationTypeMut> for Resource {}
impl Cast<dyn EscalationEventDefinitionType> for Resource {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Resource {}
impl Cast<dyn EventType> for Resource {}
impl Cast<dyn EventTypeMut> for Resource {}
impl Cast<dyn EventBasedGatewayType> for Resource {}
impl Cast<dyn EventBasedGatewayTypeMut> for Resource {}
impl Cast<dyn EventDefinitionType> for Resource {}
impl Cast<dyn EventDefinitionTypeMut> for Resource {}
impl Cast<dyn ExclusiveGatewayType> for Resource {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Resource {}
impl Cast<dyn ExpressionType> for Resource {}
impl Cast<dyn ExpressionTypeMut> for Resource {}
impl Cast<dyn ExtensionType> for Resource {}
impl Cast<dyn ExtensionTypeMut> for Resource {}
impl Cast<dyn ExtensionElementsType> for Resource {}
impl Cast<dyn ExtensionElementsTypeMut> for Resource {}
impl Cast<dyn FlowElementType> for Resource {}
impl Cast<dyn FlowElementTypeMut> for Resource {}
impl Cast<dyn FlowNodeType> for Resource {}
impl Cast<dyn FlowNodeTypeMut> for Resource {}
impl Cast<dyn FormalExpressionType> for Resource {}
impl Cast<dyn FormalExpressionTypeMut> for Resource {}
impl Cast<dyn GatewayType> for Resource {}
impl Cast<dyn GatewayTypeMut> for Resource {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Resource {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Resource {}
impl Cast<dyn GlobalChoreographyTaskType> for Resource {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Resource {}
impl Cast<dyn GlobalConversationType> for Resource {}
impl Cast<dyn GlobalConversationTypeMut> for Resource {}
impl Cast<dyn GlobalManualTaskType> for Resource {}
impl Cast<dyn GlobalManualTaskTypeMut> for Resource {}
impl Cast<dyn GlobalScriptTaskType> for Resource {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Resource {}
impl Cast<dyn GlobalTaskType> for Resource {}
impl Cast<dyn GlobalTaskTypeMut> for Resource {}
impl Cast<dyn GlobalUserTaskType> for Resource {}
impl Cast<dyn GlobalUserTaskTypeMut> for Resource {}
impl Cast<dyn GroupType> for Resource {}
impl Cast<dyn GroupTypeMut> for Resource {}
impl Cast<dyn HumanPerformerType> for Resource {}
impl Cast<dyn HumanPerformerTypeMut> for Resource {}
impl Cast<dyn ImplicitThrowEventType> for Resource {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Resource {}
impl Cast<dyn InclusiveGatewayType> for Resource {}
impl Cast<dyn InclusiveGatewayTypeMut> for Resource {}
impl Cast<dyn InputSetType> for Resource {}
impl Cast<dyn InputSetTypeMut> for Resource {}
impl Cast<dyn InterfaceType> for Resource {}
impl Cast<dyn InterfaceTypeMut> for Resource {}
impl Cast<dyn IntermediateCatchEventType> for Resource {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Resource {}
impl Cast<dyn IntermediateThrowEventType> for Resource {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Resource {}
impl Cast<dyn InputOutputBindingType> for Resource {}
impl Cast<dyn InputOutputBindingTypeMut> for Resource {}
impl Cast<dyn InputOutputSpecificationType> for Resource {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Resource {}
impl Cast<dyn ItemDefinitionType> for Resource {}
impl Cast<dyn ItemDefinitionTypeMut> for Resource {}
impl Cast<dyn LaneType> for Resource {}
impl Cast<dyn LaneTypeMut> for Resource {}
impl Cast<dyn LaneSetType> for Resource {}
impl Cast<dyn LaneSetTypeMut> for Resource {}
impl Cast<dyn LinkEventDefinitionType> for Resource {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Resource {}
impl Cast<dyn LoopCharacteristicsType> for Resource {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Resource {}
impl Cast<dyn ManualTaskType> for Resource {}
impl Cast<dyn ManualTaskTypeMut> for Resource {}
impl Cast<dyn MessageType> for Resource {}
impl Cast<dyn MessageTypeMut> for Resource {}
impl Cast<dyn MessageEventDefinitionType> for Resource {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Resource {}
impl Cast<dyn MessageFlowType> for Resource {}
impl Cast<dyn MessageFlowTypeMut> for Resource {}
impl Cast<dyn MessageFlowAssociationType> for Resource {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Resource {}
impl Cast<dyn MonitoringType> for Resource {}
impl Cast<dyn MonitoringTypeMut> for Resource {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Resource {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Resource {}
impl Cast<dyn OperationType> for Resource {}
impl Cast<dyn OperationTypeMut> for Resource {}
impl Cast<dyn OutputSetType> for Resource {}
impl Cast<dyn OutputSetTypeMut> for Resource {}
impl Cast<dyn ParallelGatewayType> for Resource {}
impl Cast<dyn ParallelGatewayTypeMut> for Resource {}
impl Cast<dyn ParticipantType> for Resource {}
impl Cast<dyn ParticipantTypeMut> for Resource {}
impl Cast<dyn ParticipantAssociationType> for Resource {}
impl Cast<dyn ParticipantAssociationTypeMut> for Resource {}
impl Cast<dyn ParticipantMultiplicityType> for Resource {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Resource {}
impl Cast<dyn PartnerEntityType> for Resource {}
impl Cast<dyn PartnerEntityTypeMut> for Resource {}
impl Cast<dyn PartnerRoleType> for Resource {}
impl Cast<dyn PartnerRoleTypeMut> for Resource {}
impl Cast<dyn PerformerType> for Resource {}
impl Cast<dyn PerformerTypeMut> for Resource {}
impl Cast<dyn PotentialOwnerType> for Resource {}
impl Cast<dyn PotentialOwnerTypeMut> for Resource {}
impl Cast<dyn ProcessType> for Resource {}
impl Cast<dyn ProcessTypeMut> for Resource {}
impl Cast<dyn PropertyType> for Resource {}
impl Cast<dyn PropertyTypeMut> for Resource {}
impl Cast<dyn ReceiveTaskType> for Resource {}
impl Cast<dyn ReceiveTaskTypeMut> for Resource {}
impl Cast<dyn RelationshipType> for Resource {}
impl Cast<dyn RelationshipTypeMut> for Resource {}
impl Cast<dyn RenderingType> for Resource {}
impl Cast<dyn RenderingTypeMut> for Resource {}
impl Cast<dyn ResourceType> for Resource {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceTypeMut> for Resource {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for Resource {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Resource {}
impl Cast<dyn ResourceParameterType> for Resource {}
impl Cast<dyn ResourceParameterTypeMut> for Resource {}
impl Cast<dyn ResourceParameterBindingType> for Resource {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Resource {}
impl Cast<dyn ResourceRoleType> for Resource {}
impl Cast<dyn ResourceRoleTypeMut> for Resource {}
impl Cast<dyn RootElementType> for Resource {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Resource {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Resource {}
impl Cast<dyn ScriptTaskTypeMut> for Resource {}
impl Cast<dyn ScriptType> for Resource {}
impl Cast<dyn ScriptTypeMut> for Resource {}
impl Cast<dyn SendTaskType> for Resource {}
impl Cast<dyn SendTaskTypeMut> for Resource {}
impl Cast<dyn SequenceFlowType> for Resource {}
impl Cast<dyn SequenceFlowTypeMut> for Resource {}
impl Cast<dyn ServiceTaskType> for Resource {}
impl Cast<dyn ServiceTaskTypeMut> for Resource {}
impl Cast<dyn SignalType> for Resource {}
impl Cast<dyn SignalTypeMut> for Resource {}
impl Cast<dyn SignalEventDefinitionType> for Resource {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Resource {}
impl Cast<dyn StandardLoopCharacteristicsType> for Resource {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Resource {}
impl Cast<dyn StartEventType> for Resource {}
impl Cast<dyn StartEventTypeMut> for Resource {}
impl Cast<dyn SubChoreographyType> for Resource {}
impl Cast<dyn SubChoreographyTypeMut> for Resource {}
impl Cast<dyn SubConversationType> for Resource {}
impl Cast<dyn SubConversationTypeMut> for Resource {}
impl Cast<dyn SubProcessType> for Resource {}
impl Cast<dyn SubProcessTypeMut> for Resource {}
impl Cast<dyn TaskType> for Resource {}
impl Cast<dyn TaskTypeMut> for Resource {}
impl Cast<dyn TerminateEventDefinitionType> for Resource {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Resource {}
impl Cast<dyn TextAnnotationType> for Resource {}
impl Cast<dyn TextAnnotationTypeMut> for Resource {}
impl Cast<dyn TextType> for Resource {}
impl Cast<dyn TextTypeMut> for Resource {}
impl Cast<dyn ThrowEventType> for Resource {}
impl Cast<dyn ThrowEventTypeMut> for Resource {}
impl Cast<dyn TimerEventDefinitionType> for Resource {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Resource {}
impl Cast<dyn TransactionType> for Resource {}
impl Cast<dyn TransactionTypeMut> for Resource {}
impl Cast<dyn UserTaskType> for Resource {}
impl Cast<dyn UserTaskTypeMut> for Resource {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:resourceAssignmentExpression")]
pub struct ResourceAssignmentExpression {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:expression")]
    #[tia("ResourceAssignmentExpressionType",rg*="expression","ResourceAssignmentExpressionTypeMut",s,rmg*="expression_mut")]
    pub expression: Expr,
}
impl DocumentElement for ResourceAssignmentExpression {
    fn element(&self) -> Element {
        Element::ResourceAssignmentExpression
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ResourceAssignmentExpression {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.expression.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.expression.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `resourceAssignmentExpression`
pub trait ResourceAssignmentExpressionType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of `expression` child
    fn expression(&self) -> &Expr;
}
dyn_clone::clone_trait_object!(ResourceAssignmentExpressionType);
impl_downcast!(ResourceAssignmentExpressionType);
/// Mutable access to `resourceAssignmentExpression`
pub trait ResourceAssignmentExpressionTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ResourceAssignmentExpressionType
{
    /// Get a mutable value of `expression` child
    fn expression_mut(&mut self) -> &mut Expr;
    /// Set value of `expression` child
    fn set_expression(&mut self, value: Expr);
}
dyn_clone::clone_trait_object!(ResourceAssignmentExpressionTypeMut);
impl_downcast!(ResourceAssignmentExpressionTypeMut);
impl Cast<dyn DefinitionsType> for ResourceAssignmentExpression {}
impl Cast<dyn DefinitionsTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ImportType> for ResourceAssignmentExpression {}
impl Cast<dyn ImportTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ActivityType> for ResourceAssignmentExpression {}
impl Cast<dyn ActivityTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn AdHocSubProcessType> for ResourceAssignmentExpression {}
impl Cast<dyn AdHocSubProcessTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ArtifactType> for ResourceAssignmentExpression {}
impl Cast<dyn ArtifactTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn AssignmentType> for ResourceAssignmentExpression {}
impl Cast<dyn AssignmentTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn AssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn AssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn AuditingType> for ResourceAssignmentExpression {}
impl Cast<dyn AuditingTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn BaseElementType> for ResourceAssignmentExpression {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ResourceAssignmentExpression {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ResourceAssignmentExpression {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn BoundaryEventType> for ResourceAssignmentExpression {}
impl Cast<dyn BoundaryEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn BusinessRuleTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CallableElementType> for ResourceAssignmentExpression {}
impl Cast<dyn CallableElementTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CallActivityType> for ResourceAssignmentExpression {}
impl Cast<dyn CallActivityTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CallChoreographyType> for ResourceAssignmentExpression {}
impl Cast<dyn CallChoreographyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CallConversationType> for ResourceAssignmentExpression {}
impl Cast<dyn CallConversationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CancelEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CatchEventType> for ResourceAssignmentExpression {}
impl Cast<dyn CatchEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CategoryType> for ResourceAssignmentExpression {}
impl Cast<dyn CategoryTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CategoryValueType> for ResourceAssignmentExpression {}
impl Cast<dyn CategoryValueTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyType> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyActivityType> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyActivityTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn ChoreographyTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CollaborationType> for ResourceAssignmentExpression {}
impl Cast<dyn CollaborationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CompensateEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ComplexGatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn ComplexGatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ConditionalEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationType> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationLinkType> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationLinkTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationNodeType> for ResourceAssignmentExpression {}
impl Cast<dyn ConversationNodeTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationKeyType> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationKeyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyType> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyBindingType> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationSubscriptionType> for ResourceAssignmentExpression {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn DataAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataInputType> for ResourceAssignmentExpression {}
impl Cast<dyn DataInputTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataInputAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn DataInputAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataObjectType> for ResourceAssignmentExpression {}
impl Cast<dyn DataObjectTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataObjectReferenceType> for ResourceAssignmentExpression {}
impl Cast<dyn DataObjectReferenceTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataOutputType> for ResourceAssignmentExpression {}
impl Cast<dyn DataOutputTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataOutputAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn DataOutputAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataStateType> for ResourceAssignmentExpression {}
impl Cast<dyn DataStateTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataStoreType> for ResourceAssignmentExpression {}
impl Cast<dyn DataStoreTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DataStoreReferenceType> for ResourceAssignmentExpression {}
impl Cast<dyn DataStoreReferenceTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn DocumentationType> for ResourceAssignmentExpression {}
impl Cast<dyn DocumentationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EndEventType> for ResourceAssignmentExpression {}
impl Cast<dyn EndEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EndPointType> for ResourceAssignmentExpression {}
impl Cast<dyn EndPointTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ErrorType> for ResourceAssignmentExpression {}
impl Cast<dyn ErrorTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ErrorEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EscalationType> for ResourceAssignmentExpression {}
impl Cast<dyn EscalationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EscalationEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EventType> for ResourceAssignmentExpression {}
impl Cast<dyn EventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EventBasedGatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn EventBasedGatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn EventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn EventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ExclusiveGatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ExpressionType> for ResourceAssignmentExpression {}
impl Cast<dyn ExpressionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ExtensionType> for ResourceAssignmentExpression {}
impl Cast<dyn ExtensionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ExtensionElementsType> for ResourceAssignmentExpression {}
impl Cast<dyn ExtensionElementsTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn FlowElementType> for ResourceAssignmentExpression {}
impl Cast<dyn FlowElementTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn FlowNodeType> for ResourceAssignmentExpression {}
impl Cast<dyn FlowNodeTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn FormalExpressionType> for ResourceAssignmentExpression {}
impl Cast<dyn FormalExpressionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn GatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalChoreographyTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalConversationType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalConversationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalManualTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalManualTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalScriptTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalUserTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn GlobalUserTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn GroupType> for ResourceAssignmentExpression {}
impl Cast<dyn GroupTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn HumanPerformerType> for ResourceAssignmentExpression {}
impl Cast<dyn HumanPerformerTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ImplicitThrowEventType> for ResourceAssignmentExpression {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn InclusiveGatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn InclusiveGatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn InputSetType> for ResourceAssignmentExpression {}
impl Cast<dyn InputSetTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn InterfaceType> for ResourceAssignmentExpression {}
impl Cast<dyn InterfaceTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn IntermediateCatchEventType> for ResourceAssignmentExpression {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn IntermediateThrowEventType> for ResourceAssignmentExpression {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn InputOutputBindingType> for ResourceAssignmentExpression {}
impl Cast<dyn InputOutputBindingTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn InputOutputSpecificationType> for ResourceAssignmentExpression {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ItemDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn ItemDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn LaneType> for ResourceAssignmentExpression {}
impl Cast<dyn LaneTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn LaneSetType> for ResourceAssignmentExpression {}
impl Cast<dyn LaneSetTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn LinkEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn LoopCharacteristicsType> for ResourceAssignmentExpression {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ManualTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn ManualTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MessageType> for ResourceAssignmentExpression {}
impl Cast<dyn MessageTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MessageEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MessageFlowType> for ResourceAssignmentExpression {}
impl Cast<dyn MessageFlowTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MessageFlowAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MonitoringType> for ResourceAssignmentExpression {}
impl Cast<dyn MonitoringTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ResourceAssignmentExpression {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn OperationType> for ResourceAssignmentExpression {}
impl Cast<dyn OperationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn OutputSetType> for ResourceAssignmentExpression {}
impl Cast<dyn OutputSetTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ParallelGatewayType> for ResourceAssignmentExpression {}
impl Cast<dyn ParallelGatewayTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantType> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantAssociationType> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantAssociationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantMultiplicityType> for ResourceAssignmentExpression {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn PartnerEntityType> for ResourceAssignmentExpression {}
impl Cast<dyn PartnerEntityTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn PartnerRoleType> for ResourceAssignmentExpression {}
impl Cast<dyn PartnerRoleTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn PerformerType> for ResourceAssignmentExpression {}
impl Cast<dyn PerformerTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn PotentialOwnerType> for ResourceAssignmentExpression {}
impl Cast<dyn PotentialOwnerTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ProcessType> for ResourceAssignmentExpression {}
impl Cast<dyn ProcessTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn PropertyType> for ResourceAssignmentExpression {}
impl Cast<dyn PropertyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ReceiveTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn ReceiveTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn RelationshipType> for ResourceAssignmentExpression {}
impl Cast<dyn RelationshipTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn RenderingType> for ResourceAssignmentExpression {}
impl Cast<dyn RenderingTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceType> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceAssignmentExpressionType> for ResourceAssignmentExpression {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ResourceAssignmentExpression {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceParameterType> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceParameterTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceParameterBindingType> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceRoleType> for ResourceAssignmentExpression {}
impl Cast<dyn ResourceRoleTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn RootElementType> for ResourceAssignmentExpression {}
impl Cast<dyn RootElementTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ScriptTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn ScriptTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ScriptType> for ResourceAssignmentExpression {}
impl Cast<dyn ScriptTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SendTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn SendTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SequenceFlowType> for ResourceAssignmentExpression {}
impl Cast<dyn SequenceFlowTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ServiceTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn ServiceTaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SignalType> for ResourceAssignmentExpression {}
impl Cast<dyn SignalTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SignalEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn StandardLoopCharacteristicsType> for ResourceAssignmentExpression {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn StartEventType> for ResourceAssignmentExpression {}
impl Cast<dyn StartEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SubChoreographyType> for ResourceAssignmentExpression {}
impl Cast<dyn SubChoreographyTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SubConversationType> for ResourceAssignmentExpression {}
impl Cast<dyn SubConversationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn SubProcessType> for ResourceAssignmentExpression {}
impl Cast<dyn SubProcessTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TaskType> for ResourceAssignmentExpression {}
impl Cast<dyn TaskTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TerminateEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TextAnnotationType> for ResourceAssignmentExpression {}
impl Cast<dyn TextAnnotationTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TextType> for ResourceAssignmentExpression {}
impl Cast<dyn TextTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn ThrowEventType> for ResourceAssignmentExpression {}
impl Cast<dyn ThrowEventTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TimerEventDefinitionType> for ResourceAssignmentExpression {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn TransactionType> for ResourceAssignmentExpression {}
impl Cast<dyn TransactionTypeMut> for ResourceAssignmentExpression {}
impl Cast<dyn UserTaskType> for ResourceAssignmentExpression {}
impl Cast<dyn UserTaskTypeMut> for ResourceAssignmentExpression {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:resourceParameter")]
pub struct ResourceParameter {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceParameterType",rg*="name","ResourceParameterTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "type")]
    #[tia("ResourceParameterType",rg*="typ","ResourceParameterTypeMut",s)]
    pub typ: Option<String>,
    #[xml(attr = "isRequired")]
    #[tia("ResourceParameterType",rg*="is_required","ResourceParameterTypeMut",s)]
    pub is_required: Option<bool>,
}
impl DocumentElement for ResourceParameter {
    fn element(&self) -> Element {
        Element::ResourceParameter
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ResourceParameter {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `resourceParameter`
pub trait ResourceParameterType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `type`
    fn typ(&self) -> &Option<String>;
    /// Get value of attribute `isRequired`
    fn is_required(&self) -> &Option<bool>;
}
dyn_clone::clone_trait_object!(ResourceParameterType);
impl_downcast!(ResourceParameterType);
/// Mutable access to `resourceParameter`
pub trait ResourceParameterTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ResourceParameterType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `type`
    fn set_typ(&mut self, value: Option<String>);
    /// Set value of attribute `isRequired`
    fn set_is_required(&mut self, value: Option<bool>);
}
dyn_clone::clone_trait_object!(ResourceParameterTypeMut);
impl_downcast!(ResourceParameterTypeMut);
impl Cast<dyn DefinitionsType> for ResourceParameter {}
impl Cast<dyn DefinitionsTypeMut> for ResourceParameter {}
impl Cast<dyn ImportType> for ResourceParameter {}
impl Cast<dyn ImportTypeMut> for ResourceParameter {}
impl Cast<dyn ActivityType> for ResourceParameter {}
impl Cast<dyn ActivityTypeMut> for ResourceParameter {}
impl Cast<dyn AdHocSubProcessType> for ResourceParameter {}
impl Cast<dyn AdHocSubProcessTypeMut> for ResourceParameter {}
impl Cast<dyn ArtifactType> for ResourceParameter {}
impl Cast<dyn ArtifactTypeMut> for ResourceParameter {}
impl Cast<dyn AssignmentType> for ResourceParameter {}
impl Cast<dyn AssignmentTypeMut> for ResourceParameter {}
impl Cast<dyn AssociationType> for ResourceParameter {}
impl Cast<dyn AssociationTypeMut> for ResourceParameter {}
impl Cast<dyn AuditingType> for ResourceParameter {}
impl Cast<dyn AuditingTypeMut> for ResourceParameter {}
impl Cast<dyn BaseElementType> for ResourceParameter {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ResourceParameter {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ResourceParameter {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ResourceParameter {}
impl Cast<dyn BoundaryEventType> for ResourceParameter {}
impl Cast<dyn BoundaryEventTypeMut> for ResourceParameter {}
impl Cast<dyn BusinessRuleTaskType> for ResourceParameter {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ResourceParameter {}
impl Cast<dyn CallableElementType> for ResourceParameter {}
impl Cast<dyn CallableElementTypeMut> for ResourceParameter {}
impl Cast<dyn CallActivityType> for ResourceParameter {}
impl Cast<dyn CallActivityTypeMut> for ResourceParameter {}
impl Cast<dyn CallChoreographyType> for ResourceParameter {}
impl Cast<dyn CallChoreographyTypeMut> for ResourceParameter {}
impl Cast<dyn CallConversationType> for ResourceParameter {}
impl Cast<dyn CallConversationTypeMut> for ResourceParameter {}
impl Cast<dyn CancelEventDefinitionType> for ResourceParameter {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn CatchEventType> for ResourceParameter {}
impl Cast<dyn CatchEventTypeMut> for ResourceParameter {}
impl Cast<dyn CategoryType> for ResourceParameter {}
impl Cast<dyn CategoryTypeMut> for ResourceParameter {}
impl Cast<dyn CategoryValueType> for ResourceParameter {}
impl Cast<dyn CategoryValueTypeMut> for ResourceParameter {}
impl Cast<dyn ChoreographyType> for ResourceParameter {}
impl Cast<dyn ChoreographyTypeMut> for ResourceParameter {}
impl Cast<dyn ChoreographyActivityType> for ResourceParameter {}
impl Cast<dyn ChoreographyActivityTypeMut> for ResourceParameter {}
impl Cast<dyn ChoreographyTaskType> for ResourceParameter {}
impl Cast<dyn ChoreographyTaskTypeMut> for ResourceParameter {}
impl Cast<dyn CollaborationType> for ResourceParameter {}
impl Cast<dyn CollaborationTypeMut> for ResourceParameter {}
impl Cast<dyn CompensateEventDefinitionType> for ResourceParameter {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ResourceParameter {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn ComplexGatewayType> for ResourceParameter {}
impl Cast<dyn ComplexGatewayTypeMut> for ResourceParameter {}
impl Cast<dyn ConditionalEventDefinitionType> for ResourceParameter {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn ConversationType> for ResourceParameter {}
impl Cast<dyn ConversationTypeMut> for ResourceParameter {}
impl Cast<dyn ConversationAssociationType> for ResourceParameter {}
impl Cast<dyn ConversationAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn ConversationLinkType> for ResourceParameter {}
impl Cast<dyn ConversationLinkTypeMut> for ResourceParameter {}
impl Cast<dyn ConversationNodeType> for ResourceParameter {}
impl Cast<dyn ConversationNodeTypeMut> for ResourceParameter {}
impl Cast<dyn CorrelationKeyType> for ResourceParameter {}
impl Cast<dyn CorrelationKeyTypeMut> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyType> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyTypeMut> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyBindingType> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ResourceParameter {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ResourceParameter {}
impl Cast<dyn CorrelationSubscriptionType> for ResourceParameter {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ResourceParameter {}
impl Cast<dyn DataAssociationType> for ResourceParameter {}
impl Cast<dyn DataAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn DataInputType> for ResourceParameter {}
impl Cast<dyn DataInputTypeMut> for ResourceParameter {}
impl Cast<dyn DataInputAssociationType> for ResourceParameter {}
impl Cast<dyn DataInputAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn DataObjectType> for ResourceParameter {}
impl Cast<dyn DataObjectTypeMut> for ResourceParameter {}
impl Cast<dyn DataObjectReferenceType> for ResourceParameter {}
impl Cast<dyn DataObjectReferenceTypeMut> for ResourceParameter {}
impl Cast<dyn DataOutputType> for ResourceParameter {}
impl Cast<dyn DataOutputTypeMut> for ResourceParameter {}
impl Cast<dyn DataOutputAssociationType> for ResourceParameter {}
impl Cast<dyn DataOutputAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn DataStateType> for ResourceParameter {}
impl Cast<dyn DataStateTypeMut> for ResourceParameter {}
impl Cast<dyn DataStoreType> for ResourceParameter {}
impl Cast<dyn DataStoreTypeMut> for ResourceParameter {}
impl Cast<dyn DataStoreReferenceType> for ResourceParameter {}
impl Cast<dyn DataStoreReferenceTypeMut> for ResourceParameter {}
impl Cast<dyn DocumentationType> for ResourceParameter {}
impl Cast<dyn DocumentationTypeMut> for ResourceParameter {}
impl Cast<dyn EndEventType> for ResourceParameter {}
impl Cast<dyn EndEventTypeMut> for ResourceParameter {}
impl Cast<dyn EndPointType> for ResourceParameter {}
impl Cast<dyn EndPointTypeMut> for ResourceParameter {}
impl Cast<dyn ErrorType> for ResourceParameter {}
impl Cast<dyn ErrorTypeMut> for ResourceParameter {}
impl Cast<dyn ErrorEventDefinitionType> for ResourceParameter {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn EscalationType> for ResourceParameter {}
impl Cast<dyn EscalationTypeMut> for ResourceParameter {}
impl Cast<dyn EscalationEventDefinitionType> for ResourceParameter {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn EventType> for ResourceParameter {}
impl Cast<dyn EventTypeMut> for ResourceParameter {}
impl Cast<dyn EventBasedGatewayType> for ResourceParameter {}
impl Cast<dyn EventBasedGatewayTypeMut> for ResourceParameter {}
impl Cast<dyn EventDefinitionType> for ResourceParameter {}
impl Cast<dyn EventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn ExclusiveGatewayType> for ResourceParameter {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ResourceParameter {}
impl Cast<dyn ExpressionType> for ResourceParameter {}
impl Cast<dyn ExpressionTypeMut> for ResourceParameter {}
impl Cast<dyn ExtensionType> for ResourceParameter {}
impl Cast<dyn ExtensionTypeMut> for ResourceParameter {}
impl Cast<dyn ExtensionElementsType> for ResourceParameter {}
impl Cast<dyn ExtensionElementsTypeMut> for ResourceParameter {}
impl Cast<dyn FlowElementType> for ResourceParameter {}
impl Cast<dyn FlowElementTypeMut> for ResourceParameter {}
impl Cast<dyn FlowNodeType> for ResourceParameter {}
impl Cast<dyn FlowNodeTypeMut> for ResourceParameter {}
impl Cast<dyn FormalExpressionType> for ResourceParameter {}
impl Cast<dyn FormalExpressionTypeMut> for ResourceParameter {}
impl Cast<dyn GatewayType> for ResourceParameter {}
impl Cast<dyn GatewayTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ResourceParameter {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalChoreographyTaskType> for ResourceParameter {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalConversationType> for ResourceParameter {}
impl Cast<dyn GlobalConversationTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalManualTaskType> for ResourceParameter {}
impl Cast<dyn GlobalManualTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalScriptTaskType> for ResourceParameter {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalTaskType> for ResourceParameter {}
impl Cast<dyn GlobalTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GlobalUserTaskType> for ResourceParameter {}
impl Cast<dyn GlobalUserTaskTypeMut> for ResourceParameter {}
impl Cast<dyn GroupType> for ResourceParameter {}
impl Cast<dyn GroupTypeMut> for ResourceParameter {}
impl Cast<dyn HumanPerformerType> for ResourceParameter {}
impl Cast<dyn HumanPerformerTypeMut> for ResourceParameter {}
impl Cast<dyn ImplicitThrowEventType> for ResourceParameter {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ResourceParameter {}
impl Cast<dyn InclusiveGatewayType> for ResourceParameter {}
impl Cast<dyn InclusiveGatewayTypeMut> for ResourceParameter {}
impl Cast<dyn InputSetType> for ResourceParameter {}
impl Cast<dyn InputSetTypeMut> for ResourceParameter {}
impl Cast<dyn InterfaceType> for ResourceParameter {}
impl Cast<dyn InterfaceTypeMut> for ResourceParameter {}
impl Cast<dyn IntermediateCatchEventType> for ResourceParameter {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ResourceParameter {}
impl Cast<dyn IntermediateThrowEventType> for ResourceParameter {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ResourceParameter {}
impl Cast<dyn InputOutputBindingType> for ResourceParameter {}
impl Cast<dyn InputOutputBindingTypeMut> for ResourceParameter {}
impl Cast<dyn InputOutputSpecificationType> for ResourceParameter {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ResourceParameter {}
impl Cast<dyn ItemDefinitionType> for ResourceParameter {}
impl Cast<dyn ItemDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn LaneType> for ResourceParameter {}
impl Cast<dyn LaneTypeMut> for ResourceParameter {}
impl Cast<dyn LaneSetType> for ResourceParameter {}
impl Cast<dyn LaneSetTypeMut> for ResourceParameter {}
impl Cast<dyn LinkEventDefinitionType> for ResourceParameter {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn LoopCharacteristicsType> for ResourceParameter {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ResourceParameter {}
impl Cast<dyn ManualTaskType> for ResourceParameter {}
impl Cast<dyn ManualTaskTypeMut> for ResourceParameter {}
impl Cast<dyn MessageType> for ResourceParameter {}
impl Cast<dyn MessageTypeMut> for ResourceParameter {}
impl Cast<dyn MessageEventDefinitionType> for ResourceParameter {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn MessageFlowType> for ResourceParameter {}
impl Cast<dyn MessageFlowTypeMut> for ResourceParameter {}
impl Cast<dyn MessageFlowAssociationType> for ResourceParameter {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn MonitoringType> for ResourceParameter {}
impl Cast<dyn MonitoringTypeMut> for ResourceParameter {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ResourceParameter {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ResourceParameter {}
impl Cast<dyn OperationType> for ResourceParameter {}
impl Cast<dyn OperationTypeMut> for ResourceParameter {}
impl Cast<dyn OutputSetType> for ResourceParameter {}
impl Cast<dyn OutputSetTypeMut> for ResourceParameter {}
impl Cast<dyn ParallelGatewayType> for ResourceParameter {}
impl Cast<dyn ParallelGatewayTypeMut> for ResourceParameter {}
impl Cast<dyn ParticipantType> for ResourceParameter {}
impl Cast<dyn ParticipantTypeMut> for ResourceParameter {}
impl Cast<dyn ParticipantAssociationType> for ResourceParameter {}
impl Cast<dyn ParticipantAssociationTypeMut> for ResourceParameter {}
impl Cast<dyn ParticipantMultiplicityType> for ResourceParameter {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ResourceParameter {}
impl Cast<dyn PartnerEntityType> for ResourceParameter {}
impl Cast<dyn PartnerEntityTypeMut> for ResourceParameter {}
impl Cast<dyn PartnerRoleType> for ResourceParameter {}
impl Cast<dyn PartnerRoleTypeMut> for ResourceParameter {}
impl Cast<dyn PerformerType> for ResourceParameter {}
impl Cast<dyn PerformerTypeMut> for ResourceParameter {}
impl Cast<dyn PotentialOwnerType> for ResourceParameter {}
impl Cast<dyn PotentialOwnerTypeMut> for ResourceParameter {}
impl Cast<dyn ProcessType> for ResourceParameter {}
impl Cast<dyn ProcessTypeMut> for ResourceParameter {}
impl Cast<dyn PropertyType> for ResourceParameter {}
impl Cast<dyn PropertyTypeMut> for ResourceParameter {}
impl Cast<dyn ReceiveTaskType> for ResourceParameter {}
impl Cast<dyn ReceiveTaskTypeMut> for ResourceParameter {}
impl Cast<dyn RelationshipType> for ResourceParameter {}
impl Cast<dyn RelationshipTypeMut> for ResourceParameter {}
impl Cast<dyn RenderingType> for ResourceParameter {}
impl Cast<dyn RenderingTypeMut> for ResourceParameter {}
impl Cast<dyn ResourceType> for ResourceParameter {}
impl Cast<dyn ResourceTypeMut> for ResourceParameter {}
impl Cast<dyn ResourceAssignmentExpressionType> for ResourceParameter {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ResourceParameter {}
impl Cast<dyn ResourceParameterType> for ResourceParameter {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceParameterTypeMut> for ResourceParameter {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceParameterBindingType> for ResourceParameter {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ResourceParameter {}
impl Cast<dyn ResourceRoleType> for ResourceParameter {}
impl Cast<dyn ResourceRoleTypeMut> for ResourceParameter {}
impl Cast<dyn RootElementType> for ResourceParameter {}
impl Cast<dyn RootElementTypeMut> for ResourceParameter {}
impl Cast<dyn ScriptTaskType> for ResourceParameter {}
impl Cast<dyn ScriptTaskTypeMut> for ResourceParameter {}
impl Cast<dyn ScriptType> for ResourceParameter {}
impl Cast<dyn ScriptTypeMut> for ResourceParameter {}
impl Cast<dyn SendTaskType> for ResourceParameter {}
impl Cast<dyn SendTaskTypeMut> for ResourceParameter {}
impl Cast<dyn SequenceFlowType> for ResourceParameter {}
impl Cast<dyn SequenceFlowTypeMut> for ResourceParameter {}
impl Cast<dyn ServiceTaskType> for ResourceParameter {}
impl Cast<dyn ServiceTaskTypeMut> for ResourceParameter {}
impl Cast<dyn SignalType> for ResourceParameter {}
impl Cast<dyn SignalTypeMut> for ResourceParameter {}
impl Cast<dyn SignalEventDefinitionType> for ResourceParameter {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn StandardLoopCharacteristicsType> for ResourceParameter {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ResourceParameter {}
impl Cast<dyn StartEventType> for ResourceParameter {}
impl Cast<dyn StartEventTypeMut> for ResourceParameter {}
impl Cast<dyn SubChoreographyType> for ResourceParameter {}
impl Cast<dyn SubChoreographyTypeMut> for ResourceParameter {}
impl Cast<dyn SubConversationType> for ResourceParameter {}
impl Cast<dyn SubConversationTypeMut> for ResourceParameter {}
impl Cast<dyn SubProcessType> for ResourceParameter {}
impl Cast<dyn SubProcessTypeMut> for ResourceParameter {}
impl Cast<dyn TaskType> for ResourceParameter {}
impl Cast<dyn TaskTypeMut> for ResourceParameter {}
impl Cast<dyn TerminateEventDefinitionType> for ResourceParameter {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn TextAnnotationType> for ResourceParameter {}
impl Cast<dyn TextAnnotationTypeMut> for ResourceParameter {}
impl Cast<dyn TextType> for ResourceParameter {}
impl Cast<dyn TextTypeMut> for ResourceParameter {}
impl Cast<dyn ThrowEventType> for ResourceParameter {}
impl Cast<dyn ThrowEventTypeMut> for ResourceParameter {}
impl Cast<dyn TimerEventDefinitionType> for ResourceParameter {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ResourceParameter {}
impl Cast<dyn TransactionType> for ResourceParameter {}
impl Cast<dyn TransactionTypeMut> for ResourceParameter {}
impl Cast<dyn UserTaskType> for ResourceParameter {}
impl Cast<dyn UserTaskTypeMut> for ResourceParameter {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:resourceParameterBinding")]
pub struct ResourceParameterBinding {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "parameterRef")]
    #[tia("ResourceParameterBindingType",rg*="parameter_ref","ResourceParameterBindingTypeMut",s)]
    pub parameter_ref: String,
    #[xml(child = "bpmn:expression")]
    #[tia("ResourceParameterBindingType",rg*="expression","ResourceParameterBindingTypeMut",s,rmg*="expression_mut")]
    pub expression: Expr,
}
impl DocumentElement for ResourceParameterBinding {
    fn element(&self) -> Element {
        Element::ResourceParameterBinding
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ResourceParameterBinding {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.expression.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.expression.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `resourceParameterBinding`
pub trait ResourceParameterBindingType:
    BaseElementType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `parameterRef`
    fn parameter_ref(&self) -> &String;
    /// Get value of `expression` child
    fn expression(&self) -> &Expr;
}
dyn_clone::clone_trait_object!(ResourceParameterBindingType);
impl_downcast!(ResourceParameterBindingType);
/// Mutable access to `resourceParameterBinding`
pub trait ResourceParameterBindingTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ResourceParameterBindingType
{
    /// Set value of attribute `parameterRef`
    fn set_parameter_ref(&mut self, value: String);
    /// Get a mutable value of `expression` child
    fn expression_mut(&mut self) -> &mut Expr;
    /// Set value of `expression` child
    fn set_expression(&mut self, value: Expr);
}
dyn_clone::clone_trait_object!(ResourceParameterBindingTypeMut);
impl_downcast!(ResourceParameterBindingTypeMut);
impl Cast<dyn DefinitionsType> for ResourceParameterBinding {}
impl Cast<dyn DefinitionsTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ImportType> for ResourceParameterBinding {}
impl Cast<dyn ImportTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ActivityType> for ResourceParameterBinding {}
impl Cast<dyn ActivityTypeMut> for ResourceParameterBinding {}
impl Cast<dyn AdHocSubProcessType> for ResourceParameterBinding {}
impl Cast<dyn AdHocSubProcessTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ArtifactType> for ResourceParameterBinding {}
impl Cast<dyn ArtifactTypeMut> for ResourceParameterBinding {}
impl Cast<dyn AssignmentType> for ResourceParameterBinding {}
impl Cast<dyn AssignmentTypeMut> for ResourceParameterBinding {}
impl Cast<dyn AssociationType> for ResourceParameterBinding {}
impl Cast<dyn AssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn AuditingType> for ResourceParameterBinding {}
impl Cast<dyn AuditingTypeMut> for ResourceParameterBinding {}
impl Cast<dyn BaseElementType> for ResourceParameterBinding {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ResourceParameterBinding {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ResourceParameterBinding {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ResourceParameterBinding {}
impl Cast<dyn BoundaryEventType> for ResourceParameterBinding {}
impl Cast<dyn BoundaryEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn BusinessRuleTaskType> for ResourceParameterBinding {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CallableElementType> for ResourceParameterBinding {}
impl Cast<dyn CallableElementTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CallActivityType> for ResourceParameterBinding {}
impl Cast<dyn CallActivityTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CallChoreographyType> for ResourceParameterBinding {}
impl Cast<dyn CallChoreographyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CallConversationType> for ResourceParameterBinding {}
impl Cast<dyn CallConversationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CancelEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CatchEventType> for ResourceParameterBinding {}
impl Cast<dyn CatchEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CategoryType> for ResourceParameterBinding {}
impl Cast<dyn CategoryTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CategoryValueType> for ResourceParameterBinding {}
impl Cast<dyn CategoryValueTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyType> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyActivityType> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyActivityTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyTaskType> for ResourceParameterBinding {}
impl Cast<dyn ChoreographyTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CollaborationType> for ResourceParameterBinding {}
impl Cast<dyn CollaborationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CompensateEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ComplexGatewayType> for ResourceParameterBinding {}
impl Cast<dyn ComplexGatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ConditionalEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ConversationType> for ResourceParameterBinding {}
impl Cast<dyn ConversationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ConversationAssociationType> for ResourceParameterBinding {}
impl Cast<dyn ConversationAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ConversationLinkType> for ResourceParameterBinding {}
impl Cast<dyn ConversationLinkTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ConversationNodeType> for ResourceParameterBinding {}
impl Cast<dyn ConversationNodeTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CorrelationKeyType> for ResourceParameterBinding {}
impl Cast<dyn CorrelationKeyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyType> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyBindingType> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ResourceParameterBinding {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn CorrelationSubscriptionType> for ResourceParameterBinding {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataAssociationType> for ResourceParameterBinding {}
impl Cast<dyn DataAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataInputType> for ResourceParameterBinding {}
impl Cast<dyn DataInputTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataInputAssociationType> for ResourceParameterBinding {}
impl Cast<dyn DataInputAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataObjectType> for ResourceParameterBinding {}
impl Cast<dyn DataObjectTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataObjectReferenceType> for ResourceParameterBinding {}
impl Cast<dyn DataObjectReferenceTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataOutputType> for ResourceParameterBinding {}
impl Cast<dyn DataOutputTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataOutputAssociationType> for ResourceParameterBinding {}
impl Cast<dyn DataOutputAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataStateType> for ResourceParameterBinding {}
impl Cast<dyn DataStateTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataStoreType> for ResourceParameterBinding {}
impl Cast<dyn DataStoreTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DataStoreReferenceType> for ResourceParameterBinding {}
impl Cast<dyn DataStoreReferenceTypeMut> for ResourceParameterBinding {}
impl Cast<dyn DocumentationType> for ResourceParameterBinding {}
impl Cast<dyn DocumentationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EndEventType> for ResourceParameterBinding {}
impl Cast<dyn EndEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EndPointType> for ResourceParameterBinding {}
impl Cast<dyn EndPointTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ErrorType> for ResourceParameterBinding {}
impl Cast<dyn ErrorTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ErrorEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EscalationType> for ResourceParameterBinding {}
impl Cast<dyn EscalationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EscalationEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EventType> for ResourceParameterBinding {}
impl Cast<dyn EventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EventBasedGatewayType> for ResourceParameterBinding {}
impl Cast<dyn EventBasedGatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn EventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn EventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ExclusiveGatewayType> for ResourceParameterBinding {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ExpressionType> for ResourceParameterBinding {}
impl Cast<dyn ExpressionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ExtensionType> for ResourceParameterBinding {}
impl Cast<dyn ExtensionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ExtensionElementsType> for ResourceParameterBinding {}
impl Cast<dyn ExtensionElementsTypeMut> for ResourceParameterBinding {}
impl Cast<dyn FlowElementType> for ResourceParameterBinding {}
impl Cast<dyn FlowElementTypeMut> for ResourceParameterBinding {}
impl Cast<dyn FlowNodeType> for ResourceParameterBinding {}
impl Cast<dyn FlowNodeTypeMut> for ResourceParameterBinding {}
impl Cast<dyn FormalExpressionType> for ResourceParameterBinding {}
impl Cast<dyn FormalExpressionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GatewayType> for ResourceParameterBinding {}
impl Cast<dyn GatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalChoreographyTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalConversationType> for ResourceParameterBinding {}
impl Cast<dyn GlobalConversationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalManualTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalManualTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalScriptTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GlobalUserTaskType> for ResourceParameterBinding {}
impl Cast<dyn GlobalUserTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn GroupType> for ResourceParameterBinding {}
impl Cast<dyn GroupTypeMut> for ResourceParameterBinding {}
impl Cast<dyn HumanPerformerType> for ResourceParameterBinding {}
impl Cast<dyn HumanPerformerTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ImplicitThrowEventType> for ResourceParameterBinding {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn InclusiveGatewayType> for ResourceParameterBinding {}
impl Cast<dyn InclusiveGatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn InputSetType> for ResourceParameterBinding {}
impl Cast<dyn InputSetTypeMut> for ResourceParameterBinding {}
impl Cast<dyn InterfaceType> for ResourceParameterBinding {}
impl Cast<dyn InterfaceTypeMut> for ResourceParameterBinding {}
impl Cast<dyn IntermediateCatchEventType> for ResourceParameterBinding {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn IntermediateThrowEventType> for ResourceParameterBinding {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn InputOutputBindingType> for ResourceParameterBinding {}
impl Cast<dyn InputOutputBindingTypeMut> for ResourceParameterBinding {}
impl Cast<dyn InputOutputSpecificationType> for ResourceParameterBinding {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ItemDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn ItemDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn LaneType> for ResourceParameterBinding {}
impl Cast<dyn LaneTypeMut> for ResourceParameterBinding {}
impl Cast<dyn LaneSetType> for ResourceParameterBinding {}
impl Cast<dyn LaneSetTypeMut> for ResourceParameterBinding {}
impl Cast<dyn LinkEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn LoopCharacteristicsType> for ResourceParameterBinding {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ManualTaskType> for ResourceParameterBinding {}
impl Cast<dyn ManualTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MessageType> for ResourceParameterBinding {}
impl Cast<dyn MessageTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MessageEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MessageFlowType> for ResourceParameterBinding {}
impl Cast<dyn MessageFlowTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MessageFlowAssociationType> for ResourceParameterBinding {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MonitoringType> for ResourceParameterBinding {}
impl Cast<dyn MonitoringTypeMut> for ResourceParameterBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ResourceParameterBinding {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ResourceParameterBinding {}
impl Cast<dyn OperationType> for ResourceParameterBinding {}
impl Cast<dyn OperationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn OutputSetType> for ResourceParameterBinding {}
impl Cast<dyn OutputSetTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ParallelGatewayType> for ResourceParameterBinding {}
impl Cast<dyn ParallelGatewayTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ParticipantType> for ResourceParameterBinding {}
impl Cast<dyn ParticipantTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ParticipantAssociationType> for ResourceParameterBinding {}
impl Cast<dyn ParticipantAssociationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ParticipantMultiplicityType> for ResourceParameterBinding {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ResourceParameterBinding {}
impl Cast<dyn PartnerEntityType> for ResourceParameterBinding {}
impl Cast<dyn PartnerEntityTypeMut> for ResourceParameterBinding {}
impl Cast<dyn PartnerRoleType> for ResourceParameterBinding {}
impl Cast<dyn PartnerRoleTypeMut> for ResourceParameterBinding {}
impl Cast<dyn PerformerType> for ResourceParameterBinding {}
impl Cast<dyn PerformerTypeMut> for ResourceParameterBinding {}
impl Cast<dyn PotentialOwnerType> for ResourceParameterBinding {}
impl Cast<dyn PotentialOwnerTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ProcessType> for ResourceParameterBinding {}
impl Cast<dyn ProcessTypeMut> for ResourceParameterBinding {}
impl Cast<dyn PropertyType> for ResourceParameterBinding {}
impl Cast<dyn PropertyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ReceiveTaskType> for ResourceParameterBinding {}
impl Cast<dyn ReceiveTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn RelationshipType> for ResourceParameterBinding {}
impl Cast<dyn RelationshipTypeMut> for ResourceParameterBinding {}
impl Cast<dyn RenderingType> for ResourceParameterBinding {}
impl Cast<dyn RenderingTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ResourceType> for ResourceParameterBinding {}
impl Cast<dyn ResourceTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ResourceAssignmentExpressionType> for ResourceParameterBinding {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ResourceParameterType> for ResourceParameterBinding {}
impl Cast<dyn ResourceParameterTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ResourceParameterBindingType> for ResourceParameterBinding {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for ResourceParameterBinding {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceRoleType> for ResourceParameterBinding {}
impl Cast<dyn ResourceRoleTypeMut> for ResourceParameterBinding {}
impl Cast<dyn RootElementType> for ResourceParameterBinding {}
impl Cast<dyn RootElementTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ScriptTaskType> for ResourceParameterBinding {}
impl Cast<dyn ScriptTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ScriptType> for ResourceParameterBinding {}
impl Cast<dyn ScriptTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SendTaskType> for ResourceParameterBinding {}
impl Cast<dyn SendTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SequenceFlowType> for ResourceParameterBinding {}
impl Cast<dyn SequenceFlowTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ServiceTaskType> for ResourceParameterBinding {}
impl Cast<dyn ServiceTaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SignalType> for ResourceParameterBinding {}
impl Cast<dyn SignalTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SignalEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn StandardLoopCharacteristicsType> for ResourceParameterBinding {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ResourceParameterBinding {}
impl Cast<dyn StartEventType> for ResourceParameterBinding {}
impl Cast<dyn StartEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SubChoreographyType> for ResourceParameterBinding {}
impl Cast<dyn SubChoreographyTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SubConversationType> for ResourceParameterBinding {}
impl Cast<dyn SubConversationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn SubProcessType> for ResourceParameterBinding {}
impl Cast<dyn SubProcessTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TaskType> for ResourceParameterBinding {}
impl Cast<dyn TaskTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TerminateEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TextAnnotationType> for ResourceParameterBinding {}
impl Cast<dyn TextAnnotationTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TextType> for ResourceParameterBinding {}
impl Cast<dyn TextTypeMut> for ResourceParameterBinding {}
impl Cast<dyn ThrowEventType> for ResourceParameterBinding {}
impl Cast<dyn ThrowEventTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TimerEventDefinitionType> for ResourceParameterBinding {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn TransactionType> for ResourceParameterBinding {}
impl Cast<dyn TransactionTypeMut> for ResourceParameterBinding {}
impl Cast<dyn UserTaskType> for ResourceParameterBinding {}
impl Cast<dyn UserTaskTypeMut> for ResourceParameterBinding {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:resourceRole")]
pub struct ResourceRole {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ResourceRoleType",rg*="name","ResourceRoleTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:resourceRef")]
    #[tia("ResourceRoleType",rg*="resource_ref","ResourceRoleTypeMut",s,rmg*="resource_ref_mut")]
    pub resource_ref: String,
    #[xml(child = "bpmn:resourceParameterBinding")]
    #[tia("ResourceRoleType",rg*="resource_parameter_bindings","ResourceRoleTypeMut",s,rmg*="resource_parameter_bindings_mut")]
    pub resource_parameter_bindings: Vec<ResourceParameterBinding>,
    #[xml(child = "bpmn:resourceAssignmentExpression")]
    #[tia("ResourceRoleType",rg*="resource_assignment_expression","ResourceRoleTypeMut",s,rmg*="resource_assignment_expression_mut")]
    pub resource_assignment_expression: Option<ResourceAssignmentExpression>,
}
impl DocumentElement for ResourceRole {
    fn element(&self) -> Element {
        Element::ResourceRole
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ResourceRole {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_parameter_bindings.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.resource_assignment_expression.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.resource_parameter_bindings.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.resource_assignment_expression.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `resourceRole`
pub trait ResourceRoleType: BaseElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of `resourceRef` child
    fn resource_ref(&self) -> &String;
    /// Get value of `resourceParameterBinding` child
    fn resource_parameter_bindings(&self) -> &Vec<ResourceParameterBinding>;
    /// Get value of `resourceAssignmentExpression` child
    fn resource_assignment_expression(&self) -> &Option<ResourceAssignmentExpression>;
}
dyn_clone::clone_trait_object!(ResourceRoleType);
impl_downcast!(ResourceRoleType);
/// Mutable access to `resourceRole`
pub trait ResourceRoleTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + ResourceRoleType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Get a mutable value of `resourceRef` child
    fn resource_ref_mut(&mut self) -> &mut String;
    /// Set value of `resourceRef` child
    fn set_resource_ref(&mut self, value: String);
    /// Get a mutable value of `resourceParameterBinding` child
    fn resource_parameter_bindings_mut(&mut self) -> &mut Vec<ResourceParameterBinding>;
    /// Set value of `resourceParameterBinding` child
    fn set_resource_parameter_bindings(&mut self, value: Vec<ResourceParameterBinding>);
    /// Get a mutable value of `resourceAssignmentExpression` child
    fn resource_assignment_expression_mut(&mut self) -> &mut Option<ResourceAssignmentExpression>;
    /// Set value of `resourceAssignmentExpression` child
    fn set_resource_assignment_expression(&mut self, value: Option<ResourceAssignmentExpression>);
}
dyn_clone::clone_trait_object!(ResourceRoleTypeMut);
impl_downcast!(ResourceRoleTypeMut);
impl Cast<dyn DefinitionsType> for ResourceRole {}
impl Cast<dyn DefinitionsTypeMut> for ResourceRole {}
impl Cast<dyn ImportType> for ResourceRole {}
impl Cast<dyn ImportTypeMut> for ResourceRole {}
impl Cast<dyn ActivityType> for ResourceRole {}
impl Cast<dyn ActivityTypeMut> for ResourceRole {}
impl Cast<dyn AdHocSubProcessType> for ResourceRole {}
impl Cast<dyn AdHocSubProcessTypeMut> for ResourceRole {}
impl Cast<dyn ArtifactType> for ResourceRole {}
impl Cast<dyn ArtifactTypeMut> for ResourceRole {}
impl Cast<dyn AssignmentType> for ResourceRole {}
impl Cast<dyn AssignmentTypeMut> for ResourceRole {}
impl Cast<dyn AssociationType> for ResourceRole {}
impl Cast<dyn AssociationTypeMut> for ResourceRole {}
impl Cast<dyn AuditingType> for ResourceRole {}
impl Cast<dyn AuditingTypeMut> for ResourceRole {}
impl Cast<dyn BaseElementType> for ResourceRole {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ResourceRole {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ResourceRole {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ResourceRole {}
impl Cast<dyn BoundaryEventType> for ResourceRole {}
impl Cast<dyn BoundaryEventTypeMut> for ResourceRole {}
impl Cast<dyn BusinessRuleTaskType> for ResourceRole {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ResourceRole {}
impl Cast<dyn CallableElementType> for ResourceRole {}
impl Cast<dyn CallableElementTypeMut> for ResourceRole {}
impl Cast<dyn CallActivityType> for ResourceRole {}
impl Cast<dyn CallActivityTypeMut> for ResourceRole {}
impl Cast<dyn CallChoreographyType> for ResourceRole {}
impl Cast<dyn CallChoreographyTypeMut> for ResourceRole {}
impl Cast<dyn CallConversationType> for ResourceRole {}
impl Cast<dyn CallConversationTypeMut> for ResourceRole {}
impl Cast<dyn CancelEventDefinitionType> for ResourceRole {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn CatchEventType> for ResourceRole {}
impl Cast<dyn CatchEventTypeMut> for ResourceRole {}
impl Cast<dyn CategoryType> for ResourceRole {}
impl Cast<dyn CategoryTypeMut> for ResourceRole {}
impl Cast<dyn CategoryValueType> for ResourceRole {}
impl Cast<dyn CategoryValueTypeMut> for ResourceRole {}
impl Cast<dyn ChoreographyType> for ResourceRole {}
impl Cast<dyn ChoreographyTypeMut> for ResourceRole {}
impl Cast<dyn ChoreographyActivityType> for ResourceRole {}
impl Cast<dyn ChoreographyActivityTypeMut> for ResourceRole {}
impl Cast<dyn ChoreographyTaskType> for ResourceRole {}
impl Cast<dyn ChoreographyTaskTypeMut> for ResourceRole {}
impl Cast<dyn CollaborationType> for ResourceRole {}
impl Cast<dyn CollaborationTypeMut> for ResourceRole {}
impl Cast<dyn CompensateEventDefinitionType> for ResourceRole {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ResourceRole {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn ComplexGatewayType> for ResourceRole {}
impl Cast<dyn ComplexGatewayTypeMut> for ResourceRole {}
impl Cast<dyn ConditionalEventDefinitionType> for ResourceRole {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn ConversationType> for ResourceRole {}
impl Cast<dyn ConversationTypeMut> for ResourceRole {}
impl Cast<dyn ConversationAssociationType> for ResourceRole {}
impl Cast<dyn ConversationAssociationTypeMut> for ResourceRole {}
impl Cast<dyn ConversationLinkType> for ResourceRole {}
impl Cast<dyn ConversationLinkTypeMut> for ResourceRole {}
impl Cast<dyn ConversationNodeType> for ResourceRole {}
impl Cast<dyn ConversationNodeTypeMut> for ResourceRole {}
impl Cast<dyn CorrelationKeyType> for ResourceRole {}
impl Cast<dyn CorrelationKeyTypeMut> for ResourceRole {}
impl Cast<dyn CorrelationPropertyType> for ResourceRole {}
impl Cast<dyn CorrelationPropertyTypeMut> for ResourceRole {}
impl Cast<dyn CorrelationPropertyBindingType> for ResourceRole {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ResourceRole {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ResourceRole {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ResourceRole {}
impl Cast<dyn CorrelationSubscriptionType> for ResourceRole {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ResourceRole {}
impl Cast<dyn DataAssociationType> for ResourceRole {}
impl Cast<dyn DataAssociationTypeMut> for ResourceRole {}
impl Cast<dyn DataInputType> for ResourceRole {}
impl Cast<dyn DataInputTypeMut> for ResourceRole {}
impl Cast<dyn DataInputAssociationType> for ResourceRole {}
impl Cast<dyn DataInputAssociationTypeMut> for ResourceRole {}
impl Cast<dyn DataObjectType> for ResourceRole {}
impl Cast<dyn DataObjectTypeMut> for ResourceRole {}
impl Cast<dyn DataObjectReferenceType> for ResourceRole {}
impl Cast<dyn DataObjectReferenceTypeMut> for ResourceRole {}
impl Cast<dyn DataOutputType> for ResourceRole {}
impl Cast<dyn DataOutputTypeMut> for ResourceRole {}
impl Cast<dyn DataOutputAssociationType> for ResourceRole {}
impl Cast<dyn DataOutputAssociationTypeMut> for ResourceRole {}
impl Cast<dyn DataStateType> for ResourceRole {}
impl Cast<dyn DataStateTypeMut> for ResourceRole {}
impl Cast<dyn DataStoreType> for ResourceRole {}
impl Cast<dyn DataStoreTypeMut> for ResourceRole {}
impl Cast<dyn DataStoreReferenceType> for ResourceRole {}
impl Cast<dyn DataStoreReferenceTypeMut> for ResourceRole {}
impl Cast<dyn DocumentationType> for ResourceRole {}
impl Cast<dyn DocumentationTypeMut> for ResourceRole {}
impl Cast<dyn EndEventType> for ResourceRole {}
impl Cast<dyn EndEventTypeMut> for ResourceRole {}
impl Cast<dyn EndPointType> for ResourceRole {}
impl Cast<dyn EndPointTypeMut> for ResourceRole {}
impl Cast<dyn ErrorType> for ResourceRole {}
impl Cast<dyn ErrorTypeMut> for ResourceRole {}
impl Cast<dyn ErrorEventDefinitionType> for ResourceRole {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn EscalationType> for ResourceRole {}
impl Cast<dyn EscalationTypeMut> for ResourceRole {}
impl Cast<dyn EscalationEventDefinitionType> for ResourceRole {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn EventType> for ResourceRole {}
impl Cast<dyn EventTypeMut> for ResourceRole {}
impl Cast<dyn EventBasedGatewayType> for ResourceRole {}
impl Cast<dyn EventBasedGatewayTypeMut> for ResourceRole {}
impl Cast<dyn EventDefinitionType> for ResourceRole {}
impl Cast<dyn EventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn ExclusiveGatewayType> for ResourceRole {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ResourceRole {}
impl Cast<dyn ExpressionType> for ResourceRole {}
impl Cast<dyn ExpressionTypeMut> for ResourceRole {}
impl Cast<dyn ExtensionType> for ResourceRole {}
impl Cast<dyn ExtensionTypeMut> for ResourceRole {}
impl Cast<dyn ExtensionElementsType> for ResourceRole {}
impl Cast<dyn ExtensionElementsTypeMut> for ResourceRole {}
impl Cast<dyn FlowElementType> for ResourceRole {}
impl Cast<dyn FlowElementTypeMut> for ResourceRole {}
impl Cast<dyn FlowNodeType> for ResourceRole {}
impl Cast<dyn FlowNodeTypeMut> for ResourceRole {}
impl Cast<dyn FormalExpressionType> for ResourceRole {}
impl Cast<dyn FormalExpressionTypeMut> for ResourceRole {}
impl Cast<dyn GatewayType> for ResourceRole {}
impl Cast<dyn GatewayTypeMut> for ResourceRole {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ResourceRole {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ResourceRole {}
impl Cast<dyn GlobalChoreographyTaskType> for ResourceRole {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ResourceRole {}
impl Cast<dyn GlobalConversationType> for ResourceRole {}
impl Cast<dyn GlobalConversationTypeMut> for ResourceRole {}
impl Cast<dyn GlobalManualTaskType> for ResourceRole {}
impl Cast<dyn GlobalManualTaskTypeMut> for ResourceRole {}
impl Cast<dyn GlobalScriptTaskType> for ResourceRole {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ResourceRole {}
impl Cast<dyn GlobalTaskType> for ResourceRole {}
impl Cast<dyn GlobalTaskTypeMut> for ResourceRole {}
impl Cast<dyn GlobalUserTaskType> for ResourceRole {}
impl Cast<dyn GlobalUserTaskTypeMut> for ResourceRole {}
impl Cast<dyn GroupType> for ResourceRole {}
impl Cast<dyn GroupTypeMut> for ResourceRole {}
impl Cast<dyn HumanPerformerType> for ResourceRole {}
impl Cast<dyn HumanPerformerTypeMut> for ResourceRole {}
impl Cast<dyn ImplicitThrowEventType> for ResourceRole {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ResourceRole {}
impl Cast<dyn InclusiveGatewayType> for ResourceRole {}
impl Cast<dyn InclusiveGatewayTypeMut> for ResourceRole {}
impl Cast<dyn InputSetType> for ResourceRole {}
impl Cast<dyn InputSetTypeMut> for ResourceRole {}
impl Cast<dyn InterfaceType> for ResourceRole {}
impl Cast<dyn InterfaceTypeMut> for ResourceRole {}
impl Cast<dyn IntermediateCatchEventType> for ResourceRole {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ResourceRole {}
impl Cast<dyn IntermediateThrowEventType> for ResourceRole {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ResourceRole {}
impl Cast<dyn InputOutputBindingType> for ResourceRole {}
impl Cast<dyn InputOutputBindingTypeMut> for ResourceRole {}
impl Cast<dyn InputOutputSpecificationType> for ResourceRole {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ResourceRole {}
impl Cast<dyn ItemDefinitionType> for ResourceRole {}
impl Cast<dyn ItemDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn LaneType> for ResourceRole {}
impl Cast<dyn LaneTypeMut> for ResourceRole {}
impl Cast<dyn LaneSetType> for ResourceRole {}
impl Cast<dyn LaneSetTypeMut> for ResourceRole {}
impl Cast<dyn LinkEventDefinitionType> for ResourceRole {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn LoopCharacteristicsType> for ResourceRole {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ResourceRole {}
impl Cast<dyn ManualTaskType> for ResourceRole {}
impl Cast<dyn ManualTaskTypeMut> for ResourceRole {}
impl Cast<dyn MessageType> for ResourceRole {}
impl Cast<dyn MessageTypeMut> for ResourceRole {}
impl Cast<dyn MessageEventDefinitionType> for ResourceRole {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn MessageFlowType> for ResourceRole {}
impl Cast<dyn MessageFlowTypeMut> for ResourceRole {}
impl Cast<dyn MessageFlowAssociationType> for ResourceRole {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ResourceRole {}
impl Cast<dyn MonitoringType> for ResourceRole {}
impl Cast<dyn MonitoringTypeMut> for ResourceRole {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ResourceRole {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ResourceRole {}
impl Cast<dyn OperationType> for ResourceRole {}
impl Cast<dyn OperationTypeMut> for ResourceRole {}
impl Cast<dyn OutputSetType> for ResourceRole {}
impl Cast<dyn OutputSetTypeMut> for ResourceRole {}
impl Cast<dyn ParallelGatewayType> for ResourceRole {}
impl Cast<dyn ParallelGatewayTypeMut> for ResourceRole {}
impl Cast<dyn ParticipantType> for ResourceRole {}
impl Cast<dyn ParticipantTypeMut> for ResourceRole {}
impl Cast<dyn ParticipantAssociationType> for ResourceRole {}
impl Cast<dyn ParticipantAssociationTypeMut> for ResourceRole {}
impl Cast<dyn ParticipantMultiplicityType> for ResourceRole {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ResourceRole {}
impl Cast<dyn PartnerEntityType> for ResourceRole {}
impl Cast<dyn PartnerEntityTypeMut> for ResourceRole {}
impl Cast<dyn PartnerRoleType> for ResourceRole {}
impl Cast<dyn PartnerRoleTypeMut> for ResourceRole {}
impl Cast<dyn PerformerType> for ResourceRole {}
impl Cast<dyn PerformerTypeMut> for ResourceRole {}
impl Cast<dyn PotentialOwnerType> for ResourceRole {}
impl Cast<dyn PotentialOwnerTypeMut> for ResourceRole {}
impl Cast<dyn ProcessType> for ResourceRole {}
impl Cast<dyn ProcessTypeMut> for ResourceRole {}
impl Cast<dyn PropertyType> for ResourceRole {}
impl Cast<dyn PropertyTypeMut> for ResourceRole {}
impl Cast<dyn ReceiveTaskType> for ResourceRole {}
impl Cast<dyn ReceiveTaskTypeMut> for ResourceRole {}
impl Cast<dyn RelationshipType> for ResourceRole {}
impl Cast<dyn RelationshipTypeMut> for ResourceRole {}
impl Cast<dyn RenderingType> for ResourceRole {}
impl Cast<dyn RenderingTypeMut> for ResourceRole {}
impl Cast<dyn ResourceType> for ResourceRole {}
impl Cast<dyn ResourceTypeMut> for ResourceRole {}
impl Cast<dyn ResourceAssignmentExpressionType> for ResourceRole {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ResourceRole {}
impl Cast<dyn ResourceParameterType> for ResourceRole {}
impl Cast<dyn ResourceParameterTypeMut> for ResourceRole {}
impl Cast<dyn ResourceParameterBindingType> for ResourceRole {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ResourceRole {}
impl Cast<dyn ResourceRoleType> for ResourceRole {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ResourceRoleTypeMut> for ResourceRole {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementType> for ResourceRole {}
impl Cast<dyn RootElementTypeMut> for ResourceRole {}
impl Cast<dyn ScriptTaskType> for ResourceRole {}
impl Cast<dyn ScriptTaskTypeMut> for ResourceRole {}
impl Cast<dyn ScriptType> for ResourceRole {}
impl Cast<dyn ScriptTypeMut> for ResourceRole {}
impl Cast<dyn SendTaskType> for ResourceRole {}
impl Cast<dyn SendTaskTypeMut> for ResourceRole {}
impl Cast<dyn SequenceFlowType> for ResourceRole {}
impl Cast<dyn SequenceFlowTypeMut> for ResourceRole {}
impl Cast<dyn ServiceTaskType> for ResourceRole {}
impl Cast<dyn ServiceTaskTypeMut> for ResourceRole {}
impl Cast<dyn SignalType> for ResourceRole {}
impl Cast<dyn SignalTypeMut> for ResourceRole {}
impl Cast<dyn SignalEventDefinitionType> for ResourceRole {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn StandardLoopCharacteristicsType> for ResourceRole {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ResourceRole {}
impl Cast<dyn StartEventType> for ResourceRole {}
impl Cast<dyn StartEventTypeMut> for ResourceRole {}
impl Cast<dyn SubChoreographyType> for ResourceRole {}
impl Cast<dyn SubChoreographyTypeMut> for ResourceRole {}
impl Cast<dyn SubConversationType> for ResourceRole {}
impl Cast<dyn SubConversationTypeMut> for ResourceRole {}
impl Cast<dyn SubProcessType> for ResourceRole {}
impl Cast<dyn SubProcessTypeMut> for ResourceRole {}
impl Cast<dyn TaskType> for ResourceRole {}
impl Cast<dyn TaskTypeMut> for ResourceRole {}
impl Cast<dyn TerminateEventDefinitionType> for ResourceRole {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn TextAnnotationType> for ResourceRole {}
impl Cast<dyn TextAnnotationTypeMut> for ResourceRole {}
impl Cast<dyn TextType> for ResourceRole {}
impl Cast<dyn TextTypeMut> for ResourceRole {}
impl Cast<dyn ThrowEventType> for ResourceRole {}
impl Cast<dyn ThrowEventTypeMut> for ResourceRole {}
impl Cast<dyn TimerEventDefinitionType> for ResourceRole {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ResourceRole {}
impl Cast<dyn TransactionType> for ResourceRole {}
impl Cast<dyn TransactionTypeMut> for ResourceRole {}
impl Cast<dyn UserTaskType> for ResourceRole {}
impl Cast<dyn UserTaskTypeMut> for ResourceRole {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:rootElement")]
#[serde(tag = "type")]
pub enum RootElement {
    #[xml(tag = "bpmn:category")]
    Category(Category),
    #[xml(tag = "bpmn:collaboration")]
    Collaboration(Collaboration),
    #[xml(tag = "bpmn:correlationProperty")]
    CorrelationProperty(CorrelationProperty),
    #[xml(tag = "bpmn:dataStore")]
    DataStore(DataStore),
    #[xml(tag = "bpmn:endPoint")]
    EndPoint(EndPoint),
    #[xml(tag = "bpmn:error")]
    Error(Error),
    #[xml(tag = "bpmn:escalation")]
    Escalation(Escalation),
    #[xml(tag = "bpmn:eventDefinition")]
    EventDefinition(EventDefinition),
    #[xml(tag = "bpmn:globalBusinessRuleTask")]
    GlobalBusinessRuleTask(GlobalBusinessRuleTask),
    #[xml(tag = "bpmn:globalManualTask")]
    GlobalManualTask(GlobalManualTask),
    #[xml(tag = "bpmn:globalScriptTask")]
    GlobalScriptTask(GlobalScriptTask),
    #[xml(tag = "bpmn:globalTask")]
    GlobalTask(GlobalTask),
    #[xml(tag = "bpmn:globalUserTask")]
    GlobalUserTask(GlobalUserTask),
    #[xml(tag = "bpmn:interface")]
    Interface(Interface),
    #[xml(tag = "bpmn:itemDefinition")]
    ItemDefinition(ItemDefinition),
    #[xml(tag = "bpmn:message")]
    Message(Message),
    #[xml(tag = "bpmn:partnerEntity")]
    PartnerEntity(PartnerEntity),
    #[xml(tag = "bpmn:partnerRole")]
    PartnerRole(PartnerRole),
    #[xml(tag = "bpmn:process")]
    Process(Process),
    #[xml(tag = "bpmn:resource")]
    Resource(Resource),
    #[xml(tag = "bpmn:signal")]
    Signal(Signal),
}
impl RootElement {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {
            RootElement::Category(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Collaboration(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::CorrelationProperty(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::DataStore(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::EndPoint(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Error(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Escalation(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::EventDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::GlobalBusinessRuleTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::GlobalManualTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::GlobalScriptTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::GlobalTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::GlobalUserTask(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Interface(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::ItemDefinition(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Message(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::PartnerEntity(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::PartnerRole(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Process(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Resource(e) => Box::new(e) as Box<dyn DocumentElement>,
            RootElement::Signal(e) => Box::new(e) as Box<dyn DocumentElement>,
        }
    }
}
impl DocumentElementContainer for RootElement {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            RootElement::Category(e) => e.find_by_id_mut(id),
            RootElement::Collaboration(e) => e.find_by_id_mut(id),
            RootElement::CorrelationProperty(e) => e.find_by_id_mut(id),
            RootElement::DataStore(e) => e.find_by_id_mut(id),
            RootElement::EndPoint(e) => e.find_by_id_mut(id),
            RootElement::Error(e) => e.find_by_id_mut(id),
            RootElement::Escalation(e) => e.find_by_id_mut(id),
            RootElement::EventDefinition(e) => e.find_by_id_mut(id),
            RootElement::GlobalBusinessRuleTask(e) => e.find_by_id_mut(id),
            RootElement::GlobalManualTask(e) => e.find_by_id_mut(id),
            RootElement::GlobalScriptTask(e) => e.find_by_id_mut(id),
            RootElement::GlobalTask(e) => e.find_by_id_mut(id),
            RootElement::GlobalUserTask(e) => e.find_by_id_mut(id),
            RootElement::Interface(e) => e.find_by_id_mut(id),
            RootElement::ItemDefinition(e) => e.find_by_id_mut(id),
            RootElement::Message(e) => e.find_by_id_mut(id),
            RootElement::PartnerEntity(e) => e.find_by_id_mut(id),
            RootElement::PartnerRole(e) => e.find_by_id_mut(id),
            RootElement::Process(e) => e.find_by_id_mut(id),
            RootElement::Resource(e) => e.find_by_id_mut(id),
            RootElement::Signal(e) => e.find_by_id_mut(id),

            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            RootElement::Category(e) => e.find_by_id(id),
            RootElement::Collaboration(e) => e.find_by_id(id),
            RootElement::CorrelationProperty(e) => e.find_by_id(id),
            RootElement::DataStore(e) => e.find_by_id(id),
            RootElement::EndPoint(e) => e.find_by_id(id),
            RootElement::Error(e) => e.find_by_id(id),
            RootElement::Escalation(e) => e.find_by_id(id),
            RootElement::EventDefinition(e) => e.find_by_id(id),
            RootElement::GlobalBusinessRuleTask(e) => e.find_by_id(id),
            RootElement::GlobalManualTask(e) => e.find_by_id(id),
            RootElement::GlobalScriptTask(e) => e.find_by_id(id),
            RootElement::GlobalTask(e) => e.find_by_id(id),
            RootElement::GlobalUserTask(e) => e.find_by_id(id),
            RootElement::Interface(e) => e.find_by_id(id),
            RootElement::ItemDefinition(e) => e.find_by_id(id),
            RootElement::Message(e) => e.find_by_id(id),
            RootElement::PartnerEntity(e) => e.find_by_id(id),
            RootElement::PartnerRole(e) => e.find_by_id(id),
            RootElement::Process(e) => e.find_by_id(id),
            RootElement::Resource(e) => e.find_by_id(id),
            RootElement::Signal(e) => e.find_by_id(id),

            _ => None,
        }
    }
}
impl DocumentElement for RootElement {
    fn element(&self) -> Element {
        Element::RootElement
    }
}
/// Access to `rootElement`
pub trait RootElementType: BaseElementType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(RootElementType);
impl_downcast!(RootElementType);
/// Mutable access to `rootElement`
pub trait RootElementTypeMut:
    BaseElementTypeMut + Downcast + Debug + Send + DynClone + RootElementType
{
}
dyn_clone::clone_trait_object!(RootElementTypeMut);
impl_downcast!(RootElementTypeMut);
impl Cast<dyn DefinitionsType> for RootElement {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DefinitionsType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for RootElement {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ImportType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ImportType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ImportTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for RootElement {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ActivityType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ActivityType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for RootElement {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Error(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Message(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Process(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactType> for RootElement {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ArtifactType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for RootElement {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Error(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Message(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Process(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AssignmentType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for RootElement {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Error(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Message(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Process(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AuditingType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AuditingType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for RootElement {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Error(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Message(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Process(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for RootElement {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Error(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Message(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Process(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::EndPoint(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BoundaryEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementType> for RootElement {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallableElementType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallableElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CallableElementTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityType> for RootElement {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallActivityType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyType> for RootElement {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallChoreographyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CallChoreographyTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationType> for RootElement {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallConversationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CallConversationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CancelEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CatchEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for RootElement {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CategoryType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CategoryType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for RootElement {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CategoryValueType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyType> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ChoreographyActivityType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationType> for RootElement {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CollaborationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationType> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ConversationAssociationType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkType> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationLinkType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationLinkTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeType> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationNodeType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ConversationNodeTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyType> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Error(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Escalation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
            RootElement::Signal(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Error(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Escalation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            RootElement::Signal(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Error(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Escalation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            RootElement::Signal(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Error(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Escalation(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Signal(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationSubscriptionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataInputType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataInputType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataInputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataInputAssociationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataObjectReferenceType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataOutputAssociationType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataOutputAssociationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStateType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStateType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataStoreReferenceType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationType> for RootElement {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DocumentationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EndEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EndEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for RootElement {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EndPointType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EndPointType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for RootElement {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ErrorType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ErrorType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ErrorEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationType> for RootElement {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EscalationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EscalationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventType> for RootElement {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EventBasedGatewayType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn EventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExpressionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for RootElement {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ExtensionElementsType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementType> for RootElement {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Error(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Message(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Process(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FlowElementType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for RootElement {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Error(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Message(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Process(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FlowNodeType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for RootElement {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FormalExpressionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn FormalExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalConversationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalConversationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalConversationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupType> for RootElement {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Error(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Message(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Process(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GroupType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GroupType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn GroupTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for RootElement {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Error(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Message(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Process(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn HumanPerformerType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn HumanPerformerTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ImplicitThrowEventType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetType> for RootElement {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputSetType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputSetType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for RootElement {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Error(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Message(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Process(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InterfaceType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateCatchEventType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateThrowEventType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingType> for RootElement {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputBindingType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for RootElement {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn InputOutputSpecificationType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneType> for RootElement {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Error(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Message(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Process(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LaneType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LaneType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LaneTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for RootElement {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Error(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Message(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Process(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LaneSetType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LinkEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for RootElement {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Error(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Message(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Process(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ManualTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowType> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageFlowAssociationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringType> for RootElement {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Message(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Process(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MonitoringType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for RootElement {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::Error(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e)
            }
            RootElement::Process(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Error(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Signal(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Error(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Escalation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Process(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Resource(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Signal(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Error(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Escalation(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::PartnerEntity(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Resource(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Signal(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for RootElement {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn OperationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn OperationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn OperationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for RootElement {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Error(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Message(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Process(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn OutputSetType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for RootElement {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantType> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantAssociationType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantAssociationType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ParticipantMultiplicityType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityType> for RootElement {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Error(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Message(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Process(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PartnerEntityType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleType> for RootElement {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Error(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Message(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Process(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PartnerRoleType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for RootElement {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Error(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Message(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Process(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PerformerType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PerformerType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for RootElement {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Error(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Message(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Process(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessType> for RootElement {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ProcessType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ProcessType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for RootElement {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PropertyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PropertyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for RootElement {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Error(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Message(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Process(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RelationshipType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingType> for RootElement {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Error(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Message(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Process(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RenderingType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RenderingType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Collaboration(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::EndPoint(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Error(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
            RootElement::Signal(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterType> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceParameterBindingType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleType> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceRoleType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementType> for RootElement {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Error(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Message(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Process(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RootElementType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RootElementType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for RootElement {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ScriptType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ScriptType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SendTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for RootElement {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SequenceFlowType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ServiceTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for RootElement {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SignalType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SignalType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SignalTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SignalEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for RootElement {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Error(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Message(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Process(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Interface(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::Message(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::EndPoint(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::EventDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::ItemDefinition(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
            RootElement::Process(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn StartEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn StartEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for RootElement {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubChoreographyType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SubChoreographyTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationType> for RootElement {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubConversationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn SubConversationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessType> for RootElement {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubProcessType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn TerminateEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Interface(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::Message(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => {
                Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::PartnerRole(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationType> for RootElement {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TextAnnotationType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TextAnnotationTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextType> for RootElement {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TextType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TextType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TextType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TextType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TextType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TextType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TextType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TextTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for RootElement {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Error(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Message(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Process(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ThrowEventType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for RootElement {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TimerEventDefinitionType>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast(e)
            }
            RootElement::GlobalManualTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::DataStore(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalManualTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalScriptTask(e) => {
                Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e)
            }
            RootElement::GlobalTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionType> for RootElement {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Error(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Message(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Process(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TransactionType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TransactionType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for RootElement {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Error(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Interface(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Message(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Process(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Resource(e) => Cast::<dyn UserTaskType>::cast(e),
            RootElement::Signal(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for RootElement {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Collaboration(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::DataStore(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::EndPoint(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Error(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Escalation(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::EventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::GlobalTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Interface(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::ItemDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Message(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::PartnerEntity(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::PartnerRole(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Process(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Resource(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            RootElement::Signal(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            RootElement::Category(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Collaboration(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::CorrelationProperty(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::DataStore(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::EndPoint(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Error(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Escalation(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::EventDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalBusinessRuleTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalManualTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalScriptTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::GlobalUserTask(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Interface(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::ItemDefinition(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Message(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::PartnerEntity(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::PartnerRole(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Process(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Resource(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            RootElement::Signal(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:scriptTask")]
pub struct ScriptTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "scriptFormat")]
    #[tia("ScriptTaskType",rg*="script_format","ScriptTaskTypeMut",s)]
    pub script_format: Option<String>,
    #[xml(child = "bpmn:script")]
    #[tia("ScriptTaskType",rg*="script","ScriptTaskTypeMut",s,rmg*="script_mut")]
    pub script: Option<Script>,
}
impl DocumentElement for ScriptTask {
    fn element(&self) -> Element {
        Element::ScriptTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ScriptTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.script.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.script.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl TaskType for ScriptTask {}
impl TaskTypeMut for ScriptTask {}
//

/// Access to `scriptTask`
pub trait ScriptTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `scriptFormat`
    fn script_format(&self) -> &Option<String>;
    /// Get value of `script` child
    fn script(&self) -> &Option<Script>;
}
dyn_clone::clone_trait_object!(ScriptTaskType);
impl_downcast!(ScriptTaskType);
/// Mutable access to `scriptTask`
pub trait ScriptTaskTypeMut:
    TaskTypeMut + Downcast + Debug + Send + DynClone + ScriptTaskType
{
    /// Set value of attribute `scriptFormat`
    fn set_script_format(&mut self, value: Option<String>);
    /// Get a mutable value of `script` child
    fn script_mut(&mut self) -> &mut Option<Script>;
    /// Set value of `script` child
    fn set_script(&mut self, value: Option<Script>);
}
dyn_clone::clone_trait_object!(ScriptTaskTypeMut);
impl_downcast!(ScriptTaskTypeMut);
impl Cast<dyn DefinitionsType> for ScriptTask {}
impl Cast<dyn DefinitionsTypeMut> for ScriptTask {}
impl Cast<dyn ImportType> for ScriptTask {}
impl Cast<dyn ImportTypeMut> for ScriptTask {}
impl Cast<dyn ActivityType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for ScriptTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for ScriptTask {}
impl Cast<dyn ArtifactType> for ScriptTask {}
impl Cast<dyn ArtifactTypeMut> for ScriptTask {}
impl Cast<dyn AssignmentType> for ScriptTask {}
impl Cast<dyn AssignmentTypeMut> for ScriptTask {}
impl Cast<dyn AssociationType> for ScriptTask {}
impl Cast<dyn AssociationTypeMut> for ScriptTask {}
impl Cast<dyn AuditingType> for ScriptTask {}
impl Cast<dyn AuditingTypeMut> for ScriptTask {}
impl Cast<dyn BaseElementType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ScriptTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ScriptTask {}
impl Cast<dyn BoundaryEventType> for ScriptTask {}
impl Cast<dyn BoundaryEventTypeMut> for ScriptTask {}
impl Cast<dyn BusinessRuleTaskType> for ScriptTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ScriptTask {}
impl Cast<dyn CallableElementType> for ScriptTask {}
impl Cast<dyn CallableElementTypeMut> for ScriptTask {}
impl Cast<dyn CallActivityType> for ScriptTask {}
impl Cast<dyn CallActivityTypeMut> for ScriptTask {}
impl Cast<dyn CallChoreographyType> for ScriptTask {}
impl Cast<dyn CallChoreographyTypeMut> for ScriptTask {}
impl Cast<dyn CallConversationType> for ScriptTask {}
impl Cast<dyn CallConversationTypeMut> for ScriptTask {}
impl Cast<dyn CancelEventDefinitionType> for ScriptTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn CatchEventType> for ScriptTask {}
impl Cast<dyn CatchEventTypeMut> for ScriptTask {}
impl Cast<dyn CategoryType> for ScriptTask {}
impl Cast<dyn CategoryTypeMut> for ScriptTask {}
impl Cast<dyn CategoryValueType> for ScriptTask {}
impl Cast<dyn CategoryValueTypeMut> for ScriptTask {}
impl Cast<dyn ChoreographyType> for ScriptTask {}
impl Cast<dyn ChoreographyTypeMut> for ScriptTask {}
impl Cast<dyn ChoreographyActivityType> for ScriptTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for ScriptTask {}
impl Cast<dyn ChoreographyTaskType> for ScriptTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for ScriptTask {}
impl Cast<dyn CollaborationType> for ScriptTask {}
impl Cast<dyn CollaborationTypeMut> for ScriptTask {}
impl Cast<dyn CompensateEventDefinitionType> for ScriptTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ScriptTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn ComplexGatewayType> for ScriptTask {}
impl Cast<dyn ComplexGatewayTypeMut> for ScriptTask {}
impl Cast<dyn ConditionalEventDefinitionType> for ScriptTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn ConversationType> for ScriptTask {}
impl Cast<dyn ConversationTypeMut> for ScriptTask {}
impl Cast<dyn ConversationAssociationType> for ScriptTask {}
impl Cast<dyn ConversationAssociationTypeMut> for ScriptTask {}
impl Cast<dyn ConversationLinkType> for ScriptTask {}
impl Cast<dyn ConversationLinkTypeMut> for ScriptTask {}
impl Cast<dyn ConversationNodeType> for ScriptTask {}
impl Cast<dyn ConversationNodeTypeMut> for ScriptTask {}
impl Cast<dyn CorrelationKeyType> for ScriptTask {}
impl Cast<dyn CorrelationKeyTypeMut> for ScriptTask {}
impl Cast<dyn CorrelationPropertyType> for ScriptTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for ScriptTask {}
impl Cast<dyn CorrelationPropertyBindingType> for ScriptTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ScriptTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ScriptTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ScriptTask {}
impl Cast<dyn CorrelationSubscriptionType> for ScriptTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ScriptTask {}
impl Cast<dyn DataAssociationType> for ScriptTask {}
impl Cast<dyn DataAssociationTypeMut> for ScriptTask {}
impl Cast<dyn DataInputType> for ScriptTask {}
impl Cast<dyn DataInputTypeMut> for ScriptTask {}
impl Cast<dyn DataInputAssociationType> for ScriptTask {}
impl Cast<dyn DataInputAssociationTypeMut> for ScriptTask {}
impl Cast<dyn DataObjectType> for ScriptTask {}
impl Cast<dyn DataObjectTypeMut> for ScriptTask {}
impl Cast<dyn DataObjectReferenceType> for ScriptTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for ScriptTask {}
impl Cast<dyn DataOutputType> for ScriptTask {}
impl Cast<dyn DataOutputTypeMut> for ScriptTask {}
impl Cast<dyn DataOutputAssociationType> for ScriptTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for ScriptTask {}
impl Cast<dyn DataStateType> for ScriptTask {}
impl Cast<dyn DataStateTypeMut> for ScriptTask {}
impl Cast<dyn DataStoreType> for ScriptTask {}
impl Cast<dyn DataStoreTypeMut> for ScriptTask {}
impl Cast<dyn DataStoreReferenceType> for ScriptTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for ScriptTask {}
impl Cast<dyn DocumentationType> for ScriptTask {}
impl Cast<dyn DocumentationTypeMut> for ScriptTask {}
impl Cast<dyn EndEventType> for ScriptTask {}
impl Cast<dyn EndEventTypeMut> for ScriptTask {}
impl Cast<dyn EndPointType> for ScriptTask {}
impl Cast<dyn EndPointTypeMut> for ScriptTask {}
impl Cast<dyn ErrorType> for ScriptTask {}
impl Cast<dyn ErrorTypeMut> for ScriptTask {}
impl Cast<dyn ErrorEventDefinitionType> for ScriptTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn EscalationType> for ScriptTask {}
impl Cast<dyn EscalationTypeMut> for ScriptTask {}
impl Cast<dyn EscalationEventDefinitionType> for ScriptTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn EventType> for ScriptTask {}
impl Cast<dyn EventTypeMut> for ScriptTask {}
impl Cast<dyn EventBasedGatewayType> for ScriptTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for ScriptTask {}
impl Cast<dyn EventDefinitionType> for ScriptTask {}
impl Cast<dyn EventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn ExclusiveGatewayType> for ScriptTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ScriptTask {}
impl Cast<dyn ExpressionType> for ScriptTask {}
impl Cast<dyn ExpressionTypeMut> for ScriptTask {}
impl Cast<dyn ExtensionType> for ScriptTask {}
impl Cast<dyn ExtensionTypeMut> for ScriptTask {}
impl Cast<dyn ExtensionElementsType> for ScriptTask {}
impl Cast<dyn ExtensionElementsTypeMut> for ScriptTask {}
impl Cast<dyn FlowElementType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ScriptTask {}
impl Cast<dyn FormalExpressionTypeMut> for ScriptTask {}
impl Cast<dyn GatewayType> for ScriptTask {}
impl Cast<dyn GatewayTypeMut> for ScriptTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ScriptTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ScriptTask {}
impl Cast<dyn GlobalChoreographyTaskType> for ScriptTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ScriptTask {}
impl Cast<dyn GlobalConversationType> for ScriptTask {}
impl Cast<dyn GlobalConversationTypeMut> for ScriptTask {}
impl Cast<dyn GlobalManualTaskType> for ScriptTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for ScriptTask {}
impl Cast<dyn GlobalScriptTaskType> for ScriptTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ScriptTask {}
impl Cast<dyn GlobalTaskType> for ScriptTask {}
impl Cast<dyn GlobalTaskTypeMut> for ScriptTask {}
impl Cast<dyn GlobalUserTaskType> for ScriptTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for ScriptTask {}
impl Cast<dyn GroupType> for ScriptTask {}
impl Cast<dyn GroupTypeMut> for ScriptTask {}
impl Cast<dyn HumanPerformerType> for ScriptTask {}
impl Cast<dyn HumanPerformerTypeMut> for ScriptTask {}
impl Cast<dyn ImplicitThrowEventType> for ScriptTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ScriptTask {}
impl Cast<dyn InclusiveGatewayType> for ScriptTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for ScriptTask {}
impl Cast<dyn InputSetType> for ScriptTask {}
impl Cast<dyn InputSetTypeMut> for ScriptTask {}
impl Cast<dyn InterfaceType> for ScriptTask {}
impl Cast<dyn InterfaceTypeMut> for ScriptTask {}
impl Cast<dyn IntermediateCatchEventType> for ScriptTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ScriptTask {}
impl Cast<dyn IntermediateThrowEventType> for ScriptTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ScriptTask {}
impl Cast<dyn InputOutputBindingType> for ScriptTask {}
impl Cast<dyn InputOutputBindingTypeMut> for ScriptTask {}
impl Cast<dyn InputOutputSpecificationType> for ScriptTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ScriptTask {}
impl Cast<dyn ItemDefinitionType> for ScriptTask {}
impl Cast<dyn ItemDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn LaneType> for ScriptTask {}
impl Cast<dyn LaneTypeMut> for ScriptTask {}
impl Cast<dyn LaneSetType> for ScriptTask {}
impl Cast<dyn LaneSetTypeMut> for ScriptTask {}
impl Cast<dyn LinkEventDefinitionType> for ScriptTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn LoopCharacteristicsType> for ScriptTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ScriptTask {}
impl Cast<dyn ManualTaskType> for ScriptTask {}
impl Cast<dyn ManualTaskTypeMut> for ScriptTask {}
impl Cast<dyn MessageType> for ScriptTask {}
impl Cast<dyn MessageTypeMut> for ScriptTask {}
impl Cast<dyn MessageEventDefinitionType> for ScriptTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn MessageFlowType> for ScriptTask {}
impl Cast<dyn MessageFlowTypeMut> for ScriptTask {}
impl Cast<dyn MessageFlowAssociationType> for ScriptTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ScriptTask {}
impl Cast<dyn MonitoringType> for ScriptTask {}
impl Cast<dyn MonitoringTypeMut> for ScriptTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ScriptTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ScriptTask {}
impl Cast<dyn OperationType> for ScriptTask {}
impl Cast<dyn OperationTypeMut> for ScriptTask {}
impl Cast<dyn OutputSetType> for ScriptTask {}
impl Cast<dyn OutputSetTypeMut> for ScriptTask {}
impl Cast<dyn ParallelGatewayType> for ScriptTask {}
impl Cast<dyn ParallelGatewayTypeMut> for ScriptTask {}
impl Cast<dyn ParticipantType> for ScriptTask {}
impl Cast<dyn ParticipantTypeMut> for ScriptTask {}
impl Cast<dyn ParticipantAssociationType> for ScriptTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for ScriptTask {}
impl Cast<dyn ParticipantMultiplicityType> for ScriptTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ScriptTask {}
impl Cast<dyn PartnerEntityType> for ScriptTask {}
impl Cast<dyn PartnerEntityTypeMut> for ScriptTask {}
impl Cast<dyn PartnerRoleType> for ScriptTask {}
impl Cast<dyn PartnerRoleTypeMut> for ScriptTask {}
impl Cast<dyn PerformerType> for ScriptTask {}
impl Cast<dyn PerformerTypeMut> for ScriptTask {}
impl Cast<dyn PotentialOwnerType> for ScriptTask {}
impl Cast<dyn PotentialOwnerTypeMut> for ScriptTask {}
impl Cast<dyn ProcessType> for ScriptTask {}
impl Cast<dyn ProcessTypeMut> for ScriptTask {}
impl Cast<dyn PropertyType> for ScriptTask {}
impl Cast<dyn PropertyTypeMut> for ScriptTask {}
impl Cast<dyn ReceiveTaskType> for ScriptTask {}
impl Cast<dyn ReceiveTaskTypeMut> for ScriptTask {}
impl Cast<dyn RelationshipType> for ScriptTask {}
impl Cast<dyn RelationshipTypeMut> for ScriptTask {}
impl Cast<dyn RenderingType> for ScriptTask {}
impl Cast<dyn RenderingTypeMut> for ScriptTask {}
impl Cast<dyn ResourceType> for ScriptTask {}
impl Cast<dyn ResourceTypeMut> for ScriptTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for ScriptTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ScriptTask {}
impl Cast<dyn ResourceParameterType> for ScriptTask {}
impl Cast<dyn ResourceParameterTypeMut> for ScriptTask {}
impl Cast<dyn ResourceParameterBindingType> for ScriptTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ScriptTask {}
impl Cast<dyn ResourceRoleType> for ScriptTask {}
impl Cast<dyn ResourceRoleTypeMut> for ScriptTask {}
impl Cast<dyn RootElementType> for ScriptTask {}
impl Cast<dyn RootElementTypeMut> for ScriptTask {}
impl Cast<dyn ScriptTaskType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptType> for ScriptTask {}
impl Cast<dyn ScriptTypeMut> for ScriptTask {}
impl Cast<dyn SendTaskType> for ScriptTask {}
impl Cast<dyn SendTaskTypeMut> for ScriptTask {}
impl Cast<dyn SequenceFlowType> for ScriptTask {}
impl Cast<dyn SequenceFlowTypeMut> for ScriptTask {}
impl Cast<dyn ServiceTaskType> for ScriptTask {}
impl Cast<dyn ServiceTaskTypeMut> for ScriptTask {}
impl Cast<dyn SignalType> for ScriptTask {}
impl Cast<dyn SignalTypeMut> for ScriptTask {}
impl Cast<dyn SignalEventDefinitionType> for ScriptTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for ScriptTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ScriptTask {}
impl Cast<dyn StartEventType> for ScriptTask {}
impl Cast<dyn StartEventTypeMut> for ScriptTask {}
impl Cast<dyn SubChoreographyType> for ScriptTask {}
impl Cast<dyn SubChoreographyTypeMut> for ScriptTask {}
impl Cast<dyn SubConversationType> for ScriptTask {}
impl Cast<dyn SubConversationTypeMut> for ScriptTask {}
impl Cast<dyn SubProcessType> for ScriptTask {}
impl Cast<dyn SubProcessTypeMut> for ScriptTask {}
impl Cast<dyn TaskType> for ScriptTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for ScriptTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for ScriptTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn TextAnnotationType> for ScriptTask {}
impl Cast<dyn TextAnnotationTypeMut> for ScriptTask {}
impl Cast<dyn TextType> for ScriptTask {}
impl Cast<dyn TextTypeMut> for ScriptTask {}
impl Cast<dyn ThrowEventType> for ScriptTask {}
impl Cast<dyn ThrowEventTypeMut> for ScriptTask {}
impl Cast<dyn TimerEventDefinitionType> for ScriptTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ScriptTask {}
impl Cast<dyn TransactionType> for ScriptTask {}
impl Cast<dyn TransactionTypeMut> for ScriptTask {}
impl Cast<dyn UserTaskType> for ScriptTask {}
impl Cast<dyn UserTaskTypeMut> for ScriptTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, PartialEq, Debug, Serialize, Deserialize)]
pub struct Script {
    #[tia("DocumentElementWithContent",rg*="content",
                    "DocumentElementWithContentMut",s,rmg*="content_mut")]
    pub content: Option<String>,
}
impl DocumentElement for Script {
    fn element(&self) -> Element {
        Element::Script
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Script {}
// Traits
impl ScriptType for Script {}
impl ScriptTypeMut for Script {}
//

/// Access to `script`
pub trait ScriptType: Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(ScriptType);
impl_downcast!(ScriptType);
/// Mutable access to `script`
pub trait ScriptTypeMut: Downcast + Debug + Send + DynClone + ScriptType {}
dyn_clone::clone_trait_object!(ScriptTypeMut);
impl_downcast!(ScriptTypeMut);
impl Cast<dyn DefinitionsType> for Script {}
impl Cast<dyn DefinitionsTypeMut> for Script {}
impl Cast<dyn ImportType> for Script {}
impl Cast<dyn ImportTypeMut> for Script {}
impl Cast<dyn ActivityType> for Script {}
impl Cast<dyn ActivityTypeMut> for Script {}
impl Cast<dyn AdHocSubProcessType> for Script {}
impl Cast<dyn AdHocSubProcessTypeMut> for Script {}
impl Cast<dyn ArtifactType> for Script {}
impl Cast<dyn ArtifactTypeMut> for Script {}
impl Cast<dyn AssignmentType> for Script {}
impl Cast<dyn AssignmentTypeMut> for Script {}
impl Cast<dyn AssociationType> for Script {}
impl Cast<dyn AssociationTypeMut> for Script {}
impl Cast<dyn AuditingType> for Script {}
impl Cast<dyn AuditingTypeMut> for Script {}
impl Cast<dyn BaseElementType> for Script {}
impl Cast<dyn BaseElementTypeMut> for Script {}
impl Cast<dyn BaseElementWithMixedContentType> for Script {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Script {}
impl Cast<dyn BoundaryEventType> for Script {}
impl Cast<dyn BoundaryEventTypeMut> for Script {}
impl Cast<dyn BusinessRuleTaskType> for Script {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Script {}
impl Cast<dyn CallableElementType> for Script {}
impl Cast<dyn CallableElementTypeMut> for Script {}
impl Cast<dyn CallActivityType> for Script {}
impl Cast<dyn CallActivityTypeMut> for Script {}
impl Cast<dyn CallChoreographyType> for Script {}
impl Cast<dyn CallChoreographyTypeMut> for Script {}
impl Cast<dyn CallConversationType> for Script {}
impl Cast<dyn CallConversationTypeMut> for Script {}
impl Cast<dyn CancelEventDefinitionType> for Script {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Script {}
impl Cast<dyn CatchEventType> for Script {}
impl Cast<dyn CatchEventTypeMut> for Script {}
impl Cast<dyn CategoryType> for Script {}
impl Cast<dyn CategoryTypeMut> for Script {}
impl Cast<dyn CategoryValueType> for Script {}
impl Cast<dyn CategoryValueTypeMut> for Script {}
impl Cast<dyn ChoreographyType> for Script {}
impl Cast<dyn ChoreographyTypeMut> for Script {}
impl Cast<dyn ChoreographyActivityType> for Script {}
impl Cast<dyn ChoreographyActivityTypeMut> for Script {}
impl Cast<dyn ChoreographyTaskType> for Script {}
impl Cast<dyn ChoreographyTaskTypeMut> for Script {}
impl Cast<dyn CollaborationType> for Script {}
impl Cast<dyn CollaborationTypeMut> for Script {}
impl Cast<dyn CompensateEventDefinitionType> for Script {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Script {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Script {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Script {}
impl Cast<dyn ComplexGatewayType> for Script {}
impl Cast<dyn ComplexGatewayTypeMut> for Script {}
impl Cast<dyn ConditionalEventDefinitionType> for Script {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Script {}
impl Cast<dyn ConversationType> for Script {}
impl Cast<dyn ConversationTypeMut> for Script {}
impl Cast<dyn ConversationAssociationType> for Script {}
impl Cast<dyn ConversationAssociationTypeMut> for Script {}
impl Cast<dyn ConversationLinkType> for Script {}
impl Cast<dyn ConversationLinkTypeMut> for Script {}
impl Cast<dyn ConversationNodeType> for Script {}
impl Cast<dyn ConversationNodeTypeMut> for Script {}
impl Cast<dyn CorrelationKeyType> for Script {}
impl Cast<dyn CorrelationKeyTypeMut> for Script {}
impl Cast<dyn CorrelationPropertyType> for Script {}
impl Cast<dyn CorrelationPropertyTypeMut> for Script {}
impl Cast<dyn CorrelationPropertyBindingType> for Script {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Script {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Script {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Script {}
impl Cast<dyn CorrelationSubscriptionType> for Script {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Script {}
impl Cast<dyn DataAssociationType> for Script {}
impl Cast<dyn DataAssociationTypeMut> for Script {}
impl Cast<dyn DataInputType> for Script {}
impl Cast<dyn DataInputTypeMut> for Script {}
impl Cast<dyn DataInputAssociationType> for Script {}
impl Cast<dyn DataInputAssociationTypeMut> for Script {}
impl Cast<dyn DataObjectType> for Script {}
impl Cast<dyn DataObjectTypeMut> for Script {}
impl Cast<dyn DataObjectReferenceType> for Script {}
impl Cast<dyn DataObjectReferenceTypeMut> for Script {}
impl Cast<dyn DataOutputType> for Script {}
impl Cast<dyn DataOutputTypeMut> for Script {}
impl Cast<dyn DataOutputAssociationType> for Script {}
impl Cast<dyn DataOutputAssociationTypeMut> for Script {}
impl Cast<dyn DataStateType> for Script {}
impl Cast<dyn DataStateTypeMut> for Script {}
impl Cast<dyn DataStoreType> for Script {}
impl Cast<dyn DataStoreTypeMut> for Script {}
impl Cast<dyn DataStoreReferenceType> for Script {}
impl Cast<dyn DataStoreReferenceTypeMut> for Script {}
impl Cast<dyn DocumentationType> for Script {}
impl Cast<dyn DocumentationTypeMut> for Script {}
impl Cast<dyn EndEventType> for Script {}
impl Cast<dyn EndEventTypeMut> for Script {}
impl Cast<dyn EndPointType> for Script {}
impl Cast<dyn EndPointTypeMut> for Script {}
impl Cast<dyn ErrorType> for Script {}
impl Cast<dyn ErrorTypeMut> for Script {}
impl Cast<dyn ErrorEventDefinitionType> for Script {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Script {}
impl Cast<dyn EscalationType> for Script {}
impl Cast<dyn EscalationTypeMut> for Script {}
impl Cast<dyn EscalationEventDefinitionType> for Script {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Script {}
impl Cast<dyn EventType> for Script {}
impl Cast<dyn EventTypeMut> for Script {}
impl Cast<dyn EventBasedGatewayType> for Script {}
impl Cast<dyn EventBasedGatewayTypeMut> for Script {}
impl Cast<dyn EventDefinitionType> for Script {}
impl Cast<dyn EventDefinitionTypeMut> for Script {}
impl Cast<dyn ExclusiveGatewayType> for Script {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Script {}
impl Cast<dyn ExpressionType> for Script {}
impl Cast<dyn ExpressionTypeMut> for Script {}
impl Cast<dyn ExtensionType> for Script {}
impl Cast<dyn ExtensionTypeMut> for Script {}
impl Cast<dyn ExtensionElementsType> for Script {}
impl Cast<dyn ExtensionElementsTypeMut> for Script {}
impl Cast<dyn FlowElementType> for Script {}
impl Cast<dyn FlowElementTypeMut> for Script {}
impl Cast<dyn FlowNodeType> for Script {}
impl Cast<dyn FlowNodeTypeMut> for Script {}
impl Cast<dyn FormalExpressionType> for Script {}
impl Cast<dyn FormalExpressionTypeMut> for Script {}
impl Cast<dyn GatewayType> for Script {}
impl Cast<dyn GatewayTypeMut> for Script {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Script {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Script {}
impl Cast<dyn GlobalChoreographyTaskType> for Script {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Script {}
impl Cast<dyn GlobalConversationType> for Script {}
impl Cast<dyn GlobalConversationTypeMut> for Script {}
impl Cast<dyn GlobalManualTaskType> for Script {}
impl Cast<dyn GlobalManualTaskTypeMut> for Script {}
impl Cast<dyn GlobalScriptTaskType> for Script {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Script {}
impl Cast<dyn GlobalTaskType> for Script {}
impl Cast<dyn GlobalTaskTypeMut> for Script {}
impl Cast<dyn GlobalUserTaskType> for Script {}
impl Cast<dyn GlobalUserTaskTypeMut> for Script {}
impl Cast<dyn GroupType> for Script {}
impl Cast<dyn GroupTypeMut> for Script {}
impl Cast<dyn HumanPerformerType> for Script {}
impl Cast<dyn HumanPerformerTypeMut> for Script {}
impl Cast<dyn ImplicitThrowEventType> for Script {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Script {}
impl Cast<dyn InclusiveGatewayType> for Script {}
impl Cast<dyn InclusiveGatewayTypeMut> for Script {}
impl Cast<dyn InputSetType> for Script {}
impl Cast<dyn InputSetTypeMut> for Script {}
impl Cast<dyn InterfaceType> for Script {}
impl Cast<dyn InterfaceTypeMut> for Script {}
impl Cast<dyn IntermediateCatchEventType> for Script {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Script {}
impl Cast<dyn IntermediateThrowEventType> for Script {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Script {}
impl Cast<dyn InputOutputBindingType> for Script {}
impl Cast<dyn InputOutputBindingTypeMut> for Script {}
impl Cast<dyn InputOutputSpecificationType> for Script {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Script {}
impl Cast<dyn ItemDefinitionType> for Script {}
impl Cast<dyn ItemDefinitionTypeMut> for Script {}
impl Cast<dyn LaneType> for Script {}
impl Cast<dyn LaneTypeMut> for Script {}
impl Cast<dyn LaneSetType> for Script {}
impl Cast<dyn LaneSetTypeMut> for Script {}
impl Cast<dyn LinkEventDefinitionType> for Script {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Script {}
impl Cast<dyn LoopCharacteristicsType> for Script {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Script {}
impl Cast<dyn ManualTaskType> for Script {}
impl Cast<dyn ManualTaskTypeMut> for Script {}
impl Cast<dyn MessageType> for Script {}
impl Cast<dyn MessageTypeMut> for Script {}
impl Cast<dyn MessageEventDefinitionType> for Script {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Script {}
impl Cast<dyn MessageFlowType> for Script {}
impl Cast<dyn MessageFlowTypeMut> for Script {}
impl Cast<dyn MessageFlowAssociationType> for Script {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Script {}
impl Cast<dyn MonitoringType> for Script {}
impl Cast<dyn MonitoringTypeMut> for Script {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Script {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Script {}
impl Cast<dyn OperationType> for Script {}
impl Cast<dyn OperationTypeMut> for Script {}
impl Cast<dyn OutputSetType> for Script {}
impl Cast<dyn OutputSetTypeMut> for Script {}
impl Cast<dyn ParallelGatewayType> for Script {}
impl Cast<dyn ParallelGatewayTypeMut> for Script {}
impl Cast<dyn ParticipantType> for Script {}
impl Cast<dyn ParticipantTypeMut> for Script {}
impl Cast<dyn ParticipantAssociationType> for Script {}
impl Cast<dyn ParticipantAssociationTypeMut> for Script {}
impl Cast<dyn ParticipantMultiplicityType> for Script {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Script {}
impl Cast<dyn PartnerEntityType> for Script {}
impl Cast<dyn PartnerEntityTypeMut> for Script {}
impl Cast<dyn PartnerRoleType> for Script {}
impl Cast<dyn PartnerRoleTypeMut> for Script {}
impl Cast<dyn PerformerType> for Script {}
impl Cast<dyn PerformerTypeMut> for Script {}
impl Cast<dyn PotentialOwnerType> for Script {}
impl Cast<dyn PotentialOwnerTypeMut> for Script {}
impl Cast<dyn ProcessType> for Script {}
impl Cast<dyn ProcessTypeMut> for Script {}
impl Cast<dyn PropertyType> for Script {}
impl Cast<dyn PropertyTypeMut> for Script {}
impl Cast<dyn ReceiveTaskType> for Script {}
impl Cast<dyn ReceiveTaskTypeMut> for Script {}
impl Cast<dyn RelationshipType> for Script {}
impl Cast<dyn RelationshipTypeMut> for Script {}
impl Cast<dyn RenderingType> for Script {}
impl Cast<dyn RenderingTypeMut> for Script {}
impl Cast<dyn ResourceType> for Script {}
impl Cast<dyn ResourceTypeMut> for Script {}
impl Cast<dyn ResourceAssignmentExpressionType> for Script {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Script {}
impl Cast<dyn ResourceParameterType> for Script {}
impl Cast<dyn ResourceParameterTypeMut> for Script {}
impl Cast<dyn ResourceParameterBindingType> for Script {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Script {}
impl Cast<dyn ResourceRoleType> for Script {}
impl Cast<dyn ResourceRoleTypeMut> for Script {}
impl Cast<dyn RootElementType> for Script {}
impl Cast<dyn RootElementTypeMut> for Script {}
impl Cast<dyn ScriptTaskType> for Script {}
impl Cast<dyn ScriptTaskTypeMut> for Script {}
impl Cast<dyn ScriptType> for Script {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTypeMut> for Script {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SendTaskType> for Script {}
impl Cast<dyn SendTaskTypeMut> for Script {}
impl Cast<dyn SequenceFlowType> for Script {}
impl Cast<dyn SequenceFlowTypeMut> for Script {}
impl Cast<dyn ServiceTaskType> for Script {}
impl Cast<dyn ServiceTaskTypeMut> for Script {}
impl Cast<dyn SignalType> for Script {}
impl Cast<dyn SignalTypeMut> for Script {}
impl Cast<dyn SignalEventDefinitionType> for Script {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Script {}
impl Cast<dyn StandardLoopCharacteristicsType> for Script {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Script {}
impl Cast<dyn StartEventType> for Script {}
impl Cast<dyn StartEventTypeMut> for Script {}
impl Cast<dyn SubChoreographyType> for Script {}
impl Cast<dyn SubChoreographyTypeMut> for Script {}
impl Cast<dyn SubConversationType> for Script {}
impl Cast<dyn SubConversationTypeMut> for Script {}
impl Cast<dyn SubProcessType> for Script {}
impl Cast<dyn SubProcessTypeMut> for Script {}
impl Cast<dyn TaskType> for Script {}
impl Cast<dyn TaskTypeMut> for Script {}
impl Cast<dyn TerminateEventDefinitionType> for Script {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Script {}
impl Cast<dyn TextAnnotationType> for Script {}
impl Cast<dyn TextAnnotationTypeMut> for Script {}
impl Cast<dyn TextType> for Script {}
impl Cast<dyn TextTypeMut> for Script {}
impl Cast<dyn ThrowEventType> for Script {}
impl Cast<dyn ThrowEventTypeMut> for Script {}
impl Cast<dyn TimerEventDefinitionType> for Script {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Script {}
impl Cast<dyn TransactionType> for Script {}
impl Cast<dyn TransactionTypeMut> for Script {}
impl Cast<dyn UserTaskType> for Script {}
impl Cast<dyn UserTaskTypeMut> for Script {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:sendTask")]
pub struct SendTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "implementation")]
    #[tia("SendTaskType",rg*="implementation","SendTaskTypeMut",s)]
    pub implementation: Option<String>,
    #[xml(attr = "messageRef")]
    #[tia("SendTaskType",rg*="message_ref","SendTaskTypeMut",s)]
    pub message_ref: Option<String>,
    #[xml(attr = "operationRef")]
    #[tia("SendTaskType",rg*="operation_ref","SendTaskTypeMut",s)]
    pub operation_ref: Option<String>,
}
impl DocumentElement for SendTask {
    fn element(&self) -> Element {
        Element::SendTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SendTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TaskType for SendTask {}
impl TaskTypeMut for SendTask {}
//

/// Access to `sendTask`
pub trait SendTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
    /// Get value of attribute `messageRef`
    fn message_ref(&self) -> &Option<String>;
    /// Get value of attribute `operationRef`
    fn operation_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(SendTaskType);
impl_downcast!(SendTaskType);
/// Mutable access to `sendTask`
pub trait SendTaskTypeMut: TaskTypeMut + Downcast + Debug + Send + DynClone + SendTaskType {
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
    /// Set value of attribute `messageRef`
    fn set_message_ref(&mut self, value: Option<String>);
    /// Set value of attribute `operationRef`
    fn set_operation_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(SendTaskTypeMut);
impl_downcast!(SendTaskTypeMut);
impl Cast<dyn DefinitionsType> for SendTask {}
impl Cast<dyn DefinitionsTypeMut> for SendTask {}
impl Cast<dyn ImportType> for SendTask {}
impl Cast<dyn ImportTypeMut> for SendTask {}
impl Cast<dyn ActivityType> for SendTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for SendTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for SendTask {}
impl Cast<dyn ArtifactType> for SendTask {}
impl Cast<dyn ArtifactTypeMut> for SendTask {}
impl Cast<dyn AssignmentType> for SendTask {}
impl Cast<dyn AssignmentTypeMut> for SendTask {}
impl Cast<dyn AssociationType> for SendTask {}
impl Cast<dyn AssociationTypeMut> for SendTask {}
impl Cast<dyn AuditingType> for SendTask {}
impl Cast<dyn AuditingTypeMut> for SendTask {}
impl Cast<dyn BaseElementType> for SendTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SendTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SendTask {}
impl Cast<dyn BoundaryEventType> for SendTask {}
impl Cast<dyn BoundaryEventTypeMut> for SendTask {}
impl Cast<dyn BusinessRuleTaskType> for SendTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SendTask {}
impl Cast<dyn CallableElementType> for SendTask {}
impl Cast<dyn CallableElementTypeMut> for SendTask {}
impl Cast<dyn CallActivityType> for SendTask {}
impl Cast<dyn CallActivityTypeMut> for SendTask {}
impl Cast<dyn CallChoreographyType> for SendTask {}
impl Cast<dyn CallChoreographyTypeMut> for SendTask {}
impl Cast<dyn CallConversationType> for SendTask {}
impl Cast<dyn CallConversationTypeMut> for SendTask {}
impl Cast<dyn CancelEventDefinitionType> for SendTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn CatchEventType> for SendTask {}
impl Cast<dyn CatchEventTypeMut> for SendTask {}
impl Cast<dyn CategoryType> for SendTask {}
impl Cast<dyn CategoryTypeMut> for SendTask {}
impl Cast<dyn CategoryValueType> for SendTask {}
impl Cast<dyn CategoryValueTypeMut> for SendTask {}
impl Cast<dyn ChoreographyType> for SendTask {}
impl Cast<dyn ChoreographyTypeMut> for SendTask {}
impl Cast<dyn ChoreographyActivityType> for SendTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for SendTask {}
impl Cast<dyn ChoreographyTaskType> for SendTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for SendTask {}
impl Cast<dyn CollaborationType> for SendTask {}
impl Cast<dyn CollaborationTypeMut> for SendTask {}
impl Cast<dyn CompensateEventDefinitionType> for SendTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SendTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SendTask {}
impl Cast<dyn ComplexGatewayType> for SendTask {}
impl Cast<dyn ComplexGatewayTypeMut> for SendTask {}
impl Cast<dyn ConditionalEventDefinitionType> for SendTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn ConversationType> for SendTask {}
impl Cast<dyn ConversationTypeMut> for SendTask {}
impl Cast<dyn ConversationAssociationType> for SendTask {}
impl Cast<dyn ConversationAssociationTypeMut> for SendTask {}
impl Cast<dyn ConversationLinkType> for SendTask {}
impl Cast<dyn ConversationLinkTypeMut> for SendTask {}
impl Cast<dyn ConversationNodeType> for SendTask {}
impl Cast<dyn ConversationNodeTypeMut> for SendTask {}
impl Cast<dyn CorrelationKeyType> for SendTask {}
impl Cast<dyn CorrelationKeyTypeMut> for SendTask {}
impl Cast<dyn CorrelationPropertyType> for SendTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for SendTask {}
impl Cast<dyn CorrelationPropertyBindingType> for SendTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SendTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SendTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SendTask {}
impl Cast<dyn CorrelationSubscriptionType> for SendTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SendTask {}
impl Cast<dyn DataAssociationType> for SendTask {}
impl Cast<dyn DataAssociationTypeMut> for SendTask {}
impl Cast<dyn DataInputType> for SendTask {}
impl Cast<dyn DataInputTypeMut> for SendTask {}
impl Cast<dyn DataInputAssociationType> for SendTask {}
impl Cast<dyn DataInputAssociationTypeMut> for SendTask {}
impl Cast<dyn DataObjectType> for SendTask {}
impl Cast<dyn DataObjectTypeMut> for SendTask {}
impl Cast<dyn DataObjectReferenceType> for SendTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for SendTask {}
impl Cast<dyn DataOutputType> for SendTask {}
impl Cast<dyn DataOutputTypeMut> for SendTask {}
impl Cast<dyn DataOutputAssociationType> for SendTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for SendTask {}
impl Cast<dyn DataStateType> for SendTask {}
impl Cast<dyn DataStateTypeMut> for SendTask {}
impl Cast<dyn DataStoreType> for SendTask {}
impl Cast<dyn DataStoreTypeMut> for SendTask {}
impl Cast<dyn DataStoreReferenceType> for SendTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for SendTask {}
impl Cast<dyn DocumentationType> for SendTask {}
impl Cast<dyn DocumentationTypeMut> for SendTask {}
impl Cast<dyn EndEventType> for SendTask {}
impl Cast<dyn EndEventTypeMut> for SendTask {}
impl Cast<dyn EndPointType> for SendTask {}
impl Cast<dyn EndPointTypeMut> for SendTask {}
impl Cast<dyn ErrorType> for SendTask {}
impl Cast<dyn ErrorTypeMut> for SendTask {}
impl Cast<dyn ErrorEventDefinitionType> for SendTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn EscalationType> for SendTask {}
impl Cast<dyn EscalationTypeMut> for SendTask {}
impl Cast<dyn EscalationEventDefinitionType> for SendTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn EventType> for SendTask {}
impl Cast<dyn EventTypeMut> for SendTask {}
impl Cast<dyn EventBasedGatewayType> for SendTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for SendTask {}
impl Cast<dyn EventDefinitionType> for SendTask {}
impl Cast<dyn EventDefinitionTypeMut> for SendTask {}
impl Cast<dyn ExclusiveGatewayType> for SendTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SendTask {}
impl Cast<dyn ExpressionType> for SendTask {}
impl Cast<dyn ExpressionTypeMut> for SendTask {}
impl Cast<dyn ExtensionType> for SendTask {}
impl Cast<dyn ExtensionTypeMut> for SendTask {}
impl Cast<dyn ExtensionElementsType> for SendTask {}
impl Cast<dyn ExtensionElementsTypeMut> for SendTask {}
impl Cast<dyn FlowElementType> for SendTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for SendTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for SendTask {}
impl Cast<dyn FormalExpressionTypeMut> for SendTask {}
impl Cast<dyn GatewayType> for SendTask {}
impl Cast<dyn GatewayTypeMut> for SendTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SendTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SendTask {}
impl Cast<dyn GlobalChoreographyTaskType> for SendTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SendTask {}
impl Cast<dyn GlobalConversationType> for SendTask {}
impl Cast<dyn GlobalConversationTypeMut> for SendTask {}
impl Cast<dyn GlobalManualTaskType> for SendTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for SendTask {}
impl Cast<dyn GlobalScriptTaskType> for SendTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SendTask {}
impl Cast<dyn GlobalTaskType> for SendTask {}
impl Cast<dyn GlobalTaskTypeMut> for SendTask {}
impl Cast<dyn GlobalUserTaskType> for SendTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for SendTask {}
impl Cast<dyn GroupType> for SendTask {}
impl Cast<dyn GroupTypeMut> for SendTask {}
impl Cast<dyn HumanPerformerType> for SendTask {}
impl Cast<dyn HumanPerformerTypeMut> for SendTask {}
impl Cast<dyn ImplicitThrowEventType> for SendTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SendTask {}
impl Cast<dyn InclusiveGatewayType> for SendTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for SendTask {}
impl Cast<dyn InputSetType> for SendTask {}
impl Cast<dyn InputSetTypeMut> for SendTask {}
impl Cast<dyn InterfaceType> for SendTask {}
impl Cast<dyn InterfaceTypeMut> for SendTask {}
impl Cast<dyn IntermediateCatchEventType> for SendTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SendTask {}
impl Cast<dyn IntermediateThrowEventType> for SendTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SendTask {}
impl Cast<dyn InputOutputBindingType> for SendTask {}
impl Cast<dyn InputOutputBindingTypeMut> for SendTask {}
impl Cast<dyn InputOutputSpecificationType> for SendTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SendTask {}
impl Cast<dyn ItemDefinitionType> for SendTask {}
impl Cast<dyn ItemDefinitionTypeMut> for SendTask {}
impl Cast<dyn LaneType> for SendTask {}
impl Cast<dyn LaneTypeMut> for SendTask {}
impl Cast<dyn LaneSetType> for SendTask {}
impl Cast<dyn LaneSetTypeMut> for SendTask {}
impl Cast<dyn LinkEventDefinitionType> for SendTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn LoopCharacteristicsType> for SendTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SendTask {}
impl Cast<dyn ManualTaskType> for SendTask {}
impl Cast<dyn ManualTaskTypeMut> for SendTask {}
impl Cast<dyn MessageType> for SendTask {}
impl Cast<dyn MessageTypeMut> for SendTask {}
impl Cast<dyn MessageEventDefinitionType> for SendTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn MessageFlowType> for SendTask {}
impl Cast<dyn MessageFlowTypeMut> for SendTask {}
impl Cast<dyn MessageFlowAssociationType> for SendTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SendTask {}
impl Cast<dyn MonitoringType> for SendTask {}
impl Cast<dyn MonitoringTypeMut> for SendTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SendTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SendTask {}
impl Cast<dyn OperationType> for SendTask {}
impl Cast<dyn OperationTypeMut> for SendTask {}
impl Cast<dyn OutputSetType> for SendTask {}
impl Cast<dyn OutputSetTypeMut> for SendTask {}
impl Cast<dyn ParallelGatewayType> for SendTask {}
impl Cast<dyn ParallelGatewayTypeMut> for SendTask {}
impl Cast<dyn ParticipantType> for SendTask {}
impl Cast<dyn ParticipantTypeMut> for SendTask {}
impl Cast<dyn ParticipantAssociationType> for SendTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for SendTask {}
impl Cast<dyn ParticipantMultiplicityType> for SendTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SendTask {}
impl Cast<dyn PartnerEntityType> for SendTask {}
impl Cast<dyn PartnerEntityTypeMut> for SendTask {}
impl Cast<dyn PartnerRoleType> for SendTask {}
impl Cast<dyn PartnerRoleTypeMut> for SendTask {}
impl Cast<dyn PerformerType> for SendTask {}
impl Cast<dyn PerformerTypeMut> for SendTask {}
impl Cast<dyn PotentialOwnerType> for SendTask {}
impl Cast<dyn PotentialOwnerTypeMut> for SendTask {}
impl Cast<dyn ProcessType> for SendTask {}
impl Cast<dyn ProcessTypeMut> for SendTask {}
impl Cast<dyn PropertyType> for SendTask {}
impl Cast<dyn PropertyTypeMut> for SendTask {}
impl Cast<dyn ReceiveTaskType> for SendTask {}
impl Cast<dyn ReceiveTaskTypeMut> for SendTask {}
impl Cast<dyn RelationshipType> for SendTask {}
impl Cast<dyn RelationshipTypeMut> for SendTask {}
impl Cast<dyn RenderingType> for SendTask {}
impl Cast<dyn RenderingTypeMut> for SendTask {}
impl Cast<dyn ResourceType> for SendTask {}
impl Cast<dyn ResourceTypeMut> for SendTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for SendTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SendTask {}
impl Cast<dyn ResourceParameterType> for SendTask {}
impl Cast<dyn ResourceParameterTypeMut> for SendTask {}
impl Cast<dyn ResourceParameterBindingType> for SendTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SendTask {}
impl Cast<dyn ResourceRoleType> for SendTask {}
impl Cast<dyn ResourceRoleTypeMut> for SendTask {}
impl Cast<dyn RootElementType> for SendTask {}
impl Cast<dyn RootElementTypeMut> for SendTask {}
impl Cast<dyn ScriptTaskType> for SendTask {}
impl Cast<dyn ScriptTaskTypeMut> for SendTask {}
impl Cast<dyn ScriptType> for SendTask {}
impl Cast<dyn ScriptTypeMut> for SendTask {}
impl Cast<dyn SendTaskType> for SendTask {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SendTaskTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SequenceFlowType> for SendTask {}
impl Cast<dyn SequenceFlowTypeMut> for SendTask {}
impl Cast<dyn ServiceTaskType> for SendTask {}
impl Cast<dyn ServiceTaskTypeMut> for SendTask {}
impl Cast<dyn SignalType> for SendTask {}
impl Cast<dyn SignalTypeMut> for SendTask {}
impl Cast<dyn SignalEventDefinitionType> for SendTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for SendTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SendTask {}
impl Cast<dyn StartEventType> for SendTask {}
impl Cast<dyn StartEventTypeMut> for SendTask {}
impl Cast<dyn SubChoreographyType> for SendTask {}
impl Cast<dyn SubChoreographyTypeMut> for SendTask {}
impl Cast<dyn SubConversationType> for SendTask {}
impl Cast<dyn SubConversationTypeMut> for SendTask {}
impl Cast<dyn SubProcessType> for SendTask {}
impl Cast<dyn SubProcessTypeMut> for SendTask {}
impl Cast<dyn TaskType> for SendTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for SendTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for SendTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn TextAnnotationType> for SendTask {}
impl Cast<dyn TextAnnotationTypeMut> for SendTask {}
impl Cast<dyn TextType> for SendTask {}
impl Cast<dyn TextTypeMut> for SendTask {}
impl Cast<dyn ThrowEventType> for SendTask {}
impl Cast<dyn ThrowEventTypeMut> for SendTask {}
impl Cast<dyn TimerEventDefinitionType> for SendTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SendTask {}
impl Cast<dyn TransactionType> for SendTask {}
impl Cast<dyn TransactionTypeMut> for SendTask {}
impl Cast<dyn UserTaskType> for SendTask {}
impl Cast<dyn UserTaskTypeMut> for SendTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:sequenceFlow")]
pub struct SequenceFlow {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(attr = "sourceRef")]
    #[tia("SequenceFlowType",rg*="source_ref","SequenceFlowTypeMut",s)]
    pub source_ref: String,
    #[xml(attr = "targetRef")]
    #[tia("SequenceFlowType",rg*="target_ref","SequenceFlowTypeMut",s)]
    pub target_ref: String,
    #[xml(attr = "isImmediate")]
    #[tia("SequenceFlowType",rg*="is_immediate","SequenceFlowTypeMut",s)]
    pub is_immediate: Option<bool>,
    #[xml(child = "bpmn:conditionExpression")]
    #[tia("SequenceFlowType",rg*="condition_expression","SequenceFlowTypeMut",s,rmg*="condition_expression_mut")]
    pub condition_expression: Option<SequenceFlowConditionExpression>,
}
impl DocumentElement for SequenceFlow {
    fn element(&self) -> Element {
        Element::SequenceFlow
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SequenceFlow {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition_expression.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.condition_expression.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `sequenceFlow`
pub trait SequenceFlowType: FlowElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `sourceRef`
    fn source_ref(&self) -> &String;
    /// Get value of attribute `targetRef`
    fn target_ref(&self) -> &String;
    /// Get value of attribute `isImmediate`
    fn is_immediate(&self) -> &Option<bool>;
    /// Get value of `conditionExpression` child
    fn condition_expression(&self) -> &Option<SequenceFlowConditionExpression>;
}
dyn_clone::clone_trait_object!(SequenceFlowType);
impl_downcast!(SequenceFlowType);
/// Mutable access to `sequenceFlow`
pub trait SequenceFlowTypeMut:
    FlowElementTypeMut + Downcast + Debug + Send + DynClone + SequenceFlowType
{
    /// Set value of attribute `sourceRef`
    fn set_source_ref(&mut self, value: String);
    /// Set value of attribute `targetRef`
    fn set_target_ref(&mut self, value: String);
    /// Set value of attribute `isImmediate`
    fn set_is_immediate(&mut self, value: Option<bool>);
    /// Get a mutable value of `conditionExpression` child
    fn condition_expression_mut(&mut self) -> &mut Option<SequenceFlowConditionExpression>;
    /// Set value of `conditionExpression` child
    fn set_condition_expression(&mut self, value: Option<SequenceFlowConditionExpression>);
}
dyn_clone::clone_trait_object!(SequenceFlowTypeMut);
impl_downcast!(SequenceFlowTypeMut);
impl Cast<dyn DefinitionsType> for SequenceFlow {}
impl Cast<dyn DefinitionsTypeMut> for SequenceFlow {}
impl Cast<dyn ImportType> for SequenceFlow {}
impl Cast<dyn ImportTypeMut> for SequenceFlow {}
impl Cast<dyn ActivityType> for SequenceFlow {}
impl Cast<dyn ActivityTypeMut> for SequenceFlow {}
impl Cast<dyn AdHocSubProcessType> for SequenceFlow {}
impl Cast<dyn AdHocSubProcessTypeMut> for SequenceFlow {}
impl Cast<dyn ArtifactType> for SequenceFlow {}
impl Cast<dyn ArtifactTypeMut> for SequenceFlow {}
impl Cast<dyn AssignmentType> for SequenceFlow {}
impl Cast<dyn AssignmentTypeMut> for SequenceFlow {}
impl Cast<dyn AssociationType> for SequenceFlow {}
impl Cast<dyn AssociationTypeMut> for SequenceFlow {}
impl Cast<dyn AuditingType> for SequenceFlow {}
impl Cast<dyn AuditingTypeMut> for SequenceFlow {}
impl Cast<dyn BaseElementType> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SequenceFlow {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SequenceFlow {}
impl Cast<dyn BoundaryEventType> for SequenceFlow {}
impl Cast<dyn BoundaryEventTypeMut> for SequenceFlow {}
impl Cast<dyn BusinessRuleTaskType> for SequenceFlow {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SequenceFlow {}
impl Cast<dyn CallableElementType> for SequenceFlow {}
impl Cast<dyn CallableElementTypeMut> for SequenceFlow {}
impl Cast<dyn CallActivityType> for SequenceFlow {}
impl Cast<dyn CallActivityTypeMut> for SequenceFlow {}
impl Cast<dyn CallChoreographyType> for SequenceFlow {}
impl Cast<dyn CallChoreographyTypeMut> for SequenceFlow {}
impl Cast<dyn CallConversationType> for SequenceFlow {}
impl Cast<dyn CallConversationTypeMut> for SequenceFlow {}
impl Cast<dyn CancelEventDefinitionType> for SequenceFlow {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn CatchEventType> for SequenceFlow {}
impl Cast<dyn CatchEventTypeMut> for SequenceFlow {}
impl Cast<dyn CategoryType> for SequenceFlow {}
impl Cast<dyn CategoryTypeMut> for SequenceFlow {}
impl Cast<dyn CategoryValueType> for SequenceFlow {}
impl Cast<dyn CategoryValueTypeMut> for SequenceFlow {}
impl Cast<dyn ChoreographyType> for SequenceFlow {}
impl Cast<dyn ChoreographyTypeMut> for SequenceFlow {}
impl Cast<dyn ChoreographyActivityType> for SequenceFlow {}
impl Cast<dyn ChoreographyActivityTypeMut> for SequenceFlow {}
impl Cast<dyn ChoreographyTaskType> for SequenceFlow {}
impl Cast<dyn ChoreographyTaskTypeMut> for SequenceFlow {}
impl Cast<dyn CollaborationType> for SequenceFlow {}
impl Cast<dyn CollaborationTypeMut> for SequenceFlow {}
impl Cast<dyn CompensateEventDefinitionType> for SequenceFlow {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SequenceFlow {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn ComplexGatewayType> for SequenceFlow {}
impl Cast<dyn ComplexGatewayTypeMut> for SequenceFlow {}
impl Cast<dyn ConditionalEventDefinitionType> for SequenceFlow {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn ConversationType> for SequenceFlow {}
impl Cast<dyn ConversationTypeMut> for SequenceFlow {}
impl Cast<dyn ConversationAssociationType> for SequenceFlow {}
impl Cast<dyn ConversationAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn ConversationLinkType> for SequenceFlow {}
impl Cast<dyn ConversationLinkTypeMut> for SequenceFlow {}
impl Cast<dyn ConversationNodeType> for SequenceFlow {}
impl Cast<dyn ConversationNodeTypeMut> for SequenceFlow {}
impl Cast<dyn CorrelationKeyType> for SequenceFlow {}
impl Cast<dyn CorrelationKeyTypeMut> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyType> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyTypeMut> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyBindingType> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SequenceFlow {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SequenceFlow {}
impl Cast<dyn CorrelationSubscriptionType> for SequenceFlow {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SequenceFlow {}
impl Cast<dyn DataAssociationType> for SequenceFlow {}
impl Cast<dyn DataAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn DataInputType> for SequenceFlow {}
impl Cast<dyn DataInputTypeMut> for SequenceFlow {}
impl Cast<dyn DataInputAssociationType> for SequenceFlow {}
impl Cast<dyn DataInputAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn DataObjectType> for SequenceFlow {}
impl Cast<dyn DataObjectTypeMut> for SequenceFlow {}
impl Cast<dyn DataObjectReferenceType> for SequenceFlow {}
impl Cast<dyn DataObjectReferenceTypeMut> for SequenceFlow {}
impl Cast<dyn DataOutputType> for SequenceFlow {}
impl Cast<dyn DataOutputTypeMut> for SequenceFlow {}
impl Cast<dyn DataOutputAssociationType> for SequenceFlow {}
impl Cast<dyn DataOutputAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn DataStateType> for SequenceFlow {}
impl Cast<dyn DataStateTypeMut> for SequenceFlow {}
impl Cast<dyn DataStoreType> for SequenceFlow {}
impl Cast<dyn DataStoreTypeMut> for SequenceFlow {}
impl Cast<dyn DataStoreReferenceType> for SequenceFlow {}
impl Cast<dyn DataStoreReferenceTypeMut> for SequenceFlow {}
impl Cast<dyn DocumentationType> for SequenceFlow {}
impl Cast<dyn DocumentationTypeMut> for SequenceFlow {}
impl Cast<dyn EndEventType> for SequenceFlow {}
impl Cast<dyn EndEventTypeMut> for SequenceFlow {}
impl Cast<dyn EndPointType> for SequenceFlow {}
impl Cast<dyn EndPointTypeMut> for SequenceFlow {}
impl Cast<dyn ErrorType> for SequenceFlow {}
impl Cast<dyn ErrorTypeMut> for SequenceFlow {}
impl Cast<dyn ErrorEventDefinitionType> for SequenceFlow {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn EscalationType> for SequenceFlow {}
impl Cast<dyn EscalationTypeMut> for SequenceFlow {}
impl Cast<dyn EscalationEventDefinitionType> for SequenceFlow {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn EventType> for SequenceFlow {}
impl Cast<dyn EventTypeMut> for SequenceFlow {}
impl Cast<dyn EventBasedGatewayType> for SequenceFlow {}
impl Cast<dyn EventBasedGatewayTypeMut> for SequenceFlow {}
impl Cast<dyn EventDefinitionType> for SequenceFlow {}
impl Cast<dyn EventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn ExclusiveGatewayType> for SequenceFlow {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SequenceFlow {}
impl Cast<dyn ExpressionType> for SequenceFlow {}
impl Cast<dyn ExpressionTypeMut> for SequenceFlow {}
impl Cast<dyn ExtensionType> for SequenceFlow {}
impl Cast<dyn ExtensionTypeMut> for SequenceFlow {}
impl Cast<dyn ExtensionElementsType> for SequenceFlow {}
impl Cast<dyn ExtensionElementsTypeMut> for SequenceFlow {}
impl Cast<dyn FlowElementType> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for SequenceFlow {}
impl Cast<dyn FlowNodeTypeMut> for SequenceFlow {}
impl Cast<dyn FormalExpressionType> for SequenceFlow {}
impl Cast<dyn FormalExpressionTypeMut> for SequenceFlow {}
impl Cast<dyn GatewayType> for SequenceFlow {}
impl Cast<dyn GatewayTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SequenceFlow {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalChoreographyTaskType> for SequenceFlow {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalConversationType> for SequenceFlow {}
impl Cast<dyn GlobalConversationTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalManualTaskType> for SequenceFlow {}
impl Cast<dyn GlobalManualTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalScriptTaskType> for SequenceFlow {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalTaskType> for SequenceFlow {}
impl Cast<dyn GlobalTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GlobalUserTaskType> for SequenceFlow {}
impl Cast<dyn GlobalUserTaskTypeMut> for SequenceFlow {}
impl Cast<dyn GroupType> for SequenceFlow {}
impl Cast<dyn GroupTypeMut> for SequenceFlow {}
impl Cast<dyn HumanPerformerType> for SequenceFlow {}
impl Cast<dyn HumanPerformerTypeMut> for SequenceFlow {}
impl Cast<dyn ImplicitThrowEventType> for SequenceFlow {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SequenceFlow {}
impl Cast<dyn InclusiveGatewayType> for SequenceFlow {}
impl Cast<dyn InclusiveGatewayTypeMut> for SequenceFlow {}
impl Cast<dyn InputSetType> for SequenceFlow {}
impl Cast<dyn InputSetTypeMut> for SequenceFlow {}
impl Cast<dyn InterfaceType> for SequenceFlow {}
impl Cast<dyn InterfaceTypeMut> for SequenceFlow {}
impl Cast<dyn IntermediateCatchEventType> for SequenceFlow {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SequenceFlow {}
impl Cast<dyn IntermediateThrowEventType> for SequenceFlow {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SequenceFlow {}
impl Cast<dyn InputOutputBindingType> for SequenceFlow {}
impl Cast<dyn InputOutputBindingTypeMut> for SequenceFlow {}
impl Cast<dyn InputOutputSpecificationType> for SequenceFlow {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SequenceFlow {}
impl Cast<dyn ItemDefinitionType> for SequenceFlow {}
impl Cast<dyn ItemDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn LaneType> for SequenceFlow {}
impl Cast<dyn LaneTypeMut> for SequenceFlow {}
impl Cast<dyn LaneSetType> for SequenceFlow {}
impl Cast<dyn LaneSetTypeMut> for SequenceFlow {}
impl Cast<dyn LinkEventDefinitionType> for SequenceFlow {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn LoopCharacteristicsType> for SequenceFlow {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SequenceFlow {}
impl Cast<dyn ManualTaskType> for SequenceFlow {}
impl Cast<dyn ManualTaskTypeMut> for SequenceFlow {}
impl Cast<dyn MessageType> for SequenceFlow {}
impl Cast<dyn MessageTypeMut> for SequenceFlow {}
impl Cast<dyn MessageEventDefinitionType> for SequenceFlow {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn MessageFlowType> for SequenceFlow {}
impl Cast<dyn MessageFlowTypeMut> for SequenceFlow {}
impl Cast<dyn MessageFlowAssociationType> for SequenceFlow {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn MonitoringType> for SequenceFlow {}
impl Cast<dyn MonitoringTypeMut> for SequenceFlow {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SequenceFlow {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SequenceFlow {}
impl Cast<dyn OperationType> for SequenceFlow {}
impl Cast<dyn OperationTypeMut> for SequenceFlow {}
impl Cast<dyn OutputSetType> for SequenceFlow {}
impl Cast<dyn OutputSetTypeMut> for SequenceFlow {}
impl Cast<dyn ParallelGatewayType> for SequenceFlow {}
impl Cast<dyn ParallelGatewayTypeMut> for SequenceFlow {}
impl Cast<dyn ParticipantType> for SequenceFlow {}
impl Cast<dyn ParticipantTypeMut> for SequenceFlow {}
impl Cast<dyn ParticipantAssociationType> for SequenceFlow {}
impl Cast<dyn ParticipantAssociationTypeMut> for SequenceFlow {}
impl Cast<dyn ParticipantMultiplicityType> for SequenceFlow {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SequenceFlow {}
impl Cast<dyn PartnerEntityType> for SequenceFlow {}
impl Cast<dyn PartnerEntityTypeMut> for SequenceFlow {}
impl Cast<dyn PartnerRoleType> for SequenceFlow {}
impl Cast<dyn PartnerRoleTypeMut> for SequenceFlow {}
impl Cast<dyn PerformerType> for SequenceFlow {}
impl Cast<dyn PerformerTypeMut> for SequenceFlow {}
impl Cast<dyn PotentialOwnerType> for SequenceFlow {}
impl Cast<dyn PotentialOwnerTypeMut> for SequenceFlow {}
impl Cast<dyn ProcessType> for SequenceFlow {}
impl Cast<dyn ProcessTypeMut> for SequenceFlow {}
impl Cast<dyn PropertyType> for SequenceFlow {}
impl Cast<dyn PropertyTypeMut> for SequenceFlow {}
impl Cast<dyn ReceiveTaskType> for SequenceFlow {}
impl Cast<dyn ReceiveTaskTypeMut> for SequenceFlow {}
impl Cast<dyn RelationshipType> for SequenceFlow {}
impl Cast<dyn RelationshipTypeMut> for SequenceFlow {}
impl Cast<dyn RenderingType> for SequenceFlow {}
impl Cast<dyn RenderingTypeMut> for SequenceFlow {}
impl Cast<dyn ResourceType> for SequenceFlow {}
impl Cast<dyn ResourceTypeMut> for SequenceFlow {}
impl Cast<dyn ResourceAssignmentExpressionType> for SequenceFlow {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SequenceFlow {}
impl Cast<dyn ResourceParameterType> for SequenceFlow {}
impl Cast<dyn ResourceParameterTypeMut> for SequenceFlow {}
impl Cast<dyn ResourceParameterBindingType> for SequenceFlow {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SequenceFlow {}
impl Cast<dyn ResourceRoleType> for SequenceFlow {}
impl Cast<dyn ResourceRoleTypeMut> for SequenceFlow {}
impl Cast<dyn RootElementType> for SequenceFlow {}
impl Cast<dyn RootElementTypeMut> for SequenceFlow {}
impl Cast<dyn ScriptTaskType> for SequenceFlow {}
impl Cast<dyn ScriptTaskTypeMut> for SequenceFlow {}
impl Cast<dyn ScriptType> for SequenceFlow {}
impl Cast<dyn ScriptTypeMut> for SequenceFlow {}
impl Cast<dyn SendTaskType> for SequenceFlow {}
impl Cast<dyn SendTaskTypeMut> for SequenceFlow {}
impl Cast<dyn SequenceFlowType> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SequenceFlowTypeMut> for SequenceFlow {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ServiceTaskType> for SequenceFlow {}
impl Cast<dyn ServiceTaskTypeMut> for SequenceFlow {}
impl Cast<dyn SignalType> for SequenceFlow {}
impl Cast<dyn SignalTypeMut> for SequenceFlow {}
impl Cast<dyn SignalEventDefinitionType> for SequenceFlow {}
impl Cast<dyn SignalEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn StandardLoopCharacteristicsType> for SequenceFlow {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SequenceFlow {}
impl Cast<dyn StartEventType> for SequenceFlow {}
impl Cast<dyn StartEventTypeMut> for SequenceFlow {}
impl Cast<dyn SubChoreographyType> for SequenceFlow {}
impl Cast<dyn SubChoreographyTypeMut> for SequenceFlow {}
impl Cast<dyn SubConversationType> for SequenceFlow {}
impl Cast<dyn SubConversationTypeMut> for SequenceFlow {}
impl Cast<dyn SubProcessType> for SequenceFlow {}
impl Cast<dyn SubProcessTypeMut> for SequenceFlow {}
impl Cast<dyn TaskType> for SequenceFlow {}
impl Cast<dyn TaskTypeMut> for SequenceFlow {}
impl Cast<dyn TerminateEventDefinitionType> for SequenceFlow {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn TextAnnotationType> for SequenceFlow {}
impl Cast<dyn TextAnnotationTypeMut> for SequenceFlow {}
impl Cast<dyn TextType> for SequenceFlow {}
impl Cast<dyn TextTypeMut> for SequenceFlow {}
impl Cast<dyn ThrowEventType> for SequenceFlow {}
impl Cast<dyn ThrowEventTypeMut> for SequenceFlow {}
impl Cast<dyn TimerEventDefinitionType> for SequenceFlow {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SequenceFlow {}
impl Cast<dyn TransactionType> for SequenceFlow {}
impl Cast<dyn TransactionTypeMut> for SequenceFlow {}
impl Cast<dyn UserTaskType> for SequenceFlow {}
impl Cast<dyn UserTaskTypeMut> for SequenceFlow {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:serviceTask")]
pub struct ServiceTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "implementation")]
    #[tia("ServiceTaskType",rg*="implementation","ServiceTaskTypeMut",s)]
    pub implementation: Option<String>,
    #[xml(attr = "operationRef")]
    #[tia("ServiceTaskType",rg*="operation_ref","ServiceTaskTypeMut",s)]
    pub operation_ref: Option<String>,
}
impl DocumentElement for ServiceTask {
    fn element(&self) -> Element {
        Element::ServiceTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for ServiceTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TaskType for ServiceTask {}
impl TaskTypeMut for ServiceTask {}
//

/// Access to `serviceTask`
pub trait ServiceTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
    /// Get value of attribute `operationRef`
    fn operation_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(ServiceTaskType);
impl_downcast!(ServiceTaskType);
/// Mutable access to `serviceTask`
pub trait ServiceTaskTypeMut:
    TaskTypeMut + Downcast + Debug + Send + DynClone + ServiceTaskType
{
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
    /// Set value of attribute `operationRef`
    fn set_operation_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(ServiceTaskTypeMut);
impl_downcast!(ServiceTaskTypeMut);
impl Cast<dyn DefinitionsType> for ServiceTask {}
impl Cast<dyn DefinitionsTypeMut> for ServiceTask {}
impl Cast<dyn ImportType> for ServiceTask {}
impl Cast<dyn ImportTypeMut> for ServiceTask {}
impl Cast<dyn ActivityType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for ServiceTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for ServiceTask {}
impl Cast<dyn ArtifactType> for ServiceTask {}
impl Cast<dyn ArtifactTypeMut> for ServiceTask {}
impl Cast<dyn AssignmentType> for ServiceTask {}
impl Cast<dyn AssignmentTypeMut> for ServiceTask {}
impl Cast<dyn AssociationType> for ServiceTask {}
impl Cast<dyn AssociationTypeMut> for ServiceTask {}
impl Cast<dyn AuditingType> for ServiceTask {}
impl Cast<dyn AuditingTypeMut> for ServiceTask {}
impl Cast<dyn BaseElementType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for ServiceTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ServiceTask {}
impl Cast<dyn BoundaryEventType> for ServiceTask {}
impl Cast<dyn BoundaryEventTypeMut> for ServiceTask {}
impl Cast<dyn BusinessRuleTaskType> for ServiceTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ServiceTask {}
impl Cast<dyn CallableElementType> for ServiceTask {}
impl Cast<dyn CallableElementTypeMut> for ServiceTask {}
impl Cast<dyn CallActivityType> for ServiceTask {}
impl Cast<dyn CallActivityTypeMut> for ServiceTask {}
impl Cast<dyn CallChoreographyType> for ServiceTask {}
impl Cast<dyn CallChoreographyTypeMut> for ServiceTask {}
impl Cast<dyn CallConversationType> for ServiceTask {}
impl Cast<dyn CallConversationTypeMut> for ServiceTask {}
impl Cast<dyn CancelEventDefinitionType> for ServiceTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn CatchEventType> for ServiceTask {}
impl Cast<dyn CatchEventTypeMut> for ServiceTask {}
impl Cast<dyn CategoryType> for ServiceTask {}
impl Cast<dyn CategoryTypeMut> for ServiceTask {}
impl Cast<dyn CategoryValueType> for ServiceTask {}
impl Cast<dyn CategoryValueTypeMut> for ServiceTask {}
impl Cast<dyn ChoreographyType> for ServiceTask {}
impl Cast<dyn ChoreographyTypeMut> for ServiceTask {}
impl Cast<dyn ChoreographyActivityType> for ServiceTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for ServiceTask {}
impl Cast<dyn ChoreographyTaskType> for ServiceTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for ServiceTask {}
impl Cast<dyn CollaborationType> for ServiceTask {}
impl Cast<dyn CollaborationTypeMut> for ServiceTask {}
impl Cast<dyn CompensateEventDefinitionType> for ServiceTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ServiceTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn ComplexGatewayType> for ServiceTask {}
impl Cast<dyn ComplexGatewayTypeMut> for ServiceTask {}
impl Cast<dyn ConditionalEventDefinitionType> for ServiceTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn ConversationType> for ServiceTask {}
impl Cast<dyn ConversationTypeMut> for ServiceTask {}
impl Cast<dyn ConversationAssociationType> for ServiceTask {}
impl Cast<dyn ConversationAssociationTypeMut> for ServiceTask {}
impl Cast<dyn ConversationLinkType> for ServiceTask {}
impl Cast<dyn ConversationLinkTypeMut> for ServiceTask {}
impl Cast<dyn ConversationNodeType> for ServiceTask {}
impl Cast<dyn ConversationNodeTypeMut> for ServiceTask {}
impl Cast<dyn CorrelationKeyType> for ServiceTask {}
impl Cast<dyn CorrelationKeyTypeMut> for ServiceTask {}
impl Cast<dyn CorrelationPropertyType> for ServiceTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for ServiceTask {}
impl Cast<dyn CorrelationPropertyBindingType> for ServiceTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ServiceTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ServiceTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ServiceTask {}
impl Cast<dyn CorrelationSubscriptionType> for ServiceTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ServiceTask {}
impl Cast<dyn DataAssociationType> for ServiceTask {}
impl Cast<dyn DataAssociationTypeMut> for ServiceTask {}
impl Cast<dyn DataInputType> for ServiceTask {}
impl Cast<dyn DataInputTypeMut> for ServiceTask {}
impl Cast<dyn DataInputAssociationType> for ServiceTask {}
impl Cast<dyn DataInputAssociationTypeMut> for ServiceTask {}
impl Cast<dyn DataObjectType> for ServiceTask {}
impl Cast<dyn DataObjectTypeMut> for ServiceTask {}
impl Cast<dyn DataObjectReferenceType> for ServiceTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for ServiceTask {}
impl Cast<dyn DataOutputType> for ServiceTask {}
impl Cast<dyn DataOutputTypeMut> for ServiceTask {}
impl Cast<dyn DataOutputAssociationType> for ServiceTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for ServiceTask {}
impl Cast<dyn DataStateType> for ServiceTask {}
impl Cast<dyn DataStateTypeMut> for ServiceTask {}
impl Cast<dyn DataStoreType> for ServiceTask {}
impl Cast<dyn DataStoreTypeMut> for ServiceTask {}
impl Cast<dyn DataStoreReferenceType> for ServiceTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for ServiceTask {}
impl Cast<dyn DocumentationType> for ServiceTask {}
impl Cast<dyn DocumentationTypeMut> for ServiceTask {}
impl Cast<dyn EndEventType> for ServiceTask {}
impl Cast<dyn EndEventTypeMut> for ServiceTask {}
impl Cast<dyn EndPointType> for ServiceTask {}
impl Cast<dyn EndPointTypeMut> for ServiceTask {}
impl Cast<dyn ErrorType> for ServiceTask {}
impl Cast<dyn ErrorTypeMut> for ServiceTask {}
impl Cast<dyn ErrorEventDefinitionType> for ServiceTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn EscalationType> for ServiceTask {}
impl Cast<dyn EscalationTypeMut> for ServiceTask {}
impl Cast<dyn EscalationEventDefinitionType> for ServiceTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn EventType> for ServiceTask {}
impl Cast<dyn EventTypeMut> for ServiceTask {}
impl Cast<dyn EventBasedGatewayType> for ServiceTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for ServiceTask {}
impl Cast<dyn EventDefinitionType> for ServiceTask {}
impl Cast<dyn EventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn ExclusiveGatewayType> for ServiceTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ServiceTask {}
impl Cast<dyn ExpressionType> for ServiceTask {}
impl Cast<dyn ExpressionTypeMut> for ServiceTask {}
impl Cast<dyn ExtensionType> for ServiceTask {}
impl Cast<dyn ExtensionTypeMut> for ServiceTask {}
impl Cast<dyn ExtensionElementsType> for ServiceTask {}
impl Cast<dyn ExtensionElementsTypeMut> for ServiceTask {}
impl Cast<dyn FlowElementType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for ServiceTask {}
impl Cast<dyn FormalExpressionTypeMut> for ServiceTask {}
impl Cast<dyn GatewayType> for ServiceTask {}
impl Cast<dyn GatewayTypeMut> for ServiceTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ServiceTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ServiceTask {}
impl Cast<dyn GlobalChoreographyTaskType> for ServiceTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ServiceTask {}
impl Cast<dyn GlobalConversationType> for ServiceTask {}
impl Cast<dyn GlobalConversationTypeMut> for ServiceTask {}
impl Cast<dyn GlobalManualTaskType> for ServiceTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for ServiceTask {}
impl Cast<dyn GlobalScriptTaskType> for ServiceTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ServiceTask {}
impl Cast<dyn GlobalTaskType> for ServiceTask {}
impl Cast<dyn GlobalTaskTypeMut> for ServiceTask {}
impl Cast<dyn GlobalUserTaskType> for ServiceTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for ServiceTask {}
impl Cast<dyn GroupType> for ServiceTask {}
impl Cast<dyn GroupTypeMut> for ServiceTask {}
impl Cast<dyn HumanPerformerType> for ServiceTask {}
impl Cast<dyn HumanPerformerTypeMut> for ServiceTask {}
impl Cast<dyn ImplicitThrowEventType> for ServiceTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ServiceTask {}
impl Cast<dyn InclusiveGatewayType> for ServiceTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for ServiceTask {}
impl Cast<dyn InputSetType> for ServiceTask {}
impl Cast<dyn InputSetTypeMut> for ServiceTask {}
impl Cast<dyn InterfaceType> for ServiceTask {}
impl Cast<dyn InterfaceTypeMut> for ServiceTask {}
impl Cast<dyn IntermediateCatchEventType> for ServiceTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ServiceTask {}
impl Cast<dyn IntermediateThrowEventType> for ServiceTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ServiceTask {}
impl Cast<dyn InputOutputBindingType> for ServiceTask {}
impl Cast<dyn InputOutputBindingTypeMut> for ServiceTask {}
impl Cast<dyn InputOutputSpecificationType> for ServiceTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ServiceTask {}
impl Cast<dyn ItemDefinitionType> for ServiceTask {}
impl Cast<dyn ItemDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn LaneType> for ServiceTask {}
impl Cast<dyn LaneTypeMut> for ServiceTask {}
impl Cast<dyn LaneSetType> for ServiceTask {}
impl Cast<dyn LaneSetTypeMut> for ServiceTask {}
impl Cast<dyn LinkEventDefinitionType> for ServiceTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn LoopCharacteristicsType> for ServiceTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ServiceTask {}
impl Cast<dyn ManualTaskType> for ServiceTask {}
impl Cast<dyn ManualTaskTypeMut> for ServiceTask {}
impl Cast<dyn MessageType> for ServiceTask {}
impl Cast<dyn MessageTypeMut> for ServiceTask {}
impl Cast<dyn MessageEventDefinitionType> for ServiceTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn MessageFlowType> for ServiceTask {}
impl Cast<dyn MessageFlowTypeMut> for ServiceTask {}
impl Cast<dyn MessageFlowAssociationType> for ServiceTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ServiceTask {}
impl Cast<dyn MonitoringType> for ServiceTask {}
impl Cast<dyn MonitoringTypeMut> for ServiceTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ServiceTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ServiceTask {}
impl Cast<dyn OperationType> for ServiceTask {}
impl Cast<dyn OperationTypeMut> for ServiceTask {}
impl Cast<dyn OutputSetType> for ServiceTask {}
impl Cast<dyn OutputSetTypeMut> for ServiceTask {}
impl Cast<dyn ParallelGatewayType> for ServiceTask {}
impl Cast<dyn ParallelGatewayTypeMut> for ServiceTask {}
impl Cast<dyn ParticipantType> for ServiceTask {}
impl Cast<dyn ParticipantTypeMut> for ServiceTask {}
impl Cast<dyn ParticipantAssociationType> for ServiceTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for ServiceTask {}
impl Cast<dyn ParticipantMultiplicityType> for ServiceTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ServiceTask {}
impl Cast<dyn PartnerEntityType> for ServiceTask {}
impl Cast<dyn PartnerEntityTypeMut> for ServiceTask {}
impl Cast<dyn PartnerRoleType> for ServiceTask {}
impl Cast<dyn PartnerRoleTypeMut> for ServiceTask {}
impl Cast<dyn PerformerType> for ServiceTask {}
impl Cast<dyn PerformerTypeMut> for ServiceTask {}
impl Cast<dyn PotentialOwnerType> for ServiceTask {}
impl Cast<dyn PotentialOwnerTypeMut> for ServiceTask {}
impl Cast<dyn ProcessType> for ServiceTask {}
impl Cast<dyn ProcessTypeMut> for ServiceTask {}
impl Cast<dyn PropertyType> for ServiceTask {}
impl Cast<dyn PropertyTypeMut> for ServiceTask {}
impl Cast<dyn ReceiveTaskType> for ServiceTask {}
impl Cast<dyn ReceiveTaskTypeMut> for ServiceTask {}
impl Cast<dyn RelationshipType> for ServiceTask {}
impl Cast<dyn RelationshipTypeMut> for ServiceTask {}
impl Cast<dyn RenderingType> for ServiceTask {}
impl Cast<dyn RenderingTypeMut> for ServiceTask {}
impl Cast<dyn ResourceType> for ServiceTask {}
impl Cast<dyn ResourceTypeMut> for ServiceTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for ServiceTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ServiceTask {}
impl Cast<dyn ResourceParameterType> for ServiceTask {}
impl Cast<dyn ResourceParameterTypeMut> for ServiceTask {}
impl Cast<dyn ResourceParameterBindingType> for ServiceTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ServiceTask {}
impl Cast<dyn ResourceRoleType> for ServiceTask {}
impl Cast<dyn ResourceRoleTypeMut> for ServiceTask {}
impl Cast<dyn RootElementType> for ServiceTask {}
impl Cast<dyn RootElementTypeMut> for ServiceTask {}
impl Cast<dyn ScriptTaskType> for ServiceTask {}
impl Cast<dyn ScriptTaskTypeMut> for ServiceTask {}
impl Cast<dyn ScriptType> for ServiceTask {}
impl Cast<dyn ScriptTypeMut> for ServiceTask {}
impl Cast<dyn SendTaskType> for ServiceTask {}
impl Cast<dyn SendTaskTypeMut> for ServiceTask {}
impl Cast<dyn SequenceFlowType> for ServiceTask {}
impl Cast<dyn SequenceFlowTypeMut> for ServiceTask {}
impl Cast<dyn ServiceTaskType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ServiceTaskTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SignalType> for ServiceTask {}
impl Cast<dyn SignalTypeMut> for ServiceTask {}
impl Cast<dyn SignalEventDefinitionType> for ServiceTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for ServiceTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ServiceTask {}
impl Cast<dyn StartEventType> for ServiceTask {}
impl Cast<dyn StartEventTypeMut> for ServiceTask {}
impl Cast<dyn SubChoreographyType> for ServiceTask {}
impl Cast<dyn SubChoreographyTypeMut> for ServiceTask {}
impl Cast<dyn SubConversationType> for ServiceTask {}
impl Cast<dyn SubConversationTypeMut> for ServiceTask {}
impl Cast<dyn SubProcessType> for ServiceTask {}
impl Cast<dyn SubProcessTypeMut> for ServiceTask {}
impl Cast<dyn TaskType> for ServiceTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for ServiceTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for ServiceTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn TextAnnotationType> for ServiceTask {}
impl Cast<dyn TextAnnotationTypeMut> for ServiceTask {}
impl Cast<dyn TextType> for ServiceTask {}
impl Cast<dyn TextTypeMut> for ServiceTask {}
impl Cast<dyn ThrowEventType> for ServiceTask {}
impl Cast<dyn ThrowEventTypeMut> for ServiceTask {}
impl Cast<dyn TimerEventDefinitionType> for ServiceTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ServiceTask {}
impl Cast<dyn TransactionType> for ServiceTask {}
impl Cast<dyn TransactionTypeMut> for ServiceTask {}
impl Cast<dyn UserTaskType> for ServiceTask {}
impl Cast<dyn UserTaskTypeMut> for ServiceTask {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:signal")]
pub struct Signal {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("SignalType",rg*="name","SignalTypeMut",s)]
    pub name: Option<String>,
    #[xml(attr = "structureRef")]
    #[tia("SignalType",rg*="structure_ref","SignalTypeMut",s)]
    pub structure_ref: Option<String>,
}
impl DocumentElement for Signal {
    fn element(&self) -> Element {
        Element::Signal
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Signal {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl RootElementType for Signal {}
impl RootElementTypeMut for Signal {}
//

/// Access to `signal`
pub trait SignalType: RootElementType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `name`
    fn name(&self) -> &Option<String>;
    /// Get value of attribute `structureRef`
    fn structure_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(SignalType);
impl_downcast!(SignalType);
/// Mutable access to `signal`
pub trait SignalTypeMut:
    RootElementTypeMut + Downcast + Debug + Send + DynClone + SignalType
{
    /// Set value of attribute `name`
    fn set_name(&mut self, value: Option<String>);
    /// Set value of attribute `structureRef`
    fn set_structure_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(SignalTypeMut);
impl_downcast!(SignalTypeMut);
impl Cast<dyn DefinitionsType> for Signal {}
impl Cast<dyn DefinitionsTypeMut> for Signal {}
impl Cast<dyn ImportType> for Signal {}
impl Cast<dyn ImportTypeMut> for Signal {}
impl Cast<dyn ActivityType> for Signal {}
impl Cast<dyn ActivityTypeMut> for Signal {}
impl Cast<dyn AdHocSubProcessType> for Signal {}
impl Cast<dyn AdHocSubProcessTypeMut> for Signal {}
impl Cast<dyn ArtifactType> for Signal {}
impl Cast<dyn ArtifactTypeMut> for Signal {}
impl Cast<dyn AssignmentType> for Signal {}
impl Cast<dyn AssignmentTypeMut> for Signal {}
impl Cast<dyn AssociationType> for Signal {}
impl Cast<dyn AssociationTypeMut> for Signal {}
impl Cast<dyn AuditingType> for Signal {}
impl Cast<dyn AuditingTypeMut> for Signal {}
impl Cast<dyn BaseElementType> for Signal {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Signal {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Signal {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Signal {}
impl Cast<dyn BoundaryEventType> for Signal {}
impl Cast<dyn BoundaryEventTypeMut> for Signal {}
impl Cast<dyn BusinessRuleTaskType> for Signal {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Signal {}
impl Cast<dyn CallableElementType> for Signal {}
impl Cast<dyn CallableElementTypeMut> for Signal {}
impl Cast<dyn CallActivityType> for Signal {}
impl Cast<dyn CallActivityTypeMut> for Signal {}
impl Cast<dyn CallChoreographyType> for Signal {}
impl Cast<dyn CallChoreographyTypeMut> for Signal {}
impl Cast<dyn CallConversationType> for Signal {}
impl Cast<dyn CallConversationTypeMut> for Signal {}
impl Cast<dyn CancelEventDefinitionType> for Signal {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Signal {}
impl Cast<dyn CatchEventType> for Signal {}
impl Cast<dyn CatchEventTypeMut> for Signal {}
impl Cast<dyn CategoryType> for Signal {}
impl Cast<dyn CategoryTypeMut> for Signal {}
impl Cast<dyn CategoryValueType> for Signal {}
impl Cast<dyn CategoryValueTypeMut> for Signal {}
impl Cast<dyn ChoreographyType> for Signal {}
impl Cast<dyn ChoreographyTypeMut> for Signal {}
impl Cast<dyn ChoreographyActivityType> for Signal {}
impl Cast<dyn ChoreographyActivityTypeMut> for Signal {}
impl Cast<dyn ChoreographyTaskType> for Signal {}
impl Cast<dyn ChoreographyTaskTypeMut> for Signal {}
impl Cast<dyn CollaborationType> for Signal {}
impl Cast<dyn CollaborationTypeMut> for Signal {}
impl Cast<dyn CompensateEventDefinitionType> for Signal {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Signal {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Signal {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Signal {}
impl Cast<dyn ComplexGatewayType> for Signal {}
impl Cast<dyn ComplexGatewayTypeMut> for Signal {}
impl Cast<dyn ConditionalEventDefinitionType> for Signal {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Signal {}
impl Cast<dyn ConversationType> for Signal {}
impl Cast<dyn ConversationTypeMut> for Signal {}
impl Cast<dyn ConversationAssociationType> for Signal {}
impl Cast<dyn ConversationAssociationTypeMut> for Signal {}
impl Cast<dyn ConversationLinkType> for Signal {}
impl Cast<dyn ConversationLinkTypeMut> for Signal {}
impl Cast<dyn ConversationNodeType> for Signal {}
impl Cast<dyn ConversationNodeTypeMut> for Signal {}
impl Cast<dyn CorrelationKeyType> for Signal {}
impl Cast<dyn CorrelationKeyTypeMut> for Signal {}
impl Cast<dyn CorrelationPropertyType> for Signal {}
impl Cast<dyn CorrelationPropertyTypeMut> for Signal {}
impl Cast<dyn CorrelationPropertyBindingType> for Signal {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Signal {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Signal {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Signal {}
impl Cast<dyn CorrelationSubscriptionType> for Signal {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Signal {}
impl Cast<dyn DataAssociationType> for Signal {}
impl Cast<dyn DataAssociationTypeMut> for Signal {}
impl Cast<dyn DataInputType> for Signal {}
impl Cast<dyn DataInputTypeMut> for Signal {}
impl Cast<dyn DataInputAssociationType> for Signal {}
impl Cast<dyn DataInputAssociationTypeMut> for Signal {}
impl Cast<dyn DataObjectType> for Signal {}
impl Cast<dyn DataObjectTypeMut> for Signal {}
impl Cast<dyn DataObjectReferenceType> for Signal {}
impl Cast<dyn DataObjectReferenceTypeMut> for Signal {}
impl Cast<dyn DataOutputType> for Signal {}
impl Cast<dyn DataOutputTypeMut> for Signal {}
impl Cast<dyn DataOutputAssociationType> for Signal {}
impl Cast<dyn DataOutputAssociationTypeMut> for Signal {}
impl Cast<dyn DataStateType> for Signal {}
impl Cast<dyn DataStateTypeMut> for Signal {}
impl Cast<dyn DataStoreType> for Signal {}
impl Cast<dyn DataStoreTypeMut> for Signal {}
impl Cast<dyn DataStoreReferenceType> for Signal {}
impl Cast<dyn DataStoreReferenceTypeMut> for Signal {}
impl Cast<dyn DocumentationType> for Signal {}
impl Cast<dyn DocumentationTypeMut> for Signal {}
impl Cast<dyn EndEventType> for Signal {}
impl Cast<dyn EndEventTypeMut> for Signal {}
impl Cast<dyn EndPointType> for Signal {}
impl Cast<dyn EndPointTypeMut> for Signal {}
impl Cast<dyn ErrorType> for Signal {}
impl Cast<dyn ErrorTypeMut> for Signal {}
impl Cast<dyn ErrorEventDefinitionType> for Signal {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Signal {}
impl Cast<dyn EscalationType> for Signal {}
impl Cast<dyn EscalationTypeMut> for Signal {}
impl Cast<dyn EscalationEventDefinitionType> for Signal {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Signal {}
impl Cast<dyn EventType> for Signal {}
impl Cast<dyn EventTypeMut> for Signal {}
impl Cast<dyn EventBasedGatewayType> for Signal {}
impl Cast<dyn EventBasedGatewayTypeMut> for Signal {}
impl Cast<dyn EventDefinitionType> for Signal {}
impl Cast<dyn EventDefinitionTypeMut> for Signal {}
impl Cast<dyn ExclusiveGatewayType> for Signal {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Signal {}
impl Cast<dyn ExpressionType> for Signal {}
impl Cast<dyn ExpressionTypeMut> for Signal {}
impl Cast<dyn ExtensionType> for Signal {}
impl Cast<dyn ExtensionTypeMut> for Signal {}
impl Cast<dyn ExtensionElementsType> for Signal {}
impl Cast<dyn ExtensionElementsTypeMut> for Signal {}
impl Cast<dyn FlowElementType> for Signal {}
impl Cast<dyn FlowElementTypeMut> for Signal {}
impl Cast<dyn FlowNodeType> for Signal {}
impl Cast<dyn FlowNodeTypeMut> for Signal {}
impl Cast<dyn FormalExpressionType> for Signal {}
impl Cast<dyn FormalExpressionTypeMut> for Signal {}
impl Cast<dyn GatewayType> for Signal {}
impl Cast<dyn GatewayTypeMut> for Signal {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Signal {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Signal {}
impl Cast<dyn GlobalChoreographyTaskType> for Signal {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Signal {}
impl Cast<dyn GlobalConversationType> for Signal {}
impl Cast<dyn GlobalConversationTypeMut> for Signal {}
impl Cast<dyn GlobalManualTaskType> for Signal {}
impl Cast<dyn GlobalManualTaskTypeMut> for Signal {}
impl Cast<dyn GlobalScriptTaskType> for Signal {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Signal {}
impl Cast<dyn GlobalTaskType> for Signal {}
impl Cast<dyn GlobalTaskTypeMut> for Signal {}
impl Cast<dyn GlobalUserTaskType> for Signal {}
impl Cast<dyn GlobalUserTaskTypeMut> for Signal {}
impl Cast<dyn GroupType> for Signal {}
impl Cast<dyn GroupTypeMut> for Signal {}
impl Cast<dyn HumanPerformerType> for Signal {}
impl Cast<dyn HumanPerformerTypeMut> for Signal {}
impl Cast<dyn ImplicitThrowEventType> for Signal {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Signal {}
impl Cast<dyn InclusiveGatewayType> for Signal {}
impl Cast<dyn InclusiveGatewayTypeMut> for Signal {}
impl Cast<dyn InputSetType> for Signal {}
impl Cast<dyn InputSetTypeMut> for Signal {}
impl Cast<dyn InterfaceType> for Signal {}
impl Cast<dyn InterfaceTypeMut> for Signal {}
impl Cast<dyn IntermediateCatchEventType> for Signal {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Signal {}
impl Cast<dyn IntermediateThrowEventType> for Signal {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Signal {}
impl Cast<dyn InputOutputBindingType> for Signal {}
impl Cast<dyn InputOutputBindingTypeMut> for Signal {}
impl Cast<dyn InputOutputSpecificationType> for Signal {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Signal {}
impl Cast<dyn ItemDefinitionType> for Signal {}
impl Cast<dyn ItemDefinitionTypeMut> for Signal {}
impl Cast<dyn LaneType> for Signal {}
impl Cast<dyn LaneTypeMut> for Signal {}
impl Cast<dyn LaneSetType> for Signal {}
impl Cast<dyn LaneSetTypeMut> for Signal {}
impl Cast<dyn LinkEventDefinitionType> for Signal {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Signal {}
impl Cast<dyn LoopCharacteristicsType> for Signal {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Signal {}
impl Cast<dyn ManualTaskType> for Signal {}
impl Cast<dyn ManualTaskTypeMut> for Signal {}
impl Cast<dyn MessageType> for Signal {}
impl Cast<dyn MessageTypeMut> for Signal {}
impl Cast<dyn MessageEventDefinitionType> for Signal {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Signal {}
impl Cast<dyn MessageFlowType> for Signal {}
impl Cast<dyn MessageFlowTypeMut> for Signal {}
impl Cast<dyn MessageFlowAssociationType> for Signal {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Signal {}
impl Cast<dyn MonitoringType> for Signal {}
impl Cast<dyn MonitoringTypeMut> for Signal {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Signal {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Signal {}
impl Cast<dyn OperationType> for Signal {}
impl Cast<dyn OperationTypeMut> for Signal {}
impl Cast<dyn OutputSetType> for Signal {}
impl Cast<dyn OutputSetTypeMut> for Signal {}
impl Cast<dyn ParallelGatewayType> for Signal {}
impl Cast<dyn ParallelGatewayTypeMut> for Signal {}
impl Cast<dyn ParticipantType> for Signal {}
impl Cast<dyn ParticipantTypeMut> for Signal {}
impl Cast<dyn ParticipantAssociationType> for Signal {}
impl Cast<dyn ParticipantAssociationTypeMut> for Signal {}
impl Cast<dyn ParticipantMultiplicityType> for Signal {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Signal {}
impl Cast<dyn PartnerEntityType> for Signal {}
impl Cast<dyn PartnerEntityTypeMut> for Signal {}
impl Cast<dyn PartnerRoleType> for Signal {}
impl Cast<dyn PartnerRoleTypeMut> for Signal {}
impl Cast<dyn PerformerType> for Signal {}
impl Cast<dyn PerformerTypeMut> for Signal {}
impl Cast<dyn PotentialOwnerType> for Signal {}
impl Cast<dyn PotentialOwnerTypeMut> for Signal {}
impl Cast<dyn ProcessType> for Signal {}
impl Cast<dyn ProcessTypeMut> for Signal {}
impl Cast<dyn PropertyType> for Signal {}
impl Cast<dyn PropertyTypeMut> for Signal {}
impl Cast<dyn ReceiveTaskType> for Signal {}
impl Cast<dyn ReceiveTaskTypeMut> for Signal {}
impl Cast<dyn RelationshipType> for Signal {}
impl Cast<dyn RelationshipTypeMut> for Signal {}
impl Cast<dyn RenderingType> for Signal {}
impl Cast<dyn RenderingTypeMut> for Signal {}
impl Cast<dyn ResourceType> for Signal {}
impl Cast<dyn ResourceTypeMut> for Signal {}
impl Cast<dyn ResourceAssignmentExpressionType> for Signal {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Signal {}
impl Cast<dyn ResourceParameterType> for Signal {}
impl Cast<dyn ResourceParameterTypeMut> for Signal {}
impl Cast<dyn ResourceParameterBindingType> for Signal {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Signal {}
impl Cast<dyn ResourceRoleType> for Signal {}
impl Cast<dyn ResourceRoleTypeMut> for Signal {}
impl Cast<dyn RootElementType> for Signal {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for Signal {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for Signal {}
impl Cast<dyn ScriptTaskTypeMut> for Signal {}
impl Cast<dyn ScriptType> for Signal {}
impl Cast<dyn ScriptTypeMut> for Signal {}
impl Cast<dyn SendTaskType> for Signal {}
impl Cast<dyn SendTaskTypeMut> for Signal {}
impl Cast<dyn SequenceFlowType> for Signal {}
impl Cast<dyn SequenceFlowTypeMut> for Signal {}
impl Cast<dyn ServiceTaskType> for Signal {}
impl Cast<dyn ServiceTaskTypeMut> for Signal {}
impl Cast<dyn SignalType> for Signal {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SignalTypeMut> for Signal {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SignalEventDefinitionType> for Signal {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Signal {}
impl Cast<dyn StandardLoopCharacteristicsType> for Signal {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Signal {}
impl Cast<dyn StartEventType> for Signal {}
impl Cast<dyn StartEventTypeMut> for Signal {}
impl Cast<dyn SubChoreographyType> for Signal {}
impl Cast<dyn SubChoreographyTypeMut> for Signal {}
impl Cast<dyn SubConversationType> for Signal {}
impl Cast<dyn SubConversationTypeMut> for Signal {}
impl Cast<dyn SubProcessType> for Signal {}
impl Cast<dyn SubProcessTypeMut> for Signal {}
impl Cast<dyn TaskType> for Signal {}
impl Cast<dyn TaskTypeMut> for Signal {}
impl Cast<dyn TerminateEventDefinitionType> for Signal {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Signal {}
impl Cast<dyn TextAnnotationType> for Signal {}
impl Cast<dyn TextAnnotationTypeMut> for Signal {}
impl Cast<dyn TextType> for Signal {}
impl Cast<dyn TextTypeMut> for Signal {}
impl Cast<dyn ThrowEventType> for Signal {}
impl Cast<dyn ThrowEventTypeMut> for Signal {}
impl Cast<dyn TimerEventDefinitionType> for Signal {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Signal {}
impl Cast<dyn TransactionType> for Signal {}
impl Cast<dyn TransactionTypeMut> for Signal {}
impl Cast<dyn UserTaskType> for Signal {}
impl Cast<dyn UserTaskTypeMut> for Signal {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:signalEventDefinition")]
pub struct SignalEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "signalRef")]
    #[tia("SignalEventDefinitionType",rg*="signal_ref","SignalEventDefinitionTypeMut",s)]
    pub signal_ref: Option<String>,
}
impl DocumentElement for SignalEventDefinition {
    fn element(&self) -> Element {
        Element::SignalEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SignalEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl EventDefinitionType for SignalEventDefinition {}
impl EventDefinitionTypeMut for SignalEventDefinition {}
impl RootElementType for SignalEventDefinition {}
impl RootElementTypeMut for SignalEventDefinition {}
//

/// Access to `signalEventDefinition`
pub trait SignalEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `signalRef`
    fn signal_ref(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(SignalEventDefinitionType);
impl_downcast!(SignalEventDefinitionType);
/// Mutable access to `signalEventDefinition`
pub trait SignalEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + SignalEventDefinitionType
{
    /// Set value of attribute `signalRef`
    fn set_signal_ref(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(SignalEventDefinitionTypeMut);
impl_downcast!(SignalEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for SignalEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for SignalEventDefinition {}
impl Cast<dyn ImportType> for SignalEventDefinition {}
impl Cast<dyn ImportTypeMut> for SignalEventDefinition {}
impl Cast<dyn ActivityType> for SignalEventDefinition {}
impl Cast<dyn ActivityTypeMut> for SignalEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for SignalEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for SignalEventDefinition {}
impl Cast<dyn ArtifactType> for SignalEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for SignalEventDefinition {}
impl Cast<dyn AssignmentType> for SignalEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for SignalEventDefinition {}
impl Cast<dyn AssociationType> for SignalEventDefinition {}
impl Cast<dyn AssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn AuditingType> for SignalEventDefinition {}
impl Cast<dyn AuditingTypeMut> for SignalEventDefinition {}
impl Cast<dyn BaseElementType> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SignalEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SignalEventDefinition {}
impl Cast<dyn BoundaryEventType> for SignalEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for SignalEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn CallableElementType> for SignalEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for SignalEventDefinition {}
impl Cast<dyn CallActivityType> for SignalEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for SignalEventDefinition {}
impl Cast<dyn CallChoreographyType> for SignalEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for SignalEventDefinition {}
impl Cast<dyn CallConversationType> for SignalEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for SignalEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn CatchEventType> for SignalEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn CategoryType> for SignalEventDefinition {}
impl Cast<dyn CategoryTypeMut> for SignalEventDefinition {}
impl Cast<dyn CategoryValueType> for SignalEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for SignalEventDefinition {}
impl Cast<dyn ChoreographyType> for SignalEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for SignalEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for SignalEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for SignalEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for SignalEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn CollaborationType> for SignalEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for SignalEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SignalEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ComplexGatewayType> for SignalEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ConversationType> for SignalEventDefinition {}
impl Cast<dyn ConversationTypeMut> for SignalEventDefinition {}
impl Cast<dyn ConversationAssociationType> for SignalEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn ConversationLinkType> for SignalEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for SignalEventDefinition {}
impl Cast<dyn ConversationNodeType> for SignalEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for SignalEventDefinition {}
impl Cast<dyn CorrelationKeyType> for SignalEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SignalEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SignalEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for SignalEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataAssociationType> for SignalEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataInputType> for SignalEventDefinition {}
impl Cast<dyn DataInputTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataInputAssociationType> for SignalEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataObjectType> for SignalEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for SignalEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataOutputType> for SignalEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for SignalEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataStateType> for SignalEventDefinition {}
impl Cast<dyn DataStateTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataStoreType> for SignalEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for SignalEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for SignalEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for SignalEventDefinition {}
impl Cast<dyn DocumentationType> for SignalEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for SignalEventDefinition {}
impl Cast<dyn EndEventType> for SignalEventDefinition {}
impl Cast<dyn EndEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn EndPointType> for SignalEventDefinition {}
impl Cast<dyn EndPointTypeMut> for SignalEventDefinition {}
impl Cast<dyn ErrorType> for SignalEventDefinition {}
impl Cast<dyn ErrorTypeMut> for SignalEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn EscalationType> for SignalEventDefinition {}
impl Cast<dyn EscalationTypeMut> for SignalEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn EventType> for SignalEventDefinition {}
impl Cast<dyn EventTypeMut> for SignalEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for SignalEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn EventDefinitionType> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for SignalEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn ExpressionType> for SignalEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ExtensionType> for SignalEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ExtensionElementsType> for SignalEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for SignalEventDefinition {}
impl Cast<dyn FlowElementType> for SignalEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for SignalEventDefinition {}
impl Cast<dyn FlowNodeType> for SignalEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for SignalEventDefinition {}
impl Cast<dyn FormalExpressionType> for SignalEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for SignalEventDefinition {}
impl Cast<dyn GatewayType> for SignalEventDefinition {}
impl Cast<dyn GatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalConversationType> for SignalEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for SignalEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn GroupType> for SignalEventDefinition {}
impl Cast<dyn GroupTypeMut> for SignalEventDefinition {}
impl Cast<dyn HumanPerformerType> for SignalEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for SignalEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for SignalEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for SignalEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn InputSetType> for SignalEventDefinition {}
impl Cast<dyn InputSetTypeMut> for SignalEventDefinition {}
impl Cast<dyn InterfaceType> for SignalEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for SignalEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for SignalEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for SignalEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn InputOutputBindingType> for SignalEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for SignalEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for SignalEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SignalEventDefinition {}
impl Cast<dyn ItemDefinitionType> for SignalEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn LaneType> for SignalEventDefinition {}
impl Cast<dyn LaneTypeMut> for SignalEventDefinition {}
impl Cast<dyn LaneSetType> for SignalEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for SignalEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for SignalEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SignalEventDefinition {}
impl Cast<dyn ManualTaskType> for SignalEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn MessageType> for SignalEventDefinition {}
impl Cast<dyn MessageTypeMut> for SignalEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn MessageFlowType> for SignalEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for SignalEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for SignalEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn MonitoringType> for SignalEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for SignalEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SignalEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SignalEventDefinition {}
impl Cast<dyn OperationType> for SignalEventDefinition {}
impl Cast<dyn OperationTypeMut> for SignalEventDefinition {}
impl Cast<dyn OutputSetType> for SignalEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for SignalEventDefinition {}
impl Cast<dyn ParallelGatewayType> for SignalEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for SignalEventDefinition {}
impl Cast<dyn ParticipantType> for SignalEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for SignalEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for SignalEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for SignalEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for SignalEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SignalEventDefinition {}
impl Cast<dyn PartnerEntityType> for SignalEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for SignalEventDefinition {}
impl Cast<dyn PartnerRoleType> for SignalEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for SignalEventDefinition {}
impl Cast<dyn PerformerType> for SignalEventDefinition {}
impl Cast<dyn PerformerTypeMut> for SignalEventDefinition {}
impl Cast<dyn PotentialOwnerType> for SignalEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for SignalEventDefinition {}
impl Cast<dyn ProcessType> for SignalEventDefinition {}
impl Cast<dyn ProcessTypeMut> for SignalEventDefinition {}
impl Cast<dyn PropertyType> for SignalEventDefinition {}
impl Cast<dyn PropertyTypeMut> for SignalEventDefinition {}
impl Cast<dyn ReceiveTaskType> for SignalEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn RelationshipType> for SignalEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for SignalEventDefinition {}
impl Cast<dyn RenderingType> for SignalEventDefinition {}
impl Cast<dyn RenderingTypeMut> for SignalEventDefinition {}
impl Cast<dyn ResourceType> for SignalEventDefinition {}
impl Cast<dyn ResourceTypeMut> for SignalEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for SignalEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SignalEventDefinition {}
impl Cast<dyn ResourceParameterType> for SignalEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for SignalEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for SignalEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SignalEventDefinition {}
impl Cast<dyn ResourceRoleType> for SignalEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for SignalEventDefinition {}
impl Cast<dyn RootElementType> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for SignalEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn ScriptType> for SignalEventDefinition {}
impl Cast<dyn ScriptTypeMut> for SignalEventDefinition {}
impl Cast<dyn SendTaskType> for SignalEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn SequenceFlowType> for SignalEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for SignalEventDefinition {}
impl Cast<dyn ServiceTaskType> for SignalEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn SignalType> for SignalEventDefinition {}
impl Cast<dyn SignalTypeMut> for SignalEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for SignalEventDefinition {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for SignalEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SignalEventDefinition {}
impl Cast<dyn StartEventType> for SignalEventDefinition {}
impl Cast<dyn StartEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn SubChoreographyType> for SignalEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for SignalEventDefinition {}
impl Cast<dyn SubConversationType> for SignalEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for SignalEventDefinition {}
impl Cast<dyn SubProcessType> for SignalEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for SignalEventDefinition {}
impl Cast<dyn TaskType> for SignalEventDefinition {}
impl Cast<dyn TaskTypeMut> for SignalEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn TextAnnotationType> for SignalEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for SignalEventDefinition {}
impl Cast<dyn TextType> for SignalEventDefinition {}
impl Cast<dyn TextTypeMut> for SignalEventDefinition {}
impl Cast<dyn ThrowEventType> for SignalEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for SignalEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for SignalEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SignalEventDefinition {}
impl Cast<dyn TransactionType> for SignalEventDefinition {}
impl Cast<dyn TransactionTypeMut> for SignalEventDefinition {}
impl Cast<dyn UserTaskType> for SignalEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for SignalEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:standardLoopCharacteristics")]
pub struct StandardLoopCharacteristics {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "testBefore")]
    #[tia("StandardLoopCharacteristicsType",rg*="test_before","StandardLoopCharacteristicsTypeMut",s)]
    pub test_before: Option<bool>,
    #[xml(attr = "loopMaximum")]
    #[tia("StandardLoopCharacteristicsType",rg*="loop_maximum","StandardLoopCharacteristicsTypeMut",s)]
    pub loop_maximum: Option<Integer>,
    #[xml(child = "bpmn:loopCondition")]
    #[tia("StandardLoopCharacteristicsType",rg*="loop_condition","StandardLoopCharacteristicsTypeMut",s,rmg*="loop_condition_mut")]
    pub loop_condition: Option<StandardLoopCharacteristicsLoopCondition>,
}
impl DocumentElement for StandardLoopCharacteristics {
    fn element(&self) -> Element {
        Element::StandardLoopCharacteristics
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for StandardLoopCharacteristics {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.loop_condition.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.loop_condition.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl LoopCharacteristicsType for StandardLoopCharacteristics {}
impl LoopCharacteristicsTypeMut for StandardLoopCharacteristics {}
//

/// Access to `standardLoopCharacteristics`
pub trait StandardLoopCharacteristicsType:
    LoopCharacteristicsType + Downcast + Debug + Send + DynClone
{
    /// Get value of attribute `testBefore`
    fn test_before(&self) -> &Option<bool>;
    /// Get value of attribute `loopMaximum`
    fn loop_maximum(&self) -> &Option<Integer>;
    /// Get value of `loopCondition` child
    fn loop_condition(&self) -> &Option<StandardLoopCharacteristicsLoopCondition>;
}
dyn_clone::clone_trait_object!(StandardLoopCharacteristicsType);
impl_downcast!(StandardLoopCharacteristicsType);
/// Mutable access to `standardLoopCharacteristics`
pub trait StandardLoopCharacteristicsTypeMut:
    LoopCharacteristicsTypeMut + Downcast + Debug + Send + DynClone + StandardLoopCharacteristicsType
{
    /// Set value of attribute `testBefore`
    fn set_test_before(&mut self, value: Option<bool>);
    /// Set value of attribute `loopMaximum`
    fn set_loop_maximum(&mut self, value: Option<Integer>);
    /// Get a mutable value of `loopCondition` child
    fn loop_condition_mut(&mut self) -> &mut Option<StandardLoopCharacteristicsLoopCondition>;
    /// Set value of `loopCondition` child
    fn set_loop_condition(&mut self, value: Option<StandardLoopCharacteristicsLoopCondition>);
}
dyn_clone::clone_trait_object!(StandardLoopCharacteristicsTypeMut);
impl_downcast!(StandardLoopCharacteristicsTypeMut);
impl Cast<dyn DefinitionsType> for StandardLoopCharacteristics {}
impl Cast<dyn DefinitionsTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ImportType> for StandardLoopCharacteristics {}
impl Cast<dyn ImportTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ActivityType> for StandardLoopCharacteristics {}
impl Cast<dyn ActivityTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn AdHocSubProcessType> for StandardLoopCharacteristics {}
impl Cast<dyn AdHocSubProcessTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ArtifactType> for StandardLoopCharacteristics {}
impl Cast<dyn ArtifactTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn AssignmentType> for StandardLoopCharacteristics {}
impl Cast<dyn AssignmentTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn AssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn AssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn AuditingType> for StandardLoopCharacteristics {}
impl Cast<dyn AuditingTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn BaseElementType> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for StandardLoopCharacteristics {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn BoundaryEventType> for StandardLoopCharacteristics {}
impl Cast<dyn BoundaryEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn BusinessRuleTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn BusinessRuleTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CallableElementType> for StandardLoopCharacteristics {}
impl Cast<dyn CallableElementTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CallActivityType> for StandardLoopCharacteristics {}
impl Cast<dyn CallActivityTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CallChoreographyType> for StandardLoopCharacteristics {}
impl Cast<dyn CallChoreographyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CallConversationType> for StandardLoopCharacteristics {}
impl Cast<dyn CallConversationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CancelEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn CancelEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CatchEventType> for StandardLoopCharacteristics {}
impl Cast<dyn CatchEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CategoryType> for StandardLoopCharacteristics {}
impl Cast<dyn CategoryTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CategoryValueType> for StandardLoopCharacteristics {}
impl Cast<dyn CategoryValueTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyType> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyActivityType> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyActivityTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn ChoreographyTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CollaborationType> for StandardLoopCharacteristics {}
impl Cast<dyn CollaborationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CompensateEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ComplexBehaviorDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ComplexGatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn ComplexGatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ConditionalEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationType> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationLinkType> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationLinkTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationNodeType> for StandardLoopCharacteristics {}
impl Cast<dyn ConversationNodeTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationKeyType> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationKeyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyType> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyBindingType> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationSubscriptionType> for StandardLoopCharacteristics {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn DataAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataInputType> for StandardLoopCharacteristics {}
impl Cast<dyn DataInputTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataInputAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn DataInputAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataObjectType> for StandardLoopCharacteristics {}
impl Cast<dyn DataObjectTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataObjectReferenceType> for StandardLoopCharacteristics {}
impl Cast<dyn DataObjectReferenceTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataOutputType> for StandardLoopCharacteristics {}
impl Cast<dyn DataOutputTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataOutputAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn DataOutputAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataStateType> for StandardLoopCharacteristics {}
impl Cast<dyn DataStateTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataStoreType> for StandardLoopCharacteristics {}
impl Cast<dyn DataStoreTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DataStoreReferenceType> for StandardLoopCharacteristics {}
impl Cast<dyn DataStoreReferenceTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn DocumentationType> for StandardLoopCharacteristics {}
impl Cast<dyn DocumentationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EndEventType> for StandardLoopCharacteristics {}
impl Cast<dyn EndEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EndPointType> for StandardLoopCharacteristics {}
impl Cast<dyn EndPointTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ErrorType> for StandardLoopCharacteristics {}
impl Cast<dyn ErrorTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ErrorEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EscalationType> for StandardLoopCharacteristics {}
impl Cast<dyn EscalationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EscalationEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EventType> for StandardLoopCharacteristics {}
impl Cast<dyn EventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EventBasedGatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn EventBasedGatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn EventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn EventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ExclusiveGatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn ExclusiveGatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ExpressionType> for StandardLoopCharacteristics {}
impl Cast<dyn ExpressionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ExtensionType> for StandardLoopCharacteristics {}
impl Cast<dyn ExtensionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ExtensionElementsType> for StandardLoopCharacteristics {}
impl Cast<dyn ExtensionElementsTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn FlowElementType> for StandardLoopCharacteristics {}
impl Cast<dyn FlowElementTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn FlowNodeType> for StandardLoopCharacteristics {}
impl Cast<dyn FlowNodeTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn FormalExpressionType> for StandardLoopCharacteristics {}
impl Cast<dyn FormalExpressionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn GatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalBusinessRuleTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalChoreographyTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalConversationType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalConversationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalManualTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalManualTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalScriptTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalScriptTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalUserTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn GlobalUserTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn GroupType> for StandardLoopCharacteristics {}
impl Cast<dyn GroupTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn HumanPerformerType> for StandardLoopCharacteristics {}
impl Cast<dyn HumanPerformerTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ImplicitThrowEventType> for StandardLoopCharacteristics {}
impl Cast<dyn ImplicitThrowEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn InclusiveGatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn InclusiveGatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn InputSetType> for StandardLoopCharacteristics {}
impl Cast<dyn InputSetTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn InterfaceType> for StandardLoopCharacteristics {}
impl Cast<dyn InterfaceTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn IntermediateCatchEventType> for StandardLoopCharacteristics {}
impl Cast<dyn IntermediateCatchEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn IntermediateThrowEventType> for StandardLoopCharacteristics {}
impl Cast<dyn IntermediateThrowEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn InputOutputBindingType> for StandardLoopCharacteristics {}
impl Cast<dyn InputOutputBindingTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn InputOutputSpecificationType> for StandardLoopCharacteristics {}
impl Cast<dyn InputOutputSpecificationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ItemDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn ItemDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn LaneType> for StandardLoopCharacteristics {}
impl Cast<dyn LaneTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn LaneSetType> for StandardLoopCharacteristics {}
impl Cast<dyn LaneSetTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn LinkEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn LinkEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn LoopCharacteristicsType> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ManualTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn ManualTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MessageType> for StandardLoopCharacteristics {}
impl Cast<dyn MessageTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MessageEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn MessageEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MessageFlowType> for StandardLoopCharacteristics {}
impl Cast<dyn MessageFlowTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MessageFlowAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn MessageFlowAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MonitoringType> for StandardLoopCharacteristics {}
impl Cast<dyn MonitoringTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for StandardLoopCharacteristics {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn OperationType> for StandardLoopCharacteristics {}
impl Cast<dyn OperationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn OutputSetType> for StandardLoopCharacteristics {}
impl Cast<dyn OutputSetTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ParallelGatewayType> for StandardLoopCharacteristics {}
impl Cast<dyn ParallelGatewayTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantType> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantAssociationType> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantAssociationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantMultiplicityType> for StandardLoopCharacteristics {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn PartnerEntityType> for StandardLoopCharacteristics {}
impl Cast<dyn PartnerEntityTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn PartnerRoleType> for StandardLoopCharacteristics {}
impl Cast<dyn PartnerRoleTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn PerformerType> for StandardLoopCharacteristics {}
impl Cast<dyn PerformerTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn PotentialOwnerType> for StandardLoopCharacteristics {}
impl Cast<dyn PotentialOwnerTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ProcessType> for StandardLoopCharacteristics {}
impl Cast<dyn ProcessTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn PropertyType> for StandardLoopCharacteristics {}
impl Cast<dyn PropertyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ReceiveTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn ReceiveTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn RelationshipType> for StandardLoopCharacteristics {}
impl Cast<dyn RelationshipTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn RenderingType> for StandardLoopCharacteristics {}
impl Cast<dyn RenderingTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceType> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceAssignmentExpressionType> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceParameterType> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceParameterTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceParameterBindingType> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceParameterBindingTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceRoleType> for StandardLoopCharacteristics {}
impl Cast<dyn ResourceRoleTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn RootElementType> for StandardLoopCharacteristics {}
impl Cast<dyn RootElementTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ScriptTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn ScriptTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ScriptType> for StandardLoopCharacteristics {}
impl Cast<dyn ScriptTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SendTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn SendTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SequenceFlowType> for StandardLoopCharacteristics {}
impl Cast<dyn SequenceFlowTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ServiceTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn ServiceTaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SignalType> for StandardLoopCharacteristics {}
impl Cast<dyn SignalTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SignalEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn SignalEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn StandardLoopCharacteristicsType> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for StandardLoopCharacteristics {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn StartEventType> for StandardLoopCharacteristics {}
impl Cast<dyn StartEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SubChoreographyType> for StandardLoopCharacteristics {}
impl Cast<dyn SubChoreographyTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SubConversationType> for StandardLoopCharacteristics {}
impl Cast<dyn SubConversationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn SubProcessType> for StandardLoopCharacteristics {}
impl Cast<dyn SubProcessTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TaskType> for StandardLoopCharacteristics {}
impl Cast<dyn TaskTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TerminateEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TextAnnotationType> for StandardLoopCharacteristics {}
impl Cast<dyn TextAnnotationTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TextType> for StandardLoopCharacteristics {}
impl Cast<dyn TextTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn ThrowEventType> for StandardLoopCharacteristics {}
impl Cast<dyn ThrowEventTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TimerEventDefinitionType> for StandardLoopCharacteristics {}
impl Cast<dyn TimerEventDefinitionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn TransactionType> for StandardLoopCharacteristics {}
impl Cast<dyn TransactionTypeMut> for StandardLoopCharacteristics {}
impl Cast<dyn UserTaskType> for StandardLoopCharacteristics {}
impl Cast<dyn UserTaskTypeMut> for StandardLoopCharacteristics {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:startEvent")]
pub struct StartEvent {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(child = "bpmn:property")]
    #[tia("EventType",rg*="properties","EventTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(attr = "parallelMultiple")]
    #[tia("CatchEventType",rg*="parallel_multiple","CatchEventTypeMut",s)]
    pub parallel_multiple: Option<bool>,
    #[xml(child = "bpmn:dataOutput")]
    #[tia("CatchEventType",rg*="data_outputs","CatchEventTypeMut",s,rmg*="data_outputs_mut")]
    pub data_outputs: Vec<DataOutput>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("CatchEventType",rg*="data_output_associations","CatchEventTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:outputSet")]
    #[tia("CatchEventType",rg*="output_set","CatchEventTypeMut",s,rmg*="output_set_mut")]
    pub output_set: Option<OutputSet>,
    #[xml(
        child = "bpmn:cancelEventDefinition",
        child = "bpmn:compensateEventDefinition",
        child = "bpmn:conditionalEventDefinition",
        child = "bpmn:errorEventDefinition",
        child = "bpmn:escalationEventDefinition",
        child = "bpmn:linkEventDefinition",
        child = "bpmn:messageEventDefinition",
        child = "bpmn:signalEventDefinition",
        child = "bpmn:terminateEventDefinition",
        child = "bpmn:timerEventDefinition"
    )]
    #[tia("CatchEventType",rg*="event_definitions","CatchEventTypeMut",s,rmg*="event_definitions_mut")]
    pub event_definitions: Vec<EventDefinition>,
    #[xml(flatten_text = "bpmn:eventDefinitionRef")]
    #[tia("CatchEventType",rg*="event_definition_refs","CatchEventTypeMut",s,rmg*="event_definition_refs_mut")]
    pub event_definition_refs: Vec<String>,
    #[xml(attr = "isInterrupting")]
    #[tia("StartEventType",rg*="is_interrupting","StartEventTypeMut",s)]
    pub is_interrupting: Option<bool>,
}
impl DocumentElement for StartEvent {
    fn element(&self) -> Element {
        Element::StartEvent
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for StartEvent {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `startEvent`
pub trait StartEventType: CatchEventType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `isInterrupting`
    fn is_interrupting(&self) -> &Option<bool>;
}
dyn_clone::clone_trait_object!(StartEventType);
impl_downcast!(StartEventType);
/// Mutable access to `startEvent`
pub trait StartEventTypeMut:
    CatchEventTypeMut + Downcast + Debug + Send + DynClone + StartEventType
{
    /// Set value of attribute `isInterrupting`
    fn set_is_interrupting(&mut self, value: Option<bool>);
}
dyn_clone::clone_trait_object!(StartEventTypeMut);
impl_downcast!(StartEventTypeMut);
impl Cast<dyn DefinitionsType> for StartEvent {}
impl Cast<dyn DefinitionsTypeMut> for StartEvent {}
impl Cast<dyn ImportType> for StartEvent {}
impl Cast<dyn ImportTypeMut> for StartEvent {}
impl Cast<dyn ActivityType> for StartEvent {}
impl Cast<dyn ActivityTypeMut> for StartEvent {}
impl Cast<dyn AdHocSubProcessType> for StartEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for StartEvent {}
impl Cast<dyn ArtifactType> for StartEvent {}
impl Cast<dyn ArtifactTypeMut> for StartEvent {}
impl Cast<dyn AssignmentType> for StartEvent {}
impl Cast<dyn AssignmentTypeMut> for StartEvent {}
impl Cast<dyn AssociationType> for StartEvent {}
impl Cast<dyn AssociationTypeMut> for StartEvent {}
impl Cast<dyn AuditingType> for StartEvent {}
impl Cast<dyn AuditingTypeMut> for StartEvent {}
impl Cast<dyn BaseElementType> for StartEvent {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for StartEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for StartEvent {}
impl Cast<dyn BoundaryEventType> for StartEvent {}
impl Cast<dyn BoundaryEventTypeMut> for StartEvent {}
impl Cast<dyn BusinessRuleTaskType> for StartEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for StartEvent {}
impl Cast<dyn CallableElementType> for StartEvent {}
impl Cast<dyn CallableElementTypeMut> for StartEvent {}
impl Cast<dyn CallActivityType> for StartEvent {}
impl Cast<dyn CallActivityTypeMut> for StartEvent {}
impl Cast<dyn CallChoreographyType> for StartEvent {}
impl Cast<dyn CallChoreographyTypeMut> for StartEvent {}
impl Cast<dyn CallConversationType> for StartEvent {}
impl Cast<dyn CallConversationTypeMut> for StartEvent {}
impl Cast<dyn CancelEventDefinitionType> for StartEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn CatchEventType> for StartEvent {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CatchEventTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CategoryType> for StartEvent {}
impl Cast<dyn CategoryTypeMut> for StartEvent {}
impl Cast<dyn CategoryValueType> for StartEvent {}
impl Cast<dyn CategoryValueTypeMut> for StartEvent {}
impl Cast<dyn ChoreographyType> for StartEvent {}
impl Cast<dyn ChoreographyTypeMut> for StartEvent {}
impl Cast<dyn ChoreographyActivityType> for StartEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for StartEvent {}
impl Cast<dyn ChoreographyTaskType> for StartEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for StartEvent {}
impl Cast<dyn CollaborationType> for StartEvent {}
impl Cast<dyn CollaborationTypeMut> for StartEvent {}
impl Cast<dyn CompensateEventDefinitionType> for StartEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for StartEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for StartEvent {}
impl Cast<dyn ComplexGatewayType> for StartEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for StartEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for StartEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn ConversationType> for StartEvent {}
impl Cast<dyn ConversationTypeMut> for StartEvent {}
impl Cast<dyn ConversationAssociationType> for StartEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for StartEvent {}
impl Cast<dyn ConversationLinkType> for StartEvent {}
impl Cast<dyn ConversationLinkTypeMut> for StartEvent {}
impl Cast<dyn ConversationNodeType> for StartEvent {}
impl Cast<dyn ConversationNodeTypeMut> for StartEvent {}
impl Cast<dyn CorrelationKeyType> for StartEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for StartEvent {}
impl Cast<dyn CorrelationPropertyType> for StartEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for StartEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for StartEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for StartEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for StartEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for StartEvent {}
impl Cast<dyn CorrelationSubscriptionType> for StartEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for StartEvent {}
impl Cast<dyn DataAssociationType> for StartEvent {}
impl Cast<dyn DataAssociationTypeMut> for StartEvent {}
impl Cast<dyn DataInputType> for StartEvent {}
impl Cast<dyn DataInputTypeMut> for StartEvent {}
impl Cast<dyn DataInputAssociationType> for StartEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for StartEvent {}
impl Cast<dyn DataObjectType> for StartEvent {}
impl Cast<dyn DataObjectTypeMut> for StartEvent {}
impl Cast<dyn DataObjectReferenceType> for StartEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for StartEvent {}
impl Cast<dyn DataOutputType> for StartEvent {}
impl Cast<dyn DataOutputTypeMut> for StartEvent {}
impl Cast<dyn DataOutputAssociationType> for StartEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for StartEvent {}
impl Cast<dyn DataStateType> for StartEvent {}
impl Cast<dyn DataStateTypeMut> for StartEvent {}
impl Cast<dyn DataStoreType> for StartEvent {}
impl Cast<dyn DataStoreTypeMut> for StartEvent {}
impl Cast<dyn DataStoreReferenceType> for StartEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for StartEvent {}
impl Cast<dyn DocumentationType> for StartEvent {}
impl Cast<dyn DocumentationTypeMut> for StartEvent {}
impl Cast<dyn EndEventType> for StartEvent {}
impl Cast<dyn EndEventTypeMut> for StartEvent {}
impl Cast<dyn EndPointType> for StartEvent {}
impl Cast<dyn EndPointTypeMut> for StartEvent {}
impl Cast<dyn ErrorType> for StartEvent {}
impl Cast<dyn ErrorTypeMut> for StartEvent {}
impl Cast<dyn ErrorEventDefinitionType> for StartEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn EscalationType> for StartEvent {}
impl Cast<dyn EscalationTypeMut> for StartEvent {}
impl Cast<dyn EscalationEventDefinitionType> for StartEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn EventType> for StartEvent {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventBasedGatewayType> for StartEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for StartEvent {}
impl Cast<dyn EventDefinitionType> for StartEvent {}
impl Cast<dyn EventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn ExclusiveGatewayType> for StartEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for StartEvent {}
impl Cast<dyn ExpressionType> for StartEvent {}
impl Cast<dyn ExpressionTypeMut> for StartEvent {}
impl Cast<dyn ExtensionType> for StartEvent {}
impl Cast<dyn ExtensionTypeMut> for StartEvent {}
impl Cast<dyn ExtensionElementsType> for StartEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for StartEvent {}
impl Cast<dyn FlowElementType> for StartEvent {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for StartEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for StartEvent {}
impl Cast<dyn FormalExpressionTypeMut> for StartEvent {}
impl Cast<dyn GatewayType> for StartEvent {}
impl Cast<dyn GatewayTypeMut> for StartEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for StartEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for StartEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for StartEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for StartEvent {}
impl Cast<dyn GlobalConversationType> for StartEvent {}
impl Cast<dyn GlobalConversationTypeMut> for StartEvent {}
impl Cast<dyn GlobalManualTaskType> for StartEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for StartEvent {}
impl Cast<dyn GlobalScriptTaskType> for StartEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for StartEvent {}
impl Cast<dyn GlobalTaskType> for StartEvent {}
impl Cast<dyn GlobalTaskTypeMut> for StartEvent {}
impl Cast<dyn GlobalUserTaskType> for StartEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for StartEvent {}
impl Cast<dyn GroupType> for StartEvent {}
impl Cast<dyn GroupTypeMut> for StartEvent {}
impl Cast<dyn HumanPerformerType> for StartEvent {}
impl Cast<dyn HumanPerformerTypeMut> for StartEvent {}
impl Cast<dyn ImplicitThrowEventType> for StartEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for StartEvent {}
impl Cast<dyn InclusiveGatewayType> for StartEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for StartEvent {}
impl Cast<dyn InputSetType> for StartEvent {}
impl Cast<dyn InputSetTypeMut> for StartEvent {}
impl Cast<dyn InterfaceType> for StartEvent {}
impl Cast<dyn InterfaceTypeMut> for StartEvent {}
impl Cast<dyn IntermediateCatchEventType> for StartEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for StartEvent {}
impl Cast<dyn IntermediateThrowEventType> for StartEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for StartEvent {}
impl Cast<dyn InputOutputBindingType> for StartEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for StartEvent {}
impl Cast<dyn InputOutputSpecificationType> for StartEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for StartEvent {}
impl Cast<dyn ItemDefinitionType> for StartEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for StartEvent {}
impl Cast<dyn LaneType> for StartEvent {}
impl Cast<dyn LaneTypeMut> for StartEvent {}
impl Cast<dyn LaneSetType> for StartEvent {}
impl Cast<dyn LaneSetTypeMut> for StartEvent {}
impl Cast<dyn LinkEventDefinitionType> for StartEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn LoopCharacteristicsType> for StartEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for StartEvent {}
impl Cast<dyn ManualTaskType> for StartEvent {}
impl Cast<dyn ManualTaskTypeMut> for StartEvent {}
impl Cast<dyn MessageType> for StartEvent {}
impl Cast<dyn MessageTypeMut> for StartEvent {}
impl Cast<dyn MessageEventDefinitionType> for StartEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn MessageFlowType> for StartEvent {}
impl Cast<dyn MessageFlowTypeMut> for StartEvent {}
impl Cast<dyn MessageFlowAssociationType> for StartEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for StartEvent {}
impl Cast<dyn MonitoringType> for StartEvent {}
impl Cast<dyn MonitoringTypeMut> for StartEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for StartEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for StartEvent {}
impl Cast<dyn OperationType> for StartEvent {}
impl Cast<dyn OperationTypeMut> for StartEvent {}
impl Cast<dyn OutputSetType> for StartEvent {}
impl Cast<dyn OutputSetTypeMut> for StartEvent {}
impl Cast<dyn ParallelGatewayType> for StartEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for StartEvent {}
impl Cast<dyn ParticipantType> for StartEvent {}
impl Cast<dyn ParticipantTypeMut> for StartEvent {}
impl Cast<dyn ParticipantAssociationType> for StartEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for StartEvent {}
impl Cast<dyn ParticipantMultiplicityType> for StartEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for StartEvent {}
impl Cast<dyn PartnerEntityType> for StartEvent {}
impl Cast<dyn PartnerEntityTypeMut> for StartEvent {}
impl Cast<dyn PartnerRoleType> for StartEvent {}
impl Cast<dyn PartnerRoleTypeMut> for StartEvent {}
impl Cast<dyn PerformerType> for StartEvent {}
impl Cast<dyn PerformerTypeMut> for StartEvent {}
impl Cast<dyn PotentialOwnerType> for StartEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for StartEvent {}
impl Cast<dyn ProcessType> for StartEvent {}
impl Cast<dyn ProcessTypeMut> for StartEvent {}
impl Cast<dyn PropertyType> for StartEvent {}
impl Cast<dyn PropertyTypeMut> for StartEvent {}
impl Cast<dyn ReceiveTaskType> for StartEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for StartEvent {}
impl Cast<dyn RelationshipType> for StartEvent {}
impl Cast<dyn RelationshipTypeMut> for StartEvent {}
impl Cast<dyn RenderingType> for StartEvent {}
impl Cast<dyn RenderingTypeMut> for StartEvent {}
impl Cast<dyn ResourceType> for StartEvent {}
impl Cast<dyn ResourceTypeMut> for StartEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for StartEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for StartEvent {}
impl Cast<dyn ResourceParameterType> for StartEvent {}
impl Cast<dyn ResourceParameterTypeMut> for StartEvent {}
impl Cast<dyn ResourceParameterBindingType> for StartEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for StartEvent {}
impl Cast<dyn ResourceRoleType> for StartEvent {}
impl Cast<dyn ResourceRoleTypeMut> for StartEvent {}
impl Cast<dyn RootElementType> for StartEvent {}
impl Cast<dyn RootElementTypeMut> for StartEvent {}
impl Cast<dyn ScriptTaskType> for StartEvent {}
impl Cast<dyn ScriptTaskTypeMut> for StartEvent {}
impl Cast<dyn ScriptType> for StartEvent {}
impl Cast<dyn ScriptTypeMut> for StartEvent {}
impl Cast<dyn SendTaskType> for StartEvent {}
impl Cast<dyn SendTaskTypeMut> for StartEvent {}
impl Cast<dyn SequenceFlowType> for StartEvent {}
impl Cast<dyn SequenceFlowTypeMut> for StartEvent {}
impl Cast<dyn ServiceTaskType> for StartEvent {}
impl Cast<dyn ServiceTaskTypeMut> for StartEvent {}
impl Cast<dyn SignalType> for StartEvent {}
impl Cast<dyn SignalTypeMut> for StartEvent {}
impl Cast<dyn SignalEventDefinitionType> for StartEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for StartEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for StartEvent {}
impl Cast<dyn StartEventType> for StartEvent {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn StartEventTypeMut> for StartEvent {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubChoreographyType> for StartEvent {}
impl Cast<dyn SubChoreographyTypeMut> for StartEvent {}
impl Cast<dyn SubConversationType> for StartEvent {}
impl Cast<dyn SubConversationTypeMut> for StartEvent {}
impl Cast<dyn SubProcessType> for StartEvent {}
impl Cast<dyn SubProcessTypeMut> for StartEvent {}
impl Cast<dyn TaskType> for StartEvent {}
impl Cast<dyn TaskTypeMut> for StartEvent {}
impl Cast<dyn TerminateEventDefinitionType> for StartEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn TextAnnotationType> for StartEvent {}
impl Cast<dyn TextAnnotationTypeMut> for StartEvent {}
impl Cast<dyn TextType> for StartEvent {}
impl Cast<dyn TextTypeMut> for StartEvent {}
impl Cast<dyn ThrowEventType> for StartEvent {}
impl Cast<dyn ThrowEventTypeMut> for StartEvent {}
impl Cast<dyn TimerEventDefinitionType> for StartEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for StartEvent {}
impl Cast<dyn TransactionType> for StartEvent {}
impl Cast<dyn TransactionTypeMut> for StartEvent {}
impl Cast<dyn UserTaskType> for StartEvent {}
impl Cast<dyn UserTaskTypeMut> for StartEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:subChoreography")]
pub struct SubChoreography {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "initiatingParticipantRef")]
    #[tia("ChoreographyActivityType",rg*="initiating_participant_ref","ChoreographyActivityTypeMut",s)]
    pub initiating_participant_ref: String,
    #[xml(attr = "loopType")]
    #[tia("ChoreographyActivityType",rg*="loop_type","ChoreographyActivityTypeMut",s)]
    pub loop_type: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ChoreographyActivityType",rg*="participant_refs","ChoreographyActivityTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ChoreographyActivityType",rg*="correlation_keys","ChoreographyActivityTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("SubChoreographyType",rg*="flow_elements","SubChoreographyTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("SubChoreographyType",rg*="artifacts","SubChoreographyTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
}
impl DocumentElement for SubChoreography {
    fn element(&self) -> Element {
        Element::SubChoreography
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SubChoreography {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.flow_elements.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.flow_elements.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `subChoreography`
pub trait SubChoreographyType:
    ChoreographyActivityType + Downcast + Debug + Send + DynClone
{
    /// Get value of `flowElement` child
    fn flow_elements(&self) -> &Vec<FlowElement>;
    /// Get value of `artifact` child
    fn artifacts(&self) -> &Vec<Artifact>;
}
dyn_clone::clone_trait_object!(SubChoreographyType);
impl_downcast!(SubChoreographyType);
/// Mutable access to `subChoreography`
pub trait SubChoreographyTypeMut:
    ChoreographyActivityTypeMut + Downcast + Debug + Send + DynClone + SubChoreographyType
{
    /// Get a mutable value of `flowElement` child
    fn flow_elements_mut(&mut self) -> &mut Vec<FlowElement>;
    /// Set value of `flowElement` child
    fn set_flow_elements(&mut self, value: Vec<FlowElement>);
    /// Get a mutable value of `artifact` child
    fn artifacts_mut(&mut self) -> &mut Vec<Artifact>;
    /// Set value of `artifact` child
    fn set_artifacts(&mut self, value: Vec<Artifact>);
}
dyn_clone::clone_trait_object!(SubChoreographyTypeMut);
impl_downcast!(SubChoreographyTypeMut);
impl Cast<dyn DefinitionsType> for SubChoreography {}
impl Cast<dyn DefinitionsTypeMut> for SubChoreography {}
impl Cast<dyn ImportType> for SubChoreography {}
impl Cast<dyn ImportTypeMut> for SubChoreography {}
impl Cast<dyn ActivityType> for SubChoreography {}
impl Cast<dyn ActivityTypeMut> for SubChoreography {}
impl Cast<dyn AdHocSubProcessType> for SubChoreography {}
impl Cast<dyn AdHocSubProcessTypeMut> for SubChoreography {}
impl Cast<dyn ArtifactType> for SubChoreography {}
impl Cast<dyn ArtifactTypeMut> for SubChoreography {}
impl Cast<dyn AssignmentType> for SubChoreography {}
impl Cast<dyn AssignmentTypeMut> for SubChoreography {}
impl Cast<dyn AssociationType> for SubChoreography {}
impl Cast<dyn AssociationTypeMut> for SubChoreography {}
impl Cast<dyn AuditingType> for SubChoreography {}
impl Cast<dyn AuditingTypeMut> for SubChoreography {}
impl Cast<dyn BaseElementType> for SubChoreography {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SubChoreography {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SubChoreography {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SubChoreography {}
impl Cast<dyn BoundaryEventType> for SubChoreography {}
impl Cast<dyn BoundaryEventTypeMut> for SubChoreography {}
impl Cast<dyn BusinessRuleTaskType> for SubChoreography {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SubChoreography {}
impl Cast<dyn CallableElementType> for SubChoreography {}
impl Cast<dyn CallableElementTypeMut> for SubChoreography {}
impl Cast<dyn CallActivityType> for SubChoreography {}
impl Cast<dyn CallActivityTypeMut> for SubChoreography {}
impl Cast<dyn CallChoreographyType> for SubChoreography {}
impl Cast<dyn CallChoreographyTypeMut> for SubChoreography {}
impl Cast<dyn CallConversationType> for SubChoreography {}
impl Cast<dyn CallConversationTypeMut> for SubChoreography {}
impl Cast<dyn CancelEventDefinitionType> for SubChoreography {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn CatchEventType> for SubChoreography {}
impl Cast<dyn CatchEventTypeMut> for SubChoreography {}
impl Cast<dyn CategoryType> for SubChoreography {}
impl Cast<dyn CategoryTypeMut> for SubChoreography {}
impl Cast<dyn CategoryValueType> for SubChoreography {}
impl Cast<dyn CategoryValueTypeMut> for SubChoreography {}
impl Cast<dyn ChoreographyType> for SubChoreography {}
impl Cast<dyn ChoreographyTypeMut> for SubChoreography {}
impl Cast<dyn ChoreographyActivityType> for SubChoreography {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for SubChoreography {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ChoreographyTaskType> for SubChoreography {}
impl Cast<dyn ChoreographyTaskTypeMut> for SubChoreography {}
impl Cast<dyn CollaborationType> for SubChoreography {}
impl Cast<dyn CollaborationTypeMut> for SubChoreography {}
impl Cast<dyn CompensateEventDefinitionType> for SubChoreography {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SubChoreography {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn ComplexGatewayType> for SubChoreography {}
impl Cast<dyn ComplexGatewayTypeMut> for SubChoreography {}
impl Cast<dyn ConditionalEventDefinitionType> for SubChoreography {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn ConversationType> for SubChoreography {}
impl Cast<dyn ConversationTypeMut> for SubChoreography {}
impl Cast<dyn ConversationAssociationType> for SubChoreography {}
impl Cast<dyn ConversationAssociationTypeMut> for SubChoreography {}
impl Cast<dyn ConversationLinkType> for SubChoreography {}
impl Cast<dyn ConversationLinkTypeMut> for SubChoreography {}
impl Cast<dyn ConversationNodeType> for SubChoreography {}
impl Cast<dyn ConversationNodeTypeMut> for SubChoreography {}
impl Cast<dyn CorrelationKeyType> for SubChoreography {}
impl Cast<dyn CorrelationKeyTypeMut> for SubChoreography {}
impl Cast<dyn CorrelationPropertyType> for SubChoreography {}
impl Cast<dyn CorrelationPropertyTypeMut> for SubChoreography {}
impl Cast<dyn CorrelationPropertyBindingType> for SubChoreography {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SubChoreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SubChoreography {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SubChoreography {}
impl Cast<dyn CorrelationSubscriptionType> for SubChoreography {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SubChoreography {}
impl Cast<dyn DataAssociationType> for SubChoreography {}
impl Cast<dyn DataAssociationTypeMut> for SubChoreography {}
impl Cast<dyn DataInputType> for SubChoreography {}
impl Cast<dyn DataInputTypeMut> for SubChoreography {}
impl Cast<dyn DataInputAssociationType> for SubChoreography {}
impl Cast<dyn DataInputAssociationTypeMut> for SubChoreography {}
impl Cast<dyn DataObjectType> for SubChoreography {}
impl Cast<dyn DataObjectTypeMut> for SubChoreography {}
impl Cast<dyn DataObjectReferenceType> for SubChoreography {}
impl Cast<dyn DataObjectReferenceTypeMut> for SubChoreography {}
impl Cast<dyn DataOutputType> for SubChoreography {}
impl Cast<dyn DataOutputTypeMut> for SubChoreography {}
impl Cast<dyn DataOutputAssociationType> for SubChoreography {}
impl Cast<dyn DataOutputAssociationTypeMut> for SubChoreography {}
impl Cast<dyn DataStateType> for SubChoreography {}
impl Cast<dyn DataStateTypeMut> for SubChoreography {}
impl Cast<dyn DataStoreType> for SubChoreography {}
impl Cast<dyn DataStoreTypeMut> for SubChoreography {}
impl Cast<dyn DataStoreReferenceType> for SubChoreography {}
impl Cast<dyn DataStoreReferenceTypeMut> for SubChoreography {}
impl Cast<dyn DocumentationType> for SubChoreography {}
impl Cast<dyn DocumentationTypeMut> for SubChoreography {}
impl Cast<dyn EndEventType> for SubChoreography {}
impl Cast<dyn EndEventTypeMut> for SubChoreography {}
impl Cast<dyn EndPointType> for SubChoreography {}
impl Cast<dyn EndPointTypeMut> for SubChoreography {}
impl Cast<dyn ErrorType> for SubChoreography {}
impl Cast<dyn ErrorTypeMut> for SubChoreography {}
impl Cast<dyn ErrorEventDefinitionType> for SubChoreography {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn EscalationType> for SubChoreography {}
impl Cast<dyn EscalationTypeMut> for SubChoreography {}
impl Cast<dyn EscalationEventDefinitionType> for SubChoreography {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn EventType> for SubChoreography {}
impl Cast<dyn EventTypeMut> for SubChoreography {}
impl Cast<dyn EventBasedGatewayType> for SubChoreography {}
impl Cast<dyn EventBasedGatewayTypeMut> for SubChoreography {}
impl Cast<dyn EventDefinitionType> for SubChoreography {}
impl Cast<dyn EventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn ExclusiveGatewayType> for SubChoreography {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SubChoreography {}
impl Cast<dyn ExpressionType> for SubChoreography {}
impl Cast<dyn ExpressionTypeMut> for SubChoreography {}
impl Cast<dyn ExtensionType> for SubChoreography {}
impl Cast<dyn ExtensionTypeMut> for SubChoreography {}
impl Cast<dyn ExtensionElementsType> for SubChoreography {}
impl Cast<dyn ExtensionElementsTypeMut> for SubChoreography {}
impl Cast<dyn FlowElementType> for SubChoreography {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for SubChoreography {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for SubChoreography {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for SubChoreography {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for SubChoreography {}
impl Cast<dyn FormalExpressionTypeMut> for SubChoreography {}
impl Cast<dyn GatewayType> for SubChoreography {}
impl Cast<dyn GatewayTypeMut> for SubChoreography {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SubChoreography {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SubChoreography {}
impl Cast<dyn GlobalChoreographyTaskType> for SubChoreography {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SubChoreography {}
impl Cast<dyn GlobalConversationType> for SubChoreography {}
impl Cast<dyn GlobalConversationTypeMut> for SubChoreography {}
impl Cast<dyn GlobalManualTaskType> for SubChoreography {}
impl Cast<dyn GlobalManualTaskTypeMut> for SubChoreography {}
impl Cast<dyn GlobalScriptTaskType> for SubChoreography {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SubChoreography {}
impl Cast<dyn GlobalTaskType> for SubChoreography {}
impl Cast<dyn GlobalTaskTypeMut> for SubChoreography {}
impl Cast<dyn GlobalUserTaskType> for SubChoreography {}
impl Cast<dyn GlobalUserTaskTypeMut> for SubChoreography {}
impl Cast<dyn GroupType> for SubChoreography {}
impl Cast<dyn GroupTypeMut> for SubChoreography {}
impl Cast<dyn HumanPerformerType> for SubChoreography {}
impl Cast<dyn HumanPerformerTypeMut> for SubChoreography {}
impl Cast<dyn ImplicitThrowEventType> for SubChoreography {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SubChoreography {}
impl Cast<dyn InclusiveGatewayType> for SubChoreography {}
impl Cast<dyn InclusiveGatewayTypeMut> for SubChoreography {}
impl Cast<dyn InputSetType> for SubChoreography {}
impl Cast<dyn InputSetTypeMut> for SubChoreography {}
impl Cast<dyn InterfaceType> for SubChoreography {}
impl Cast<dyn InterfaceTypeMut> for SubChoreography {}
impl Cast<dyn IntermediateCatchEventType> for SubChoreography {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SubChoreography {}
impl Cast<dyn IntermediateThrowEventType> for SubChoreography {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SubChoreography {}
impl Cast<dyn InputOutputBindingType> for SubChoreography {}
impl Cast<dyn InputOutputBindingTypeMut> for SubChoreography {}
impl Cast<dyn InputOutputSpecificationType> for SubChoreography {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SubChoreography {}
impl Cast<dyn ItemDefinitionType> for SubChoreography {}
impl Cast<dyn ItemDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn LaneType> for SubChoreography {}
impl Cast<dyn LaneTypeMut> for SubChoreography {}
impl Cast<dyn LaneSetType> for SubChoreography {}
impl Cast<dyn LaneSetTypeMut> for SubChoreography {}
impl Cast<dyn LinkEventDefinitionType> for SubChoreography {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn LoopCharacteristicsType> for SubChoreography {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SubChoreography {}
impl Cast<dyn ManualTaskType> for SubChoreography {}
impl Cast<dyn ManualTaskTypeMut> for SubChoreography {}
impl Cast<dyn MessageType> for SubChoreography {}
impl Cast<dyn MessageTypeMut> for SubChoreography {}
impl Cast<dyn MessageEventDefinitionType> for SubChoreography {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn MessageFlowType> for SubChoreography {}
impl Cast<dyn MessageFlowTypeMut> for SubChoreography {}
impl Cast<dyn MessageFlowAssociationType> for SubChoreography {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SubChoreography {}
impl Cast<dyn MonitoringType> for SubChoreography {}
impl Cast<dyn MonitoringTypeMut> for SubChoreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SubChoreography {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SubChoreography {}
impl Cast<dyn OperationType> for SubChoreography {}
impl Cast<dyn OperationTypeMut> for SubChoreography {}
impl Cast<dyn OutputSetType> for SubChoreography {}
impl Cast<dyn OutputSetTypeMut> for SubChoreography {}
impl Cast<dyn ParallelGatewayType> for SubChoreography {}
impl Cast<dyn ParallelGatewayTypeMut> for SubChoreography {}
impl Cast<dyn ParticipantType> for SubChoreography {}
impl Cast<dyn ParticipantTypeMut> for SubChoreography {}
impl Cast<dyn ParticipantAssociationType> for SubChoreography {}
impl Cast<dyn ParticipantAssociationTypeMut> for SubChoreography {}
impl Cast<dyn ParticipantMultiplicityType> for SubChoreography {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SubChoreography {}
impl Cast<dyn PartnerEntityType> for SubChoreography {}
impl Cast<dyn PartnerEntityTypeMut> for SubChoreography {}
impl Cast<dyn PartnerRoleType> for SubChoreography {}
impl Cast<dyn PartnerRoleTypeMut> for SubChoreography {}
impl Cast<dyn PerformerType> for SubChoreography {}
impl Cast<dyn PerformerTypeMut> for SubChoreography {}
impl Cast<dyn PotentialOwnerType> for SubChoreography {}
impl Cast<dyn PotentialOwnerTypeMut> for SubChoreography {}
impl Cast<dyn ProcessType> for SubChoreography {}
impl Cast<dyn ProcessTypeMut> for SubChoreography {}
impl Cast<dyn PropertyType> for SubChoreography {}
impl Cast<dyn PropertyTypeMut> for SubChoreography {}
impl Cast<dyn ReceiveTaskType> for SubChoreography {}
impl Cast<dyn ReceiveTaskTypeMut> for SubChoreography {}
impl Cast<dyn RelationshipType> for SubChoreography {}
impl Cast<dyn RelationshipTypeMut> for SubChoreography {}
impl Cast<dyn RenderingType> for SubChoreography {}
impl Cast<dyn RenderingTypeMut> for SubChoreography {}
impl Cast<dyn ResourceType> for SubChoreography {}
impl Cast<dyn ResourceTypeMut> for SubChoreography {}
impl Cast<dyn ResourceAssignmentExpressionType> for SubChoreography {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SubChoreography {}
impl Cast<dyn ResourceParameterType> for SubChoreography {}
impl Cast<dyn ResourceParameterTypeMut> for SubChoreography {}
impl Cast<dyn ResourceParameterBindingType> for SubChoreography {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SubChoreography {}
impl Cast<dyn ResourceRoleType> for SubChoreography {}
impl Cast<dyn ResourceRoleTypeMut> for SubChoreography {}
impl Cast<dyn RootElementType> for SubChoreography {}
impl Cast<dyn RootElementTypeMut> for SubChoreography {}
impl Cast<dyn ScriptTaskType> for SubChoreography {}
impl Cast<dyn ScriptTaskTypeMut> for SubChoreography {}
impl Cast<dyn ScriptType> for SubChoreography {}
impl Cast<dyn ScriptTypeMut> for SubChoreography {}
impl Cast<dyn SendTaskType> for SubChoreography {}
impl Cast<dyn SendTaskTypeMut> for SubChoreography {}
impl Cast<dyn SequenceFlowType> for SubChoreography {}
impl Cast<dyn SequenceFlowTypeMut> for SubChoreography {}
impl Cast<dyn ServiceTaskType> for SubChoreography {}
impl Cast<dyn ServiceTaskTypeMut> for SubChoreography {}
impl Cast<dyn SignalType> for SubChoreography {}
impl Cast<dyn SignalTypeMut> for SubChoreography {}
impl Cast<dyn SignalEventDefinitionType> for SubChoreography {}
impl Cast<dyn SignalEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn StandardLoopCharacteristicsType> for SubChoreography {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SubChoreography {}
impl Cast<dyn StartEventType> for SubChoreography {}
impl Cast<dyn StartEventTypeMut> for SubChoreography {}
impl Cast<dyn SubChoreographyType> for SubChoreography {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubChoreographyTypeMut> for SubChoreography {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubConversationType> for SubChoreography {}
impl Cast<dyn SubConversationTypeMut> for SubChoreography {}
impl Cast<dyn SubProcessType> for SubChoreography {}
impl Cast<dyn SubProcessTypeMut> for SubChoreography {}
impl Cast<dyn TaskType> for SubChoreography {}
impl Cast<dyn TaskTypeMut> for SubChoreography {}
impl Cast<dyn TerminateEventDefinitionType> for SubChoreography {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn TextAnnotationType> for SubChoreography {}
impl Cast<dyn TextAnnotationTypeMut> for SubChoreography {}
impl Cast<dyn TextType> for SubChoreography {}
impl Cast<dyn TextTypeMut> for SubChoreography {}
impl Cast<dyn ThrowEventType> for SubChoreography {}
impl Cast<dyn ThrowEventTypeMut> for SubChoreography {}
impl Cast<dyn TimerEventDefinitionType> for SubChoreography {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SubChoreography {}
impl Cast<dyn TransactionType> for SubChoreography {}
impl Cast<dyn TransactionTypeMut> for SubChoreography {}
impl Cast<dyn UserTaskType> for SubChoreography {}
impl Cast<dyn UserTaskTypeMut> for SubChoreography {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:subConversation")]
pub struct SubConversation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("ConversationNodeType",rg*="name","ConversationNodeTypeMut",s)]
    pub name: Option<String>,
    #[xml(flatten_text = "bpmn:participantRef")]
    #[tia("ConversationNodeType",rg*="participant_refs","ConversationNodeTypeMut",s,rmg*="participant_refs_mut")]
    pub participant_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:messageFlowRef")]
    #[tia("ConversationNodeType",rg*="message_flow_refs","ConversationNodeTypeMut",s,rmg*="message_flow_refs_mut")]
    pub message_flow_refs: Vec<String>,
    #[xml(child = "bpmn:correlationKey")]
    #[tia("ConversationNodeType",rg*="correlation_keys","ConversationNodeTypeMut",s,rmg*="correlation_keys_mut")]
    pub correlation_keys: Vec<CorrelationKey>,
    #[xml(
        child = "bpmn:callConversation",
        child = "bpmn:conversation",
        child = "bpmn:subConversation"
    )]
    #[tia("SubConversationType",rg*="conversation_nodes","SubConversationTypeMut",s,rmg*="conversation_nodes_mut")]
    pub conversation_nodes: Vec<ConversationNode>,
}
impl DocumentElement for SubConversation {
    fn element(&self) -> Element {
        Element::SubConversation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SubConversation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.conversation_nodes.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.conversation_nodes.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `subConversation`
pub trait SubConversationType: ConversationNodeType + Downcast + Debug + Send + DynClone {
    /// Get value of `conversationNode` child
    fn conversation_nodes(&self) -> &Vec<ConversationNode>;
}
dyn_clone::clone_trait_object!(SubConversationType);
impl_downcast!(SubConversationType);
/// Mutable access to `subConversation`
pub trait SubConversationTypeMut:
    ConversationNodeTypeMut + Downcast + Debug + Send + DynClone + SubConversationType
{
    /// Get a mutable value of `conversationNode` child
    fn conversation_nodes_mut(&mut self) -> &mut Vec<ConversationNode>;
    /// Set value of `conversationNode` child
    fn set_conversation_nodes(&mut self, value: Vec<ConversationNode>);
}
dyn_clone::clone_trait_object!(SubConversationTypeMut);
impl_downcast!(SubConversationTypeMut);
impl Cast<dyn DefinitionsType> for SubConversation {}
impl Cast<dyn DefinitionsTypeMut> for SubConversation {}
impl Cast<dyn ImportType> for SubConversation {}
impl Cast<dyn ImportTypeMut> for SubConversation {}
impl Cast<dyn ActivityType> for SubConversation {}
impl Cast<dyn ActivityTypeMut> for SubConversation {}
impl Cast<dyn AdHocSubProcessType> for SubConversation {}
impl Cast<dyn AdHocSubProcessTypeMut> for SubConversation {}
impl Cast<dyn ArtifactType> for SubConversation {}
impl Cast<dyn ArtifactTypeMut> for SubConversation {}
impl Cast<dyn AssignmentType> for SubConversation {}
impl Cast<dyn AssignmentTypeMut> for SubConversation {}
impl Cast<dyn AssociationType> for SubConversation {}
impl Cast<dyn AssociationTypeMut> for SubConversation {}
impl Cast<dyn AuditingType> for SubConversation {}
impl Cast<dyn AuditingTypeMut> for SubConversation {}
impl Cast<dyn BaseElementType> for SubConversation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SubConversation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SubConversation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SubConversation {}
impl Cast<dyn BoundaryEventType> for SubConversation {}
impl Cast<dyn BoundaryEventTypeMut> for SubConversation {}
impl Cast<dyn BusinessRuleTaskType> for SubConversation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SubConversation {}
impl Cast<dyn CallableElementType> for SubConversation {}
impl Cast<dyn CallableElementTypeMut> for SubConversation {}
impl Cast<dyn CallActivityType> for SubConversation {}
impl Cast<dyn CallActivityTypeMut> for SubConversation {}
impl Cast<dyn CallChoreographyType> for SubConversation {}
impl Cast<dyn CallChoreographyTypeMut> for SubConversation {}
impl Cast<dyn CallConversationType> for SubConversation {}
impl Cast<dyn CallConversationTypeMut> for SubConversation {}
impl Cast<dyn CancelEventDefinitionType> for SubConversation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn CatchEventType> for SubConversation {}
impl Cast<dyn CatchEventTypeMut> for SubConversation {}
impl Cast<dyn CategoryType> for SubConversation {}
impl Cast<dyn CategoryTypeMut> for SubConversation {}
impl Cast<dyn CategoryValueType> for SubConversation {}
impl Cast<dyn CategoryValueTypeMut> for SubConversation {}
impl Cast<dyn ChoreographyType> for SubConversation {}
impl Cast<dyn ChoreographyTypeMut> for SubConversation {}
impl Cast<dyn ChoreographyActivityType> for SubConversation {}
impl Cast<dyn ChoreographyActivityTypeMut> for SubConversation {}
impl Cast<dyn ChoreographyTaskType> for SubConversation {}
impl Cast<dyn ChoreographyTaskTypeMut> for SubConversation {}
impl Cast<dyn CollaborationType> for SubConversation {}
impl Cast<dyn CollaborationTypeMut> for SubConversation {}
impl Cast<dyn CompensateEventDefinitionType> for SubConversation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SubConversation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SubConversation {}
impl Cast<dyn ComplexGatewayType> for SubConversation {}
impl Cast<dyn ComplexGatewayTypeMut> for SubConversation {}
impl Cast<dyn ConditionalEventDefinitionType> for SubConversation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn ConversationType> for SubConversation {}
impl Cast<dyn ConversationTypeMut> for SubConversation {}
impl Cast<dyn ConversationAssociationType> for SubConversation {}
impl Cast<dyn ConversationAssociationTypeMut> for SubConversation {}
impl Cast<dyn ConversationLinkType> for SubConversation {}
impl Cast<dyn ConversationLinkTypeMut> for SubConversation {}
impl Cast<dyn ConversationNodeType> for SubConversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ConversationNodeTypeMut> for SubConversation {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn CorrelationKeyType> for SubConversation {}
impl Cast<dyn CorrelationKeyTypeMut> for SubConversation {}
impl Cast<dyn CorrelationPropertyType> for SubConversation {}
impl Cast<dyn CorrelationPropertyTypeMut> for SubConversation {}
impl Cast<dyn CorrelationPropertyBindingType> for SubConversation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SubConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SubConversation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SubConversation {}
impl Cast<dyn CorrelationSubscriptionType> for SubConversation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SubConversation {}
impl Cast<dyn DataAssociationType> for SubConversation {}
impl Cast<dyn DataAssociationTypeMut> for SubConversation {}
impl Cast<dyn DataInputType> for SubConversation {}
impl Cast<dyn DataInputTypeMut> for SubConversation {}
impl Cast<dyn DataInputAssociationType> for SubConversation {}
impl Cast<dyn DataInputAssociationTypeMut> for SubConversation {}
impl Cast<dyn DataObjectType> for SubConversation {}
impl Cast<dyn DataObjectTypeMut> for SubConversation {}
impl Cast<dyn DataObjectReferenceType> for SubConversation {}
impl Cast<dyn DataObjectReferenceTypeMut> for SubConversation {}
impl Cast<dyn DataOutputType> for SubConversation {}
impl Cast<dyn DataOutputTypeMut> for SubConversation {}
impl Cast<dyn DataOutputAssociationType> for SubConversation {}
impl Cast<dyn DataOutputAssociationTypeMut> for SubConversation {}
impl Cast<dyn DataStateType> for SubConversation {}
impl Cast<dyn DataStateTypeMut> for SubConversation {}
impl Cast<dyn DataStoreType> for SubConversation {}
impl Cast<dyn DataStoreTypeMut> for SubConversation {}
impl Cast<dyn DataStoreReferenceType> for SubConversation {}
impl Cast<dyn DataStoreReferenceTypeMut> for SubConversation {}
impl Cast<dyn DocumentationType> for SubConversation {}
impl Cast<dyn DocumentationTypeMut> for SubConversation {}
impl Cast<dyn EndEventType> for SubConversation {}
impl Cast<dyn EndEventTypeMut> for SubConversation {}
impl Cast<dyn EndPointType> for SubConversation {}
impl Cast<dyn EndPointTypeMut> for SubConversation {}
impl Cast<dyn ErrorType> for SubConversation {}
impl Cast<dyn ErrorTypeMut> for SubConversation {}
impl Cast<dyn ErrorEventDefinitionType> for SubConversation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn EscalationType> for SubConversation {}
impl Cast<dyn EscalationTypeMut> for SubConversation {}
impl Cast<dyn EscalationEventDefinitionType> for SubConversation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn EventType> for SubConversation {}
impl Cast<dyn EventTypeMut> for SubConversation {}
impl Cast<dyn EventBasedGatewayType> for SubConversation {}
impl Cast<dyn EventBasedGatewayTypeMut> for SubConversation {}
impl Cast<dyn EventDefinitionType> for SubConversation {}
impl Cast<dyn EventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn ExclusiveGatewayType> for SubConversation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SubConversation {}
impl Cast<dyn ExpressionType> for SubConversation {}
impl Cast<dyn ExpressionTypeMut> for SubConversation {}
impl Cast<dyn ExtensionType> for SubConversation {}
impl Cast<dyn ExtensionTypeMut> for SubConversation {}
impl Cast<dyn ExtensionElementsType> for SubConversation {}
impl Cast<dyn ExtensionElementsTypeMut> for SubConversation {}
impl Cast<dyn FlowElementType> for SubConversation {}
impl Cast<dyn FlowElementTypeMut> for SubConversation {}
impl Cast<dyn FlowNodeType> for SubConversation {}
impl Cast<dyn FlowNodeTypeMut> for SubConversation {}
impl Cast<dyn FormalExpressionType> for SubConversation {}
impl Cast<dyn FormalExpressionTypeMut> for SubConversation {}
impl Cast<dyn GatewayType> for SubConversation {}
impl Cast<dyn GatewayTypeMut> for SubConversation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SubConversation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SubConversation {}
impl Cast<dyn GlobalChoreographyTaskType> for SubConversation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SubConversation {}
impl Cast<dyn GlobalConversationType> for SubConversation {}
impl Cast<dyn GlobalConversationTypeMut> for SubConversation {}
impl Cast<dyn GlobalManualTaskType> for SubConversation {}
impl Cast<dyn GlobalManualTaskTypeMut> for SubConversation {}
impl Cast<dyn GlobalScriptTaskType> for SubConversation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SubConversation {}
impl Cast<dyn GlobalTaskType> for SubConversation {}
impl Cast<dyn GlobalTaskTypeMut> for SubConversation {}
impl Cast<dyn GlobalUserTaskType> for SubConversation {}
impl Cast<dyn GlobalUserTaskTypeMut> for SubConversation {}
impl Cast<dyn GroupType> for SubConversation {}
impl Cast<dyn GroupTypeMut> for SubConversation {}
impl Cast<dyn HumanPerformerType> for SubConversation {}
impl Cast<dyn HumanPerformerTypeMut> for SubConversation {}
impl Cast<dyn ImplicitThrowEventType> for SubConversation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SubConversation {}
impl Cast<dyn InclusiveGatewayType> for SubConversation {}
impl Cast<dyn InclusiveGatewayTypeMut> for SubConversation {}
impl Cast<dyn InputSetType> for SubConversation {}
impl Cast<dyn InputSetTypeMut> for SubConversation {}
impl Cast<dyn InterfaceType> for SubConversation {}
impl Cast<dyn InterfaceTypeMut> for SubConversation {}
impl Cast<dyn IntermediateCatchEventType> for SubConversation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SubConversation {}
impl Cast<dyn IntermediateThrowEventType> for SubConversation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SubConversation {}
impl Cast<dyn InputOutputBindingType> for SubConversation {}
impl Cast<dyn InputOutputBindingTypeMut> for SubConversation {}
impl Cast<dyn InputOutputSpecificationType> for SubConversation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SubConversation {}
impl Cast<dyn ItemDefinitionType> for SubConversation {}
impl Cast<dyn ItemDefinitionTypeMut> for SubConversation {}
impl Cast<dyn LaneType> for SubConversation {}
impl Cast<dyn LaneTypeMut> for SubConversation {}
impl Cast<dyn LaneSetType> for SubConversation {}
impl Cast<dyn LaneSetTypeMut> for SubConversation {}
impl Cast<dyn LinkEventDefinitionType> for SubConversation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn LoopCharacteristicsType> for SubConversation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SubConversation {}
impl Cast<dyn ManualTaskType> for SubConversation {}
impl Cast<dyn ManualTaskTypeMut> for SubConversation {}
impl Cast<dyn MessageType> for SubConversation {}
impl Cast<dyn MessageTypeMut> for SubConversation {}
impl Cast<dyn MessageEventDefinitionType> for SubConversation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn MessageFlowType> for SubConversation {}
impl Cast<dyn MessageFlowTypeMut> for SubConversation {}
impl Cast<dyn MessageFlowAssociationType> for SubConversation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SubConversation {}
impl Cast<dyn MonitoringType> for SubConversation {}
impl Cast<dyn MonitoringTypeMut> for SubConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SubConversation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SubConversation {}
impl Cast<dyn OperationType> for SubConversation {}
impl Cast<dyn OperationTypeMut> for SubConversation {}
impl Cast<dyn OutputSetType> for SubConversation {}
impl Cast<dyn OutputSetTypeMut> for SubConversation {}
impl Cast<dyn ParallelGatewayType> for SubConversation {}
impl Cast<dyn ParallelGatewayTypeMut> for SubConversation {}
impl Cast<dyn ParticipantType> for SubConversation {}
impl Cast<dyn ParticipantTypeMut> for SubConversation {}
impl Cast<dyn ParticipantAssociationType> for SubConversation {}
impl Cast<dyn ParticipantAssociationTypeMut> for SubConversation {}
impl Cast<dyn ParticipantMultiplicityType> for SubConversation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SubConversation {}
impl Cast<dyn PartnerEntityType> for SubConversation {}
impl Cast<dyn PartnerEntityTypeMut> for SubConversation {}
impl Cast<dyn PartnerRoleType> for SubConversation {}
impl Cast<dyn PartnerRoleTypeMut> for SubConversation {}
impl Cast<dyn PerformerType> for SubConversation {}
impl Cast<dyn PerformerTypeMut> for SubConversation {}
impl Cast<dyn PotentialOwnerType> for SubConversation {}
impl Cast<dyn PotentialOwnerTypeMut> for SubConversation {}
impl Cast<dyn ProcessType> for SubConversation {}
impl Cast<dyn ProcessTypeMut> for SubConversation {}
impl Cast<dyn PropertyType> for SubConversation {}
impl Cast<dyn PropertyTypeMut> for SubConversation {}
impl Cast<dyn ReceiveTaskType> for SubConversation {}
impl Cast<dyn ReceiveTaskTypeMut> for SubConversation {}
impl Cast<dyn RelationshipType> for SubConversation {}
impl Cast<dyn RelationshipTypeMut> for SubConversation {}
impl Cast<dyn RenderingType> for SubConversation {}
impl Cast<dyn RenderingTypeMut> for SubConversation {}
impl Cast<dyn ResourceType> for SubConversation {}
impl Cast<dyn ResourceTypeMut> for SubConversation {}
impl Cast<dyn ResourceAssignmentExpressionType> for SubConversation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SubConversation {}
impl Cast<dyn ResourceParameterType> for SubConversation {}
impl Cast<dyn ResourceParameterTypeMut> for SubConversation {}
impl Cast<dyn ResourceParameterBindingType> for SubConversation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SubConversation {}
impl Cast<dyn ResourceRoleType> for SubConversation {}
impl Cast<dyn ResourceRoleTypeMut> for SubConversation {}
impl Cast<dyn RootElementType> for SubConversation {}
impl Cast<dyn RootElementTypeMut> for SubConversation {}
impl Cast<dyn ScriptTaskType> for SubConversation {}
impl Cast<dyn ScriptTaskTypeMut> for SubConversation {}
impl Cast<dyn ScriptType> for SubConversation {}
impl Cast<dyn ScriptTypeMut> for SubConversation {}
impl Cast<dyn SendTaskType> for SubConversation {}
impl Cast<dyn SendTaskTypeMut> for SubConversation {}
impl Cast<dyn SequenceFlowType> for SubConversation {}
impl Cast<dyn SequenceFlowTypeMut> for SubConversation {}
impl Cast<dyn ServiceTaskType> for SubConversation {}
impl Cast<dyn ServiceTaskTypeMut> for SubConversation {}
impl Cast<dyn SignalType> for SubConversation {}
impl Cast<dyn SignalTypeMut> for SubConversation {}
impl Cast<dyn SignalEventDefinitionType> for SubConversation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn StandardLoopCharacteristicsType> for SubConversation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SubConversation {}
impl Cast<dyn StartEventType> for SubConversation {}
impl Cast<dyn StartEventTypeMut> for SubConversation {}
impl Cast<dyn SubChoreographyType> for SubConversation {}
impl Cast<dyn SubChoreographyTypeMut> for SubConversation {}
impl Cast<dyn SubConversationType> for SubConversation {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubConversationTypeMut> for SubConversation {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubProcessType> for SubConversation {}
impl Cast<dyn SubProcessTypeMut> for SubConversation {}
impl Cast<dyn TaskType> for SubConversation {}
impl Cast<dyn TaskTypeMut> for SubConversation {}
impl Cast<dyn TerminateEventDefinitionType> for SubConversation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn TextAnnotationType> for SubConversation {}
impl Cast<dyn TextAnnotationTypeMut> for SubConversation {}
impl Cast<dyn TextType> for SubConversation {}
impl Cast<dyn TextTypeMut> for SubConversation {}
impl Cast<dyn ThrowEventType> for SubConversation {}
impl Cast<dyn ThrowEventTypeMut> for SubConversation {}
impl Cast<dyn TimerEventDefinitionType> for SubConversation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SubConversation {}
impl Cast<dyn TransactionType> for SubConversation {}
impl Cast<dyn TransactionTypeMut> for SubConversation {}
impl Cast<dyn UserTaskType> for SubConversation {}
impl Cast<dyn UserTaskTypeMut> for SubConversation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:subProcess")]
pub struct SubProcess {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "triggeredByEvent")]
    #[tia("SubProcessType",rg*="triggered_byevent","SubProcessTypeMut",s)]
    pub triggered_byevent: Option<bool>,
    #[xml(child = "bpmn:laneSet")]
    #[tia("SubProcessType",rg*="lane_sets","SubProcessTypeMut",s,rmg*="lane_sets_mut")]
    pub lane_sets: Vec<LaneSet>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("SubProcessType",rg*="flow_elements","SubProcessTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("SubProcessType",rg*="artifacts","SubProcessTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
}
impl DocumentElement for SubProcess {
    fn element(&self) -> Element {
        Element::SubProcess
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for SubProcess {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.lane_sets.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.flow_elements.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.lane_sets.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.flow_elements.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.artifacts.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits

//

/// Access to `subProcess`
pub trait SubProcessType: ActivityType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `triggeredByEvent`
    fn triggered_byevent(&self) -> &Option<bool>;
    /// Get value of `laneSet` child
    fn lane_sets(&self) -> &Vec<LaneSet>;
    /// Get value of `flowElement` child
    fn flow_elements(&self) -> &Vec<FlowElement>;
    /// Get value of `artifact` child
    fn artifacts(&self) -> &Vec<Artifact>;
}
dyn_clone::clone_trait_object!(SubProcessType);
impl_downcast!(SubProcessType);
/// Mutable access to `subProcess`
pub trait SubProcessTypeMut:
    ActivityTypeMut + Downcast + Debug + Send + DynClone + SubProcessType
{
    /// Set value of attribute `triggeredByEvent`
    fn set_triggered_byevent(&mut self, value: Option<bool>);
    /// Get a mutable value of `laneSet` child
    fn lane_sets_mut(&mut self) -> &mut Vec<LaneSet>;
    /// Set value of `laneSet` child
    fn set_lane_sets(&mut self, value: Vec<LaneSet>);
    /// Get a mutable value of `flowElement` child
    fn flow_elements_mut(&mut self) -> &mut Vec<FlowElement>;
    /// Set value of `flowElement` child
    fn set_flow_elements(&mut self, value: Vec<FlowElement>);
    /// Get a mutable value of `artifact` child
    fn artifacts_mut(&mut self) -> &mut Vec<Artifact>;
    /// Set value of `artifact` child
    fn set_artifacts(&mut self, value: Vec<Artifact>);
}
dyn_clone::clone_trait_object!(SubProcessTypeMut);
impl_downcast!(SubProcessTypeMut);
impl Cast<dyn DefinitionsType> for SubProcess {}
impl Cast<dyn DefinitionsTypeMut> for SubProcess {}
impl Cast<dyn ImportType> for SubProcess {}
impl Cast<dyn ImportTypeMut> for SubProcess {}
impl Cast<dyn ActivityType> for SubProcess {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for SubProcess {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for SubProcess {}
impl Cast<dyn AdHocSubProcessTypeMut> for SubProcess {}
impl Cast<dyn ArtifactType> for SubProcess {}
impl Cast<dyn ArtifactTypeMut> for SubProcess {}
impl Cast<dyn AssignmentType> for SubProcess {}
impl Cast<dyn AssignmentTypeMut> for SubProcess {}
impl Cast<dyn AssociationType> for SubProcess {}
impl Cast<dyn AssociationTypeMut> for SubProcess {}
impl Cast<dyn AuditingType> for SubProcess {}
impl Cast<dyn AuditingTypeMut> for SubProcess {}
impl Cast<dyn BaseElementType> for SubProcess {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for SubProcess {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for SubProcess {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for SubProcess {}
impl Cast<dyn BoundaryEventType> for SubProcess {}
impl Cast<dyn BoundaryEventTypeMut> for SubProcess {}
impl Cast<dyn BusinessRuleTaskType> for SubProcess {}
impl Cast<dyn BusinessRuleTaskTypeMut> for SubProcess {}
impl Cast<dyn CallableElementType> for SubProcess {}
impl Cast<dyn CallableElementTypeMut> for SubProcess {}
impl Cast<dyn CallActivityType> for SubProcess {}
impl Cast<dyn CallActivityTypeMut> for SubProcess {}
impl Cast<dyn CallChoreographyType> for SubProcess {}
impl Cast<dyn CallChoreographyTypeMut> for SubProcess {}
impl Cast<dyn CallConversationType> for SubProcess {}
impl Cast<dyn CallConversationTypeMut> for SubProcess {}
impl Cast<dyn CancelEventDefinitionType> for SubProcess {}
impl Cast<dyn CancelEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn CatchEventType> for SubProcess {}
impl Cast<dyn CatchEventTypeMut> for SubProcess {}
impl Cast<dyn CategoryType> for SubProcess {}
impl Cast<dyn CategoryTypeMut> for SubProcess {}
impl Cast<dyn CategoryValueType> for SubProcess {}
impl Cast<dyn CategoryValueTypeMut> for SubProcess {}
impl Cast<dyn ChoreographyType> for SubProcess {}
impl Cast<dyn ChoreographyTypeMut> for SubProcess {}
impl Cast<dyn ChoreographyActivityType> for SubProcess {}
impl Cast<dyn ChoreographyActivityTypeMut> for SubProcess {}
impl Cast<dyn ChoreographyTaskType> for SubProcess {}
impl Cast<dyn ChoreographyTaskTypeMut> for SubProcess {}
impl Cast<dyn CollaborationType> for SubProcess {}
impl Cast<dyn CollaborationTypeMut> for SubProcess {}
impl Cast<dyn CompensateEventDefinitionType> for SubProcess {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn ComplexBehaviorDefinitionType> for SubProcess {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for SubProcess {}
impl Cast<dyn ComplexGatewayType> for SubProcess {}
impl Cast<dyn ComplexGatewayTypeMut> for SubProcess {}
impl Cast<dyn ConditionalEventDefinitionType> for SubProcess {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn ConversationType> for SubProcess {}
impl Cast<dyn ConversationTypeMut> for SubProcess {}
impl Cast<dyn ConversationAssociationType> for SubProcess {}
impl Cast<dyn ConversationAssociationTypeMut> for SubProcess {}
impl Cast<dyn ConversationLinkType> for SubProcess {}
impl Cast<dyn ConversationLinkTypeMut> for SubProcess {}
impl Cast<dyn ConversationNodeType> for SubProcess {}
impl Cast<dyn ConversationNodeTypeMut> for SubProcess {}
impl Cast<dyn CorrelationKeyType> for SubProcess {}
impl Cast<dyn CorrelationKeyTypeMut> for SubProcess {}
impl Cast<dyn CorrelationPropertyType> for SubProcess {}
impl Cast<dyn CorrelationPropertyTypeMut> for SubProcess {}
impl Cast<dyn CorrelationPropertyBindingType> for SubProcess {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for SubProcess {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for SubProcess {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for SubProcess {}
impl Cast<dyn CorrelationSubscriptionType> for SubProcess {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for SubProcess {}
impl Cast<dyn DataAssociationType> for SubProcess {}
impl Cast<dyn DataAssociationTypeMut> for SubProcess {}
impl Cast<dyn DataInputType> for SubProcess {}
impl Cast<dyn DataInputTypeMut> for SubProcess {}
impl Cast<dyn DataInputAssociationType> for SubProcess {}
impl Cast<dyn DataInputAssociationTypeMut> for SubProcess {}
impl Cast<dyn DataObjectType> for SubProcess {}
impl Cast<dyn DataObjectTypeMut> for SubProcess {}
impl Cast<dyn DataObjectReferenceType> for SubProcess {}
impl Cast<dyn DataObjectReferenceTypeMut> for SubProcess {}
impl Cast<dyn DataOutputType> for SubProcess {}
impl Cast<dyn DataOutputTypeMut> for SubProcess {}
impl Cast<dyn DataOutputAssociationType> for SubProcess {}
impl Cast<dyn DataOutputAssociationTypeMut> for SubProcess {}
impl Cast<dyn DataStateType> for SubProcess {}
impl Cast<dyn DataStateTypeMut> for SubProcess {}
impl Cast<dyn DataStoreType> for SubProcess {}
impl Cast<dyn DataStoreTypeMut> for SubProcess {}
impl Cast<dyn DataStoreReferenceType> for SubProcess {}
impl Cast<dyn DataStoreReferenceTypeMut> for SubProcess {}
impl Cast<dyn DocumentationType> for SubProcess {}
impl Cast<dyn DocumentationTypeMut> for SubProcess {}
impl Cast<dyn EndEventType> for SubProcess {}
impl Cast<dyn EndEventTypeMut> for SubProcess {}
impl Cast<dyn EndPointType> for SubProcess {}
impl Cast<dyn EndPointTypeMut> for SubProcess {}
impl Cast<dyn ErrorType> for SubProcess {}
impl Cast<dyn ErrorTypeMut> for SubProcess {}
impl Cast<dyn ErrorEventDefinitionType> for SubProcess {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn EscalationType> for SubProcess {}
impl Cast<dyn EscalationTypeMut> for SubProcess {}
impl Cast<dyn EscalationEventDefinitionType> for SubProcess {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn EventType> for SubProcess {}
impl Cast<dyn EventTypeMut> for SubProcess {}
impl Cast<dyn EventBasedGatewayType> for SubProcess {}
impl Cast<dyn EventBasedGatewayTypeMut> for SubProcess {}
impl Cast<dyn EventDefinitionType> for SubProcess {}
impl Cast<dyn EventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn ExclusiveGatewayType> for SubProcess {}
impl Cast<dyn ExclusiveGatewayTypeMut> for SubProcess {}
impl Cast<dyn ExpressionType> for SubProcess {}
impl Cast<dyn ExpressionTypeMut> for SubProcess {}
impl Cast<dyn ExtensionType> for SubProcess {}
impl Cast<dyn ExtensionTypeMut> for SubProcess {}
impl Cast<dyn ExtensionElementsType> for SubProcess {}
impl Cast<dyn ExtensionElementsTypeMut> for SubProcess {}
impl Cast<dyn FlowElementType> for SubProcess {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for SubProcess {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for SubProcess {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for SubProcess {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for SubProcess {}
impl Cast<dyn FormalExpressionTypeMut> for SubProcess {}
impl Cast<dyn GatewayType> for SubProcess {}
impl Cast<dyn GatewayTypeMut> for SubProcess {}
impl Cast<dyn GlobalBusinessRuleTaskType> for SubProcess {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for SubProcess {}
impl Cast<dyn GlobalChoreographyTaskType> for SubProcess {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for SubProcess {}
impl Cast<dyn GlobalConversationType> for SubProcess {}
impl Cast<dyn GlobalConversationTypeMut> for SubProcess {}
impl Cast<dyn GlobalManualTaskType> for SubProcess {}
impl Cast<dyn GlobalManualTaskTypeMut> for SubProcess {}
impl Cast<dyn GlobalScriptTaskType> for SubProcess {}
impl Cast<dyn GlobalScriptTaskTypeMut> for SubProcess {}
impl Cast<dyn GlobalTaskType> for SubProcess {}
impl Cast<dyn GlobalTaskTypeMut> for SubProcess {}
impl Cast<dyn GlobalUserTaskType> for SubProcess {}
impl Cast<dyn GlobalUserTaskTypeMut> for SubProcess {}
impl Cast<dyn GroupType> for SubProcess {}
impl Cast<dyn GroupTypeMut> for SubProcess {}
impl Cast<dyn HumanPerformerType> for SubProcess {}
impl Cast<dyn HumanPerformerTypeMut> for SubProcess {}
impl Cast<dyn ImplicitThrowEventType> for SubProcess {}
impl Cast<dyn ImplicitThrowEventTypeMut> for SubProcess {}
impl Cast<dyn InclusiveGatewayType> for SubProcess {}
impl Cast<dyn InclusiveGatewayTypeMut> for SubProcess {}
impl Cast<dyn InputSetType> for SubProcess {}
impl Cast<dyn InputSetTypeMut> for SubProcess {}
impl Cast<dyn InterfaceType> for SubProcess {}
impl Cast<dyn InterfaceTypeMut> for SubProcess {}
impl Cast<dyn IntermediateCatchEventType> for SubProcess {}
impl Cast<dyn IntermediateCatchEventTypeMut> for SubProcess {}
impl Cast<dyn IntermediateThrowEventType> for SubProcess {}
impl Cast<dyn IntermediateThrowEventTypeMut> for SubProcess {}
impl Cast<dyn InputOutputBindingType> for SubProcess {}
impl Cast<dyn InputOutputBindingTypeMut> for SubProcess {}
impl Cast<dyn InputOutputSpecificationType> for SubProcess {}
impl Cast<dyn InputOutputSpecificationTypeMut> for SubProcess {}
impl Cast<dyn ItemDefinitionType> for SubProcess {}
impl Cast<dyn ItemDefinitionTypeMut> for SubProcess {}
impl Cast<dyn LaneType> for SubProcess {}
impl Cast<dyn LaneTypeMut> for SubProcess {}
impl Cast<dyn LaneSetType> for SubProcess {}
impl Cast<dyn LaneSetTypeMut> for SubProcess {}
impl Cast<dyn LinkEventDefinitionType> for SubProcess {}
impl Cast<dyn LinkEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn LoopCharacteristicsType> for SubProcess {}
impl Cast<dyn LoopCharacteristicsTypeMut> for SubProcess {}
impl Cast<dyn ManualTaskType> for SubProcess {}
impl Cast<dyn ManualTaskTypeMut> for SubProcess {}
impl Cast<dyn MessageType> for SubProcess {}
impl Cast<dyn MessageTypeMut> for SubProcess {}
impl Cast<dyn MessageEventDefinitionType> for SubProcess {}
impl Cast<dyn MessageEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn MessageFlowType> for SubProcess {}
impl Cast<dyn MessageFlowTypeMut> for SubProcess {}
impl Cast<dyn MessageFlowAssociationType> for SubProcess {}
impl Cast<dyn MessageFlowAssociationTypeMut> for SubProcess {}
impl Cast<dyn MonitoringType> for SubProcess {}
impl Cast<dyn MonitoringTypeMut> for SubProcess {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for SubProcess {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for SubProcess {}
impl Cast<dyn OperationType> for SubProcess {}
impl Cast<dyn OperationTypeMut> for SubProcess {}
impl Cast<dyn OutputSetType> for SubProcess {}
impl Cast<dyn OutputSetTypeMut> for SubProcess {}
impl Cast<dyn ParallelGatewayType> for SubProcess {}
impl Cast<dyn ParallelGatewayTypeMut> for SubProcess {}
impl Cast<dyn ParticipantType> for SubProcess {}
impl Cast<dyn ParticipantTypeMut> for SubProcess {}
impl Cast<dyn ParticipantAssociationType> for SubProcess {}
impl Cast<dyn ParticipantAssociationTypeMut> for SubProcess {}
impl Cast<dyn ParticipantMultiplicityType> for SubProcess {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for SubProcess {}
impl Cast<dyn PartnerEntityType> for SubProcess {}
impl Cast<dyn PartnerEntityTypeMut> for SubProcess {}
impl Cast<dyn PartnerRoleType> for SubProcess {}
impl Cast<dyn PartnerRoleTypeMut> for SubProcess {}
impl Cast<dyn PerformerType> for SubProcess {}
impl Cast<dyn PerformerTypeMut> for SubProcess {}
impl Cast<dyn PotentialOwnerType> for SubProcess {}
impl Cast<dyn PotentialOwnerTypeMut> for SubProcess {}
impl Cast<dyn ProcessType> for SubProcess {}
impl Cast<dyn ProcessTypeMut> for SubProcess {}
impl Cast<dyn PropertyType> for SubProcess {}
impl Cast<dyn PropertyTypeMut> for SubProcess {}
impl Cast<dyn ReceiveTaskType> for SubProcess {}
impl Cast<dyn ReceiveTaskTypeMut> for SubProcess {}
impl Cast<dyn RelationshipType> for SubProcess {}
impl Cast<dyn RelationshipTypeMut> for SubProcess {}
impl Cast<dyn RenderingType> for SubProcess {}
impl Cast<dyn RenderingTypeMut> for SubProcess {}
impl Cast<dyn ResourceType> for SubProcess {}
impl Cast<dyn ResourceTypeMut> for SubProcess {}
impl Cast<dyn ResourceAssignmentExpressionType> for SubProcess {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for SubProcess {}
impl Cast<dyn ResourceParameterType> for SubProcess {}
impl Cast<dyn ResourceParameterTypeMut> for SubProcess {}
impl Cast<dyn ResourceParameterBindingType> for SubProcess {}
impl Cast<dyn ResourceParameterBindingTypeMut> for SubProcess {}
impl Cast<dyn ResourceRoleType> for SubProcess {}
impl Cast<dyn ResourceRoleTypeMut> for SubProcess {}
impl Cast<dyn RootElementType> for SubProcess {}
impl Cast<dyn RootElementTypeMut> for SubProcess {}
impl Cast<dyn ScriptTaskType> for SubProcess {}
impl Cast<dyn ScriptTaskTypeMut> for SubProcess {}
impl Cast<dyn ScriptType> for SubProcess {}
impl Cast<dyn ScriptTypeMut> for SubProcess {}
impl Cast<dyn SendTaskType> for SubProcess {}
impl Cast<dyn SendTaskTypeMut> for SubProcess {}
impl Cast<dyn SequenceFlowType> for SubProcess {}
impl Cast<dyn SequenceFlowTypeMut> for SubProcess {}
impl Cast<dyn ServiceTaskType> for SubProcess {}
impl Cast<dyn ServiceTaskTypeMut> for SubProcess {}
impl Cast<dyn SignalType> for SubProcess {}
impl Cast<dyn SignalTypeMut> for SubProcess {}
impl Cast<dyn SignalEventDefinitionType> for SubProcess {}
impl Cast<dyn SignalEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn StandardLoopCharacteristicsType> for SubProcess {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for SubProcess {}
impl Cast<dyn StartEventType> for SubProcess {}
impl Cast<dyn StartEventTypeMut> for SubProcess {}
impl Cast<dyn SubChoreographyType> for SubProcess {}
impl Cast<dyn SubChoreographyTypeMut> for SubProcess {}
impl Cast<dyn SubConversationType> for SubProcess {}
impl Cast<dyn SubConversationTypeMut> for SubProcess {}
impl Cast<dyn SubProcessType> for SubProcess {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubProcessTypeMut> for SubProcess {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskType> for SubProcess {}
impl Cast<dyn TaskTypeMut> for SubProcess {}
impl Cast<dyn TerminateEventDefinitionType> for SubProcess {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn TextAnnotationType> for SubProcess {}
impl Cast<dyn TextAnnotationTypeMut> for SubProcess {}
impl Cast<dyn TextType> for SubProcess {}
impl Cast<dyn TextTypeMut> for SubProcess {}
impl Cast<dyn ThrowEventType> for SubProcess {}
impl Cast<dyn ThrowEventTypeMut> for SubProcess {}
impl Cast<dyn TimerEventDefinitionType> for SubProcess {}
impl Cast<dyn TimerEventDefinitionTypeMut> for SubProcess {}
impl Cast<dyn TransactionType> for SubProcess {}
impl Cast<dyn TransactionTypeMut> for SubProcess {}
impl Cast<dyn UserTaskType> for SubProcess {}
impl Cast<dyn UserTaskTypeMut> for SubProcess {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:task")]
pub struct Task {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
}
impl DocumentElement for Task {
    fn element(&self) -> Element {
        Element::Task
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Task {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TaskType for Task {}
impl TaskTypeMut for Task {}
//

/// Access to `task`
pub trait TaskType: ActivityType + Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(TaskType);
impl_downcast!(TaskType);
/// Mutable access to `task`
pub trait TaskTypeMut: ActivityTypeMut + Downcast + Debug + Send + DynClone + TaskType {}
dyn_clone::clone_trait_object!(TaskTypeMut);
impl_downcast!(TaskTypeMut);
impl Cast<dyn DefinitionsType> for Task {}
impl Cast<dyn DefinitionsTypeMut> for Task {}
impl Cast<dyn ImportType> for Task {}
impl Cast<dyn ImportTypeMut> for Task {}
impl Cast<dyn ActivityType> for Task {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for Task {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for Task {}
impl Cast<dyn AdHocSubProcessTypeMut> for Task {}
impl Cast<dyn ArtifactType> for Task {}
impl Cast<dyn ArtifactTypeMut> for Task {}
impl Cast<dyn AssignmentType> for Task {}
impl Cast<dyn AssignmentTypeMut> for Task {}
impl Cast<dyn AssociationType> for Task {}
impl Cast<dyn AssociationTypeMut> for Task {}
impl Cast<dyn AuditingType> for Task {}
impl Cast<dyn AuditingTypeMut> for Task {}
impl Cast<dyn BaseElementType> for Task {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Task {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Task {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Task {}
impl Cast<dyn BoundaryEventType> for Task {}
impl Cast<dyn BoundaryEventTypeMut> for Task {}
impl Cast<dyn BusinessRuleTaskType> for Task {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Task {}
impl Cast<dyn CallableElementType> for Task {}
impl Cast<dyn CallableElementTypeMut> for Task {}
impl Cast<dyn CallActivityType> for Task {}
impl Cast<dyn CallActivityTypeMut> for Task {}
impl Cast<dyn CallChoreographyType> for Task {}
impl Cast<dyn CallChoreographyTypeMut> for Task {}
impl Cast<dyn CallConversationType> for Task {}
impl Cast<dyn CallConversationTypeMut> for Task {}
impl Cast<dyn CancelEventDefinitionType> for Task {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Task {}
impl Cast<dyn CatchEventType> for Task {}
impl Cast<dyn CatchEventTypeMut> for Task {}
impl Cast<dyn CategoryType> for Task {}
impl Cast<dyn CategoryTypeMut> for Task {}
impl Cast<dyn CategoryValueType> for Task {}
impl Cast<dyn CategoryValueTypeMut> for Task {}
impl Cast<dyn ChoreographyType> for Task {}
impl Cast<dyn ChoreographyTypeMut> for Task {}
impl Cast<dyn ChoreographyActivityType> for Task {}
impl Cast<dyn ChoreographyActivityTypeMut> for Task {}
impl Cast<dyn ChoreographyTaskType> for Task {}
impl Cast<dyn ChoreographyTaskTypeMut> for Task {}
impl Cast<dyn CollaborationType> for Task {}
impl Cast<dyn CollaborationTypeMut> for Task {}
impl Cast<dyn CompensateEventDefinitionType> for Task {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Task {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Task {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Task {}
impl Cast<dyn ComplexGatewayType> for Task {}
impl Cast<dyn ComplexGatewayTypeMut> for Task {}
impl Cast<dyn ConditionalEventDefinitionType> for Task {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Task {}
impl Cast<dyn ConversationType> for Task {}
impl Cast<dyn ConversationTypeMut> for Task {}
impl Cast<dyn ConversationAssociationType> for Task {}
impl Cast<dyn ConversationAssociationTypeMut> for Task {}
impl Cast<dyn ConversationLinkType> for Task {}
impl Cast<dyn ConversationLinkTypeMut> for Task {}
impl Cast<dyn ConversationNodeType> for Task {}
impl Cast<dyn ConversationNodeTypeMut> for Task {}
impl Cast<dyn CorrelationKeyType> for Task {}
impl Cast<dyn CorrelationKeyTypeMut> for Task {}
impl Cast<dyn CorrelationPropertyType> for Task {}
impl Cast<dyn CorrelationPropertyTypeMut> for Task {}
impl Cast<dyn CorrelationPropertyBindingType> for Task {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Task {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Task {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Task {}
impl Cast<dyn CorrelationSubscriptionType> for Task {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Task {}
impl Cast<dyn DataAssociationType> for Task {}
impl Cast<dyn DataAssociationTypeMut> for Task {}
impl Cast<dyn DataInputType> for Task {}
impl Cast<dyn DataInputTypeMut> for Task {}
impl Cast<dyn DataInputAssociationType> for Task {}
impl Cast<dyn DataInputAssociationTypeMut> for Task {}
impl Cast<dyn DataObjectType> for Task {}
impl Cast<dyn DataObjectTypeMut> for Task {}
impl Cast<dyn DataObjectReferenceType> for Task {}
impl Cast<dyn DataObjectReferenceTypeMut> for Task {}
impl Cast<dyn DataOutputType> for Task {}
impl Cast<dyn DataOutputTypeMut> for Task {}
impl Cast<dyn DataOutputAssociationType> for Task {}
impl Cast<dyn DataOutputAssociationTypeMut> for Task {}
impl Cast<dyn DataStateType> for Task {}
impl Cast<dyn DataStateTypeMut> for Task {}
impl Cast<dyn DataStoreType> for Task {}
impl Cast<dyn DataStoreTypeMut> for Task {}
impl Cast<dyn DataStoreReferenceType> for Task {}
impl Cast<dyn DataStoreReferenceTypeMut> for Task {}
impl Cast<dyn DocumentationType> for Task {}
impl Cast<dyn DocumentationTypeMut> for Task {}
impl Cast<dyn EndEventType> for Task {}
impl Cast<dyn EndEventTypeMut> for Task {}
impl Cast<dyn EndPointType> for Task {}
impl Cast<dyn EndPointTypeMut> for Task {}
impl Cast<dyn ErrorType> for Task {}
impl Cast<dyn ErrorTypeMut> for Task {}
impl Cast<dyn ErrorEventDefinitionType> for Task {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Task {}
impl Cast<dyn EscalationType> for Task {}
impl Cast<dyn EscalationTypeMut> for Task {}
impl Cast<dyn EscalationEventDefinitionType> for Task {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Task {}
impl Cast<dyn EventType> for Task {}
impl Cast<dyn EventTypeMut> for Task {}
impl Cast<dyn EventBasedGatewayType> for Task {}
impl Cast<dyn EventBasedGatewayTypeMut> for Task {}
impl Cast<dyn EventDefinitionType> for Task {}
impl Cast<dyn EventDefinitionTypeMut> for Task {}
impl Cast<dyn ExclusiveGatewayType> for Task {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Task {}
impl Cast<dyn ExpressionType> for Task {}
impl Cast<dyn ExpressionTypeMut> for Task {}
impl Cast<dyn ExtensionType> for Task {}
impl Cast<dyn ExtensionTypeMut> for Task {}
impl Cast<dyn ExtensionElementsType> for Task {}
impl Cast<dyn ExtensionElementsTypeMut> for Task {}
impl Cast<dyn FlowElementType> for Task {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for Task {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for Task {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for Task {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for Task {}
impl Cast<dyn FormalExpressionTypeMut> for Task {}
impl Cast<dyn GatewayType> for Task {}
impl Cast<dyn GatewayTypeMut> for Task {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Task {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Task {}
impl Cast<dyn GlobalChoreographyTaskType> for Task {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Task {}
impl Cast<dyn GlobalConversationType> for Task {}
impl Cast<dyn GlobalConversationTypeMut> for Task {}
impl Cast<dyn GlobalManualTaskType> for Task {}
impl Cast<dyn GlobalManualTaskTypeMut> for Task {}
impl Cast<dyn GlobalScriptTaskType> for Task {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Task {}
impl Cast<dyn GlobalTaskType> for Task {}
impl Cast<dyn GlobalTaskTypeMut> for Task {}
impl Cast<dyn GlobalUserTaskType> for Task {}
impl Cast<dyn GlobalUserTaskTypeMut> for Task {}
impl Cast<dyn GroupType> for Task {}
impl Cast<dyn GroupTypeMut> for Task {}
impl Cast<dyn HumanPerformerType> for Task {}
impl Cast<dyn HumanPerformerTypeMut> for Task {}
impl Cast<dyn ImplicitThrowEventType> for Task {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Task {}
impl Cast<dyn InclusiveGatewayType> for Task {}
impl Cast<dyn InclusiveGatewayTypeMut> for Task {}
impl Cast<dyn InputSetType> for Task {}
impl Cast<dyn InputSetTypeMut> for Task {}
impl Cast<dyn InterfaceType> for Task {}
impl Cast<dyn InterfaceTypeMut> for Task {}
impl Cast<dyn IntermediateCatchEventType> for Task {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Task {}
impl Cast<dyn IntermediateThrowEventType> for Task {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Task {}
impl Cast<dyn InputOutputBindingType> for Task {}
impl Cast<dyn InputOutputBindingTypeMut> for Task {}
impl Cast<dyn InputOutputSpecificationType> for Task {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Task {}
impl Cast<dyn ItemDefinitionType> for Task {}
impl Cast<dyn ItemDefinitionTypeMut> for Task {}
impl Cast<dyn LaneType> for Task {}
impl Cast<dyn LaneTypeMut> for Task {}
impl Cast<dyn LaneSetType> for Task {}
impl Cast<dyn LaneSetTypeMut> for Task {}
impl Cast<dyn LinkEventDefinitionType> for Task {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Task {}
impl Cast<dyn LoopCharacteristicsType> for Task {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Task {}
impl Cast<dyn ManualTaskType> for Task {}
impl Cast<dyn ManualTaskTypeMut> for Task {}
impl Cast<dyn MessageType> for Task {}
impl Cast<dyn MessageTypeMut> for Task {}
impl Cast<dyn MessageEventDefinitionType> for Task {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Task {}
impl Cast<dyn MessageFlowType> for Task {}
impl Cast<dyn MessageFlowTypeMut> for Task {}
impl Cast<dyn MessageFlowAssociationType> for Task {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Task {}
impl Cast<dyn MonitoringType> for Task {}
impl Cast<dyn MonitoringTypeMut> for Task {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Task {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Task {}
impl Cast<dyn OperationType> for Task {}
impl Cast<dyn OperationTypeMut> for Task {}
impl Cast<dyn OutputSetType> for Task {}
impl Cast<dyn OutputSetTypeMut> for Task {}
impl Cast<dyn ParallelGatewayType> for Task {}
impl Cast<dyn ParallelGatewayTypeMut> for Task {}
impl Cast<dyn ParticipantType> for Task {}
impl Cast<dyn ParticipantTypeMut> for Task {}
impl Cast<dyn ParticipantAssociationType> for Task {}
impl Cast<dyn ParticipantAssociationTypeMut> for Task {}
impl Cast<dyn ParticipantMultiplicityType> for Task {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Task {}
impl Cast<dyn PartnerEntityType> for Task {}
impl Cast<dyn PartnerEntityTypeMut> for Task {}
impl Cast<dyn PartnerRoleType> for Task {}
impl Cast<dyn PartnerRoleTypeMut> for Task {}
impl Cast<dyn PerformerType> for Task {}
impl Cast<dyn PerformerTypeMut> for Task {}
impl Cast<dyn PotentialOwnerType> for Task {}
impl Cast<dyn PotentialOwnerTypeMut> for Task {}
impl Cast<dyn ProcessType> for Task {}
impl Cast<dyn ProcessTypeMut> for Task {}
impl Cast<dyn PropertyType> for Task {}
impl Cast<dyn PropertyTypeMut> for Task {}
impl Cast<dyn ReceiveTaskType> for Task {}
impl Cast<dyn ReceiveTaskTypeMut> for Task {}
impl Cast<dyn RelationshipType> for Task {}
impl Cast<dyn RelationshipTypeMut> for Task {}
impl Cast<dyn RenderingType> for Task {}
impl Cast<dyn RenderingTypeMut> for Task {}
impl Cast<dyn ResourceType> for Task {}
impl Cast<dyn ResourceTypeMut> for Task {}
impl Cast<dyn ResourceAssignmentExpressionType> for Task {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Task {}
impl Cast<dyn ResourceParameterType> for Task {}
impl Cast<dyn ResourceParameterTypeMut> for Task {}
impl Cast<dyn ResourceParameterBindingType> for Task {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Task {}
impl Cast<dyn ResourceRoleType> for Task {}
impl Cast<dyn ResourceRoleTypeMut> for Task {}
impl Cast<dyn RootElementType> for Task {}
impl Cast<dyn RootElementTypeMut> for Task {}
impl Cast<dyn ScriptTaskType> for Task {}
impl Cast<dyn ScriptTaskTypeMut> for Task {}
impl Cast<dyn ScriptType> for Task {}
impl Cast<dyn ScriptTypeMut> for Task {}
impl Cast<dyn SendTaskType> for Task {}
impl Cast<dyn SendTaskTypeMut> for Task {}
impl Cast<dyn SequenceFlowType> for Task {}
impl Cast<dyn SequenceFlowTypeMut> for Task {}
impl Cast<dyn ServiceTaskType> for Task {}
impl Cast<dyn ServiceTaskTypeMut> for Task {}
impl Cast<dyn SignalType> for Task {}
impl Cast<dyn SignalTypeMut> for Task {}
impl Cast<dyn SignalEventDefinitionType> for Task {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Task {}
impl Cast<dyn StandardLoopCharacteristicsType> for Task {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Task {}
impl Cast<dyn StartEventType> for Task {}
impl Cast<dyn StartEventTypeMut> for Task {}
impl Cast<dyn SubChoreographyType> for Task {}
impl Cast<dyn SubChoreographyTypeMut> for Task {}
impl Cast<dyn SubConversationType> for Task {}
impl Cast<dyn SubConversationTypeMut> for Task {}
impl Cast<dyn SubProcessType> for Task {}
impl Cast<dyn SubProcessTypeMut> for Task {}
impl Cast<dyn TaskType> for Task {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for Task {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for Task {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Task {}
impl Cast<dyn TextAnnotationType> for Task {}
impl Cast<dyn TextAnnotationTypeMut> for Task {}
impl Cast<dyn TextType> for Task {}
impl Cast<dyn TextTypeMut> for Task {}
impl Cast<dyn ThrowEventType> for Task {}
impl Cast<dyn ThrowEventTypeMut> for Task {}
impl Cast<dyn TimerEventDefinitionType> for Task {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Task {}
impl Cast<dyn TransactionType> for Task {}
impl Cast<dyn TransactionTypeMut> for Task {}
impl Cast<dyn UserTaskType> for Task {}
impl Cast<dyn UserTaskTypeMut> for Task {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:terminateEventDefinition")]
pub struct TerminateEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
}
impl DocumentElement for TerminateEventDefinition {
    fn element(&self) -> Element {
        Element::TerminateEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for TerminateEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits
impl TerminateEventDefinitionType for TerminateEventDefinition {}
impl TerminateEventDefinitionTypeMut for TerminateEventDefinition {}
impl EventDefinitionType for TerminateEventDefinition {}
impl EventDefinitionTypeMut for TerminateEventDefinition {}
impl RootElementType for TerminateEventDefinition {}
impl RootElementTypeMut for TerminateEventDefinition {}
//

/// Access to `terminateEventDefinition`
pub trait TerminateEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
}
dyn_clone::clone_trait_object!(TerminateEventDefinitionType);
impl_downcast!(TerminateEventDefinitionType);
/// Mutable access to `terminateEventDefinition`
pub trait TerminateEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + TerminateEventDefinitionType
{
}
dyn_clone::clone_trait_object!(TerminateEventDefinitionTypeMut);
impl_downcast!(TerminateEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for TerminateEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ImportType> for TerminateEventDefinition {}
impl Cast<dyn ImportTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ActivityType> for TerminateEventDefinition {}
impl Cast<dyn ActivityTypeMut> for TerminateEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for TerminateEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ArtifactType> for TerminateEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for TerminateEventDefinition {}
impl Cast<dyn AssignmentType> for TerminateEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for TerminateEventDefinition {}
impl Cast<dyn AssociationType> for TerminateEventDefinition {}
impl Cast<dyn AssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn AuditingType> for TerminateEventDefinition {}
impl Cast<dyn AuditingTypeMut> for TerminateEventDefinition {}
impl Cast<dyn BaseElementType> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for TerminateEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for TerminateEventDefinition {}
impl Cast<dyn BoundaryEventType> for TerminateEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for TerminateEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CallableElementType> for TerminateEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CallActivityType> for TerminateEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CallChoreographyType> for TerminateEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CallConversationType> for TerminateEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CatchEventType> for TerminateEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CategoryType> for TerminateEventDefinition {}
impl Cast<dyn CategoryTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CategoryValueType> for TerminateEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyType> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for TerminateEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CollaborationType> for TerminateEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ComplexGatewayType> for TerminateEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ConversationType> for TerminateEventDefinition {}
impl Cast<dyn ConversationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ConversationAssociationType> for TerminateEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ConversationLinkType> for TerminateEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ConversationNodeType> for TerminateEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CorrelationKeyType> for TerminateEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for TerminateEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for TerminateEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataAssociationType> for TerminateEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataInputType> for TerminateEventDefinition {}
impl Cast<dyn DataInputTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataInputAssociationType> for TerminateEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataObjectType> for TerminateEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for TerminateEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataOutputType> for TerminateEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for TerminateEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataStateType> for TerminateEventDefinition {}
impl Cast<dyn DataStateTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataStoreType> for TerminateEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for TerminateEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for TerminateEventDefinition {}
impl Cast<dyn DocumentationType> for TerminateEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EndEventType> for TerminateEventDefinition {}
impl Cast<dyn EndEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EndPointType> for TerminateEventDefinition {}
impl Cast<dyn EndPointTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ErrorType> for TerminateEventDefinition {}
impl Cast<dyn ErrorTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EscalationType> for TerminateEventDefinition {}
impl Cast<dyn EscalationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EventType> for TerminateEventDefinition {}
impl Cast<dyn EventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for TerminateEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn EventDefinitionType> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for TerminateEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ExpressionType> for TerminateEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ExtensionType> for TerminateEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ExtensionElementsType> for TerminateEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for TerminateEventDefinition {}
impl Cast<dyn FlowElementType> for TerminateEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for TerminateEventDefinition {}
impl Cast<dyn FlowNodeType> for TerminateEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for TerminateEventDefinition {}
impl Cast<dyn FormalExpressionType> for TerminateEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GatewayType> for TerminateEventDefinition {}
impl Cast<dyn GatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalConversationType> for TerminateEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for TerminateEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn GroupType> for TerminateEventDefinition {}
impl Cast<dyn GroupTypeMut> for TerminateEventDefinition {}
impl Cast<dyn HumanPerformerType> for TerminateEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for TerminateEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for TerminateEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn InputSetType> for TerminateEventDefinition {}
impl Cast<dyn InputSetTypeMut> for TerminateEventDefinition {}
impl Cast<dyn InterfaceType> for TerminateEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for TerminateEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for TerminateEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for TerminateEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn InputOutputBindingType> for TerminateEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for TerminateEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for TerminateEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ItemDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn LaneType> for TerminateEventDefinition {}
impl Cast<dyn LaneTypeMut> for TerminateEventDefinition {}
impl Cast<dyn LaneSetType> for TerminateEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for TerminateEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for TerminateEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ManualTaskType> for TerminateEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MessageType> for TerminateEventDefinition {}
impl Cast<dyn MessageTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MessageFlowType> for TerminateEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for TerminateEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MonitoringType> for TerminateEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for TerminateEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for TerminateEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for TerminateEventDefinition {}
impl Cast<dyn OperationType> for TerminateEventDefinition {}
impl Cast<dyn OperationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn OutputSetType> for TerminateEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ParallelGatewayType> for TerminateEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ParticipantType> for TerminateEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for TerminateEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for TerminateEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for TerminateEventDefinition {}
impl Cast<dyn PartnerEntityType> for TerminateEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for TerminateEventDefinition {}
impl Cast<dyn PartnerRoleType> for TerminateEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for TerminateEventDefinition {}
impl Cast<dyn PerformerType> for TerminateEventDefinition {}
impl Cast<dyn PerformerTypeMut> for TerminateEventDefinition {}
impl Cast<dyn PotentialOwnerType> for TerminateEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ProcessType> for TerminateEventDefinition {}
impl Cast<dyn ProcessTypeMut> for TerminateEventDefinition {}
impl Cast<dyn PropertyType> for TerminateEventDefinition {}
impl Cast<dyn PropertyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ReceiveTaskType> for TerminateEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn RelationshipType> for TerminateEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for TerminateEventDefinition {}
impl Cast<dyn RenderingType> for TerminateEventDefinition {}
impl Cast<dyn RenderingTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ResourceType> for TerminateEventDefinition {}
impl Cast<dyn ResourceTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for TerminateEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ResourceParameterType> for TerminateEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for TerminateEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ResourceRoleType> for TerminateEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for TerminateEventDefinition {}
impl Cast<dyn RootElementType> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for TerminateEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ScriptType> for TerminateEventDefinition {}
impl Cast<dyn ScriptTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SendTaskType> for TerminateEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SequenceFlowType> for TerminateEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ServiceTaskType> for TerminateEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SignalType> for TerminateEventDefinition {}
impl Cast<dyn SignalTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for TerminateEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for TerminateEventDefinition {}
impl Cast<dyn StartEventType> for TerminateEventDefinition {}
impl Cast<dyn StartEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SubChoreographyType> for TerminateEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SubConversationType> for TerminateEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn SubProcessType> for TerminateEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for TerminateEventDefinition {}
impl Cast<dyn TaskType> for TerminateEventDefinition {}
impl Cast<dyn TaskTypeMut> for TerminateEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for TerminateEventDefinition {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TextAnnotationType> for TerminateEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for TerminateEventDefinition {}
impl Cast<dyn TextType> for TerminateEventDefinition {}
impl Cast<dyn TextTypeMut> for TerminateEventDefinition {}
impl Cast<dyn ThrowEventType> for TerminateEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for TerminateEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for TerminateEventDefinition {}
impl Cast<dyn TimerEventDefinitionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn TransactionType> for TerminateEventDefinition {}
impl Cast<dyn TransactionTypeMut> for TerminateEventDefinition {}
impl Cast<dyn UserTaskType> for TerminateEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for TerminateEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:textAnnotation")]
pub struct TextAnnotation {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "textFormat")]
    #[tia("TextAnnotationType",rg*="text_format","TextAnnotationTypeMut",s)]
    pub text_format: Option<String>,
    #[xml(child = "bpmn:text")]
    #[tia("TextAnnotationType",rg*="text","TextAnnotationTypeMut",s,rmg*="text_mut")]
    pub text: Option<Text>,
}
impl DocumentElement for TextAnnotation {
    fn element(&self) -> Element {
        Element::TextAnnotation
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for TextAnnotation {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.text.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.text.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl ArtifactType for TextAnnotation {}
impl ArtifactTypeMut for TextAnnotation {}
//

/// Access to `textAnnotation`
pub trait TextAnnotationType: ArtifactType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `textFormat`
    fn text_format(&self) -> &Option<String>;
    /// Get value of `text` child
    fn text(&self) -> &Option<Text>;
}
dyn_clone::clone_trait_object!(TextAnnotationType);
impl_downcast!(TextAnnotationType);
/// Mutable access to `textAnnotation`
pub trait TextAnnotationTypeMut:
    ArtifactTypeMut + Downcast + Debug + Send + DynClone + TextAnnotationType
{
    /// Set value of attribute `textFormat`
    fn set_text_format(&mut self, value: Option<String>);
    /// Get a mutable value of `text` child
    fn text_mut(&mut self) -> &mut Option<Text>;
    /// Set value of `text` child
    fn set_text(&mut self, value: Option<Text>);
}
dyn_clone::clone_trait_object!(TextAnnotationTypeMut);
impl_downcast!(TextAnnotationTypeMut);
impl Cast<dyn DefinitionsType> for TextAnnotation {}
impl Cast<dyn DefinitionsTypeMut> for TextAnnotation {}
impl Cast<dyn ImportType> for TextAnnotation {}
impl Cast<dyn ImportTypeMut> for TextAnnotation {}
impl Cast<dyn ActivityType> for TextAnnotation {}
impl Cast<dyn ActivityTypeMut> for TextAnnotation {}
impl Cast<dyn AdHocSubProcessType> for TextAnnotation {}
impl Cast<dyn AdHocSubProcessTypeMut> for TextAnnotation {}
impl Cast<dyn ArtifactType> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ArtifactTypeMut> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AssignmentType> for TextAnnotation {}
impl Cast<dyn AssignmentTypeMut> for TextAnnotation {}
impl Cast<dyn AssociationType> for TextAnnotation {}
impl Cast<dyn AssociationTypeMut> for TextAnnotation {}
impl Cast<dyn AuditingType> for TextAnnotation {}
impl Cast<dyn AuditingTypeMut> for TextAnnotation {}
impl Cast<dyn BaseElementType> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for TextAnnotation {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for TextAnnotation {}
impl Cast<dyn BoundaryEventType> for TextAnnotation {}
impl Cast<dyn BoundaryEventTypeMut> for TextAnnotation {}
impl Cast<dyn BusinessRuleTaskType> for TextAnnotation {}
impl Cast<dyn BusinessRuleTaskTypeMut> for TextAnnotation {}
impl Cast<dyn CallableElementType> for TextAnnotation {}
impl Cast<dyn CallableElementTypeMut> for TextAnnotation {}
impl Cast<dyn CallActivityType> for TextAnnotation {}
impl Cast<dyn CallActivityTypeMut> for TextAnnotation {}
impl Cast<dyn CallChoreographyType> for TextAnnotation {}
impl Cast<dyn CallChoreographyTypeMut> for TextAnnotation {}
impl Cast<dyn CallConversationType> for TextAnnotation {}
impl Cast<dyn CallConversationTypeMut> for TextAnnotation {}
impl Cast<dyn CancelEventDefinitionType> for TextAnnotation {}
impl Cast<dyn CancelEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn CatchEventType> for TextAnnotation {}
impl Cast<dyn CatchEventTypeMut> for TextAnnotation {}
impl Cast<dyn CategoryType> for TextAnnotation {}
impl Cast<dyn CategoryTypeMut> for TextAnnotation {}
impl Cast<dyn CategoryValueType> for TextAnnotation {}
impl Cast<dyn CategoryValueTypeMut> for TextAnnotation {}
impl Cast<dyn ChoreographyType> for TextAnnotation {}
impl Cast<dyn ChoreographyTypeMut> for TextAnnotation {}
impl Cast<dyn ChoreographyActivityType> for TextAnnotation {}
impl Cast<dyn ChoreographyActivityTypeMut> for TextAnnotation {}
impl Cast<dyn ChoreographyTaskType> for TextAnnotation {}
impl Cast<dyn ChoreographyTaskTypeMut> for TextAnnotation {}
impl Cast<dyn CollaborationType> for TextAnnotation {}
impl Cast<dyn CollaborationTypeMut> for TextAnnotation {}
impl Cast<dyn CompensateEventDefinitionType> for TextAnnotation {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn ComplexBehaviorDefinitionType> for TextAnnotation {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn ComplexGatewayType> for TextAnnotation {}
impl Cast<dyn ComplexGatewayTypeMut> for TextAnnotation {}
impl Cast<dyn ConditionalEventDefinitionType> for TextAnnotation {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn ConversationType> for TextAnnotation {}
impl Cast<dyn ConversationTypeMut> for TextAnnotation {}
impl Cast<dyn ConversationAssociationType> for TextAnnotation {}
impl Cast<dyn ConversationAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn ConversationLinkType> for TextAnnotation {}
impl Cast<dyn ConversationLinkTypeMut> for TextAnnotation {}
impl Cast<dyn ConversationNodeType> for TextAnnotation {}
impl Cast<dyn ConversationNodeTypeMut> for TextAnnotation {}
impl Cast<dyn CorrelationKeyType> for TextAnnotation {}
impl Cast<dyn CorrelationKeyTypeMut> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyType> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyTypeMut> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyBindingType> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for TextAnnotation {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for TextAnnotation {}
impl Cast<dyn CorrelationSubscriptionType> for TextAnnotation {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for TextAnnotation {}
impl Cast<dyn DataAssociationType> for TextAnnotation {}
impl Cast<dyn DataAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn DataInputType> for TextAnnotation {}
impl Cast<dyn DataInputTypeMut> for TextAnnotation {}
impl Cast<dyn DataInputAssociationType> for TextAnnotation {}
impl Cast<dyn DataInputAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn DataObjectType> for TextAnnotation {}
impl Cast<dyn DataObjectTypeMut> for TextAnnotation {}
impl Cast<dyn DataObjectReferenceType> for TextAnnotation {}
impl Cast<dyn DataObjectReferenceTypeMut> for TextAnnotation {}
impl Cast<dyn DataOutputType> for TextAnnotation {}
impl Cast<dyn DataOutputTypeMut> for TextAnnotation {}
impl Cast<dyn DataOutputAssociationType> for TextAnnotation {}
impl Cast<dyn DataOutputAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn DataStateType> for TextAnnotation {}
impl Cast<dyn DataStateTypeMut> for TextAnnotation {}
impl Cast<dyn DataStoreType> for TextAnnotation {}
impl Cast<dyn DataStoreTypeMut> for TextAnnotation {}
impl Cast<dyn DataStoreReferenceType> for TextAnnotation {}
impl Cast<dyn DataStoreReferenceTypeMut> for TextAnnotation {}
impl Cast<dyn DocumentationType> for TextAnnotation {}
impl Cast<dyn DocumentationTypeMut> for TextAnnotation {}
impl Cast<dyn EndEventType> for TextAnnotation {}
impl Cast<dyn EndEventTypeMut> for TextAnnotation {}
impl Cast<dyn EndPointType> for TextAnnotation {}
impl Cast<dyn EndPointTypeMut> for TextAnnotation {}
impl Cast<dyn ErrorType> for TextAnnotation {}
impl Cast<dyn ErrorTypeMut> for TextAnnotation {}
impl Cast<dyn ErrorEventDefinitionType> for TextAnnotation {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn EscalationType> for TextAnnotation {}
impl Cast<dyn EscalationTypeMut> for TextAnnotation {}
impl Cast<dyn EscalationEventDefinitionType> for TextAnnotation {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn EventType> for TextAnnotation {}
impl Cast<dyn EventTypeMut> for TextAnnotation {}
impl Cast<dyn EventBasedGatewayType> for TextAnnotation {}
impl Cast<dyn EventBasedGatewayTypeMut> for TextAnnotation {}
impl Cast<dyn EventDefinitionType> for TextAnnotation {}
impl Cast<dyn EventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn ExclusiveGatewayType> for TextAnnotation {}
impl Cast<dyn ExclusiveGatewayTypeMut> for TextAnnotation {}
impl Cast<dyn ExpressionType> for TextAnnotation {}
impl Cast<dyn ExpressionTypeMut> for TextAnnotation {}
impl Cast<dyn ExtensionType> for TextAnnotation {}
impl Cast<dyn ExtensionTypeMut> for TextAnnotation {}
impl Cast<dyn ExtensionElementsType> for TextAnnotation {}
impl Cast<dyn ExtensionElementsTypeMut> for TextAnnotation {}
impl Cast<dyn FlowElementType> for TextAnnotation {}
impl Cast<dyn FlowElementTypeMut> for TextAnnotation {}
impl Cast<dyn FlowNodeType> for TextAnnotation {}
impl Cast<dyn FlowNodeTypeMut> for TextAnnotation {}
impl Cast<dyn FormalExpressionType> for TextAnnotation {}
impl Cast<dyn FormalExpressionTypeMut> for TextAnnotation {}
impl Cast<dyn GatewayType> for TextAnnotation {}
impl Cast<dyn GatewayTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalBusinessRuleTaskType> for TextAnnotation {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalChoreographyTaskType> for TextAnnotation {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalConversationType> for TextAnnotation {}
impl Cast<dyn GlobalConversationTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalManualTaskType> for TextAnnotation {}
impl Cast<dyn GlobalManualTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalScriptTaskType> for TextAnnotation {}
impl Cast<dyn GlobalScriptTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalTaskType> for TextAnnotation {}
impl Cast<dyn GlobalTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GlobalUserTaskType> for TextAnnotation {}
impl Cast<dyn GlobalUserTaskTypeMut> for TextAnnotation {}
impl Cast<dyn GroupType> for TextAnnotation {}
impl Cast<dyn GroupTypeMut> for TextAnnotation {}
impl Cast<dyn HumanPerformerType> for TextAnnotation {}
impl Cast<dyn HumanPerformerTypeMut> for TextAnnotation {}
impl Cast<dyn ImplicitThrowEventType> for TextAnnotation {}
impl Cast<dyn ImplicitThrowEventTypeMut> for TextAnnotation {}
impl Cast<dyn InclusiveGatewayType> for TextAnnotation {}
impl Cast<dyn InclusiveGatewayTypeMut> for TextAnnotation {}
impl Cast<dyn InputSetType> for TextAnnotation {}
impl Cast<dyn InputSetTypeMut> for TextAnnotation {}
impl Cast<dyn InterfaceType> for TextAnnotation {}
impl Cast<dyn InterfaceTypeMut> for TextAnnotation {}
impl Cast<dyn IntermediateCatchEventType> for TextAnnotation {}
impl Cast<dyn IntermediateCatchEventTypeMut> for TextAnnotation {}
impl Cast<dyn IntermediateThrowEventType> for TextAnnotation {}
impl Cast<dyn IntermediateThrowEventTypeMut> for TextAnnotation {}
impl Cast<dyn InputOutputBindingType> for TextAnnotation {}
impl Cast<dyn InputOutputBindingTypeMut> for TextAnnotation {}
impl Cast<dyn InputOutputSpecificationType> for TextAnnotation {}
impl Cast<dyn InputOutputSpecificationTypeMut> for TextAnnotation {}
impl Cast<dyn ItemDefinitionType> for TextAnnotation {}
impl Cast<dyn ItemDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn LaneType> for TextAnnotation {}
impl Cast<dyn LaneTypeMut> for TextAnnotation {}
impl Cast<dyn LaneSetType> for TextAnnotation {}
impl Cast<dyn LaneSetTypeMut> for TextAnnotation {}
impl Cast<dyn LinkEventDefinitionType> for TextAnnotation {}
impl Cast<dyn LinkEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn LoopCharacteristicsType> for TextAnnotation {}
impl Cast<dyn LoopCharacteristicsTypeMut> for TextAnnotation {}
impl Cast<dyn ManualTaskType> for TextAnnotation {}
impl Cast<dyn ManualTaskTypeMut> for TextAnnotation {}
impl Cast<dyn MessageType> for TextAnnotation {}
impl Cast<dyn MessageTypeMut> for TextAnnotation {}
impl Cast<dyn MessageEventDefinitionType> for TextAnnotation {}
impl Cast<dyn MessageEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn MessageFlowType> for TextAnnotation {}
impl Cast<dyn MessageFlowTypeMut> for TextAnnotation {}
impl Cast<dyn MessageFlowAssociationType> for TextAnnotation {}
impl Cast<dyn MessageFlowAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn MonitoringType> for TextAnnotation {}
impl Cast<dyn MonitoringTypeMut> for TextAnnotation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for TextAnnotation {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for TextAnnotation {}
impl Cast<dyn OperationType> for TextAnnotation {}
impl Cast<dyn OperationTypeMut> for TextAnnotation {}
impl Cast<dyn OutputSetType> for TextAnnotation {}
impl Cast<dyn OutputSetTypeMut> for TextAnnotation {}
impl Cast<dyn ParallelGatewayType> for TextAnnotation {}
impl Cast<dyn ParallelGatewayTypeMut> for TextAnnotation {}
impl Cast<dyn ParticipantType> for TextAnnotation {}
impl Cast<dyn ParticipantTypeMut> for TextAnnotation {}
impl Cast<dyn ParticipantAssociationType> for TextAnnotation {}
impl Cast<dyn ParticipantAssociationTypeMut> for TextAnnotation {}
impl Cast<dyn ParticipantMultiplicityType> for TextAnnotation {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for TextAnnotation {}
impl Cast<dyn PartnerEntityType> for TextAnnotation {}
impl Cast<dyn PartnerEntityTypeMut> for TextAnnotation {}
impl Cast<dyn PartnerRoleType> for TextAnnotation {}
impl Cast<dyn PartnerRoleTypeMut> for TextAnnotation {}
impl Cast<dyn PerformerType> for TextAnnotation {}
impl Cast<dyn PerformerTypeMut> for TextAnnotation {}
impl Cast<dyn PotentialOwnerType> for TextAnnotation {}
impl Cast<dyn PotentialOwnerTypeMut> for TextAnnotation {}
impl Cast<dyn ProcessType> for TextAnnotation {}
impl Cast<dyn ProcessTypeMut> for TextAnnotation {}
impl Cast<dyn PropertyType> for TextAnnotation {}
impl Cast<dyn PropertyTypeMut> for TextAnnotation {}
impl Cast<dyn ReceiveTaskType> for TextAnnotation {}
impl Cast<dyn ReceiveTaskTypeMut> for TextAnnotation {}
impl Cast<dyn RelationshipType> for TextAnnotation {}
impl Cast<dyn RelationshipTypeMut> for TextAnnotation {}
impl Cast<dyn RenderingType> for TextAnnotation {}
impl Cast<dyn RenderingTypeMut> for TextAnnotation {}
impl Cast<dyn ResourceType> for TextAnnotation {}
impl Cast<dyn ResourceTypeMut> for TextAnnotation {}
impl Cast<dyn ResourceAssignmentExpressionType> for TextAnnotation {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for TextAnnotation {}
impl Cast<dyn ResourceParameterType> for TextAnnotation {}
impl Cast<dyn ResourceParameterTypeMut> for TextAnnotation {}
impl Cast<dyn ResourceParameterBindingType> for TextAnnotation {}
impl Cast<dyn ResourceParameterBindingTypeMut> for TextAnnotation {}
impl Cast<dyn ResourceRoleType> for TextAnnotation {}
impl Cast<dyn ResourceRoleTypeMut> for TextAnnotation {}
impl Cast<dyn RootElementType> for TextAnnotation {}
impl Cast<dyn RootElementTypeMut> for TextAnnotation {}
impl Cast<dyn ScriptTaskType> for TextAnnotation {}
impl Cast<dyn ScriptTaskTypeMut> for TextAnnotation {}
impl Cast<dyn ScriptType> for TextAnnotation {}
impl Cast<dyn ScriptTypeMut> for TextAnnotation {}
impl Cast<dyn SendTaskType> for TextAnnotation {}
impl Cast<dyn SendTaskTypeMut> for TextAnnotation {}
impl Cast<dyn SequenceFlowType> for TextAnnotation {}
impl Cast<dyn SequenceFlowTypeMut> for TextAnnotation {}
impl Cast<dyn ServiceTaskType> for TextAnnotation {}
impl Cast<dyn ServiceTaskTypeMut> for TextAnnotation {}
impl Cast<dyn SignalType> for TextAnnotation {}
impl Cast<dyn SignalTypeMut> for TextAnnotation {}
impl Cast<dyn SignalEventDefinitionType> for TextAnnotation {}
impl Cast<dyn SignalEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn StandardLoopCharacteristicsType> for TextAnnotation {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for TextAnnotation {}
impl Cast<dyn StartEventType> for TextAnnotation {}
impl Cast<dyn StartEventTypeMut> for TextAnnotation {}
impl Cast<dyn SubChoreographyType> for TextAnnotation {}
impl Cast<dyn SubChoreographyTypeMut> for TextAnnotation {}
impl Cast<dyn SubConversationType> for TextAnnotation {}
impl Cast<dyn SubConversationTypeMut> for TextAnnotation {}
impl Cast<dyn SubProcessType> for TextAnnotation {}
impl Cast<dyn SubProcessTypeMut> for TextAnnotation {}
impl Cast<dyn TaskType> for TextAnnotation {}
impl Cast<dyn TaskTypeMut> for TextAnnotation {}
impl Cast<dyn TerminateEventDefinitionType> for TextAnnotation {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn TextAnnotationType> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TextAnnotationTypeMut> for TextAnnotation {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TextType> for TextAnnotation {}
impl Cast<dyn TextTypeMut> for TextAnnotation {}
impl Cast<dyn ThrowEventType> for TextAnnotation {}
impl Cast<dyn ThrowEventTypeMut> for TextAnnotation {}
impl Cast<dyn TimerEventDefinitionType> for TextAnnotation {}
impl Cast<dyn TimerEventDefinitionTypeMut> for TextAnnotation {}
impl Cast<dyn TransactionType> for TextAnnotation {}
impl Cast<dyn TransactionTypeMut> for TextAnnotation {}
impl Cast<dyn UserTaskType> for TextAnnotation {}
impl Cast<dyn UserTaskTypeMut> for TextAnnotation {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:text")]
pub struct Text {}
impl DocumentElement for Text {
    fn element(&self) -> Element {
        Element::Text
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Text {}
// Traits
impl TextType for Text {}
impl TextTypeMut for Text {}
//

/// Access to `text`
pub trait TextType: Downcast + Debug + Send + DynClone {}
dyn_clone::clone_trait_object!(TextType);
impl_downcast!(TextType);
/// Mutable access to `text`
pub trait TextTypeMut: Downcast + Debug + Send + DynClone + TextType {}
dyn_clone::clone_trait_object!(TextTypeMut);
impl_downcast!(TextTypeMut);
impl Cast<dyn DefinitionsType> for Text {}
impl Cast<dyn DefinitionsTypeMut> for Text {}
impl Cast<dyn ImportType> for Text {}
impl Cast<dyn ImportTypeMut> for Text {}
impl Cast<dyn ActivityType> for Text {}
impl Cast<dyn ActivityTypeMut> for Text {}
impl Cast<dyn AdHocSubProcessType> for Text {}
impl Cast<dyn AdHocSubProcessTypeMut> for Text {}
impl Cast<dyn ArtifactType> for Text {}
impl Cast<dyn ArtifactTypeMut> for Text {}
impl Cast<dyn AssignmentType> for Text {}
impl Cast<dyn AssignmentTypeMut> for Text {}
impl Cast<dyn AssociationType> for Text {}
impl Cast<dyn AssociationTypeMut> for Text {}
impl Cast<dyn AuditingType> for Text {}
impl Cast<dyn AuditingTypeMut> for Text {}
impl Cast<dyn BaseElementType> for Text {}
impl Cast<dyn BaseElementTypeMut> for Text {}
impl Cast<dyn BaseElementWithMixedContentType> for Text {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Text {}
impl Cast<dyn BoundaryEventType> for Text {}
impl Cast<dyn BoundaryEventTypeMut> for Text {}
impl Cast<dyn BusinessRuleTaskType> for Text {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Text {}
impl Cast<dyn CallableElementType> for Text {}
impl Cast<dyn CallableElementTypeMut> for Text {}
impl Cast<dyn CallActivityType> for Text {}
impl Cast<dyn CallActivityTypeMut> for Text {}
impl Cast<dyn CallChoreographyType> for Text {}
impl Cast<dyn CallChoreographyTypeMut> for Text {}
impl Cast<dyn CallConversationType> for Text {}
impl Cast<dyn CallConversationTypeMut> for Text {}
impl Cast<dyn CancelEventDefinitionType> for Text {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Text {}
impl Cast<dyn CatchEventType> for Text {}
impl Cast<dyn CatchEventTypeMut> for Text {}
impl Cast<dyn CategoryType> for Text {}
impl Cast<dyn CategoryTypeMut> for Text {}
impl Cast<dyn CategoryValueType> for Text {}
impl Cast<dyn CategoryValueTypeMut> for Text {}
impl Cast<dyn ChoreographyType> for Text {}
impl Cast<dyn ChoreographyTypeMut> for Text {}
impl Cast<dyn ChoreographyActivityType> for Text {}
impl Cast<dyn ChoreographyActivityTypeMut> for Text {}
impl Cast<dyn ChoreographyTaskType> for Text {}
impl Cast<dyn ChoreographyTaskTypeMut> for Text {}
impl Cast<dyn CollaborationType> for Text {}
impl Cast<dyn CollaborationTypeMut> for Text {}
impl Cast<dyn CompensateEventDefinitionType> for Text {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Text {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Text {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Text {}
impl Cast<dyn ComplexGatewayType> for Text {}
impl Cast<dyn ComplexGatewayTypeMut> for Text {}
impl Cast<dyn ConditionalEventDefinitionType> for Text {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Text {}
impl Cast<dyn ConversationType> for Text {}
impl Cast<dyn ConversationTypeMut> for Text {}
impl Cast<dyn ConversationAssociationType> for Text {}
impl Cast<dyn ConversationAssociationTypeMut> for Text {}
impl Cast<dyn ConversationLinkType> for Text {}
impl Cast<dyn ConversationLinkTypeMut> for Text {}
impl Cast<dyn ConversationNodeType> for Text {}
impl Cast<dyn ConversationNodeTypeMut> for Text {}
impl Cast<dyn CorrelationKeyType> for Text {}
impl Cast<dyn CorrelationKeyTypeMut> for Text {}
impl Cast<dyn CorrelationPropertyType> for Text {}
impl Cast<dyn CorrelationPropertyTypeMut> for Text {}
impl Cast<dyn CorrelationPropertyBindingType> for Text {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Text {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Text {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Text {}
impl Cast<dyn CorrelationSubscriptionType> for Text {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Text {}
impl Cast<dyn DataAssociationType> for Text {}
impl Cast<dyn DataAssociationTypeMut> for Text {}
impl Cast<dyn DataInputType> for Text {}
impl Cast<dyn DataInputTypeMut> for Text {}
impl Cast<dyn DataInputAssociationType> for Text {}
impl Cast<dyn DataInputAssociationTypeMut> for Text {}
impl Cast<dyn DataObjectType> for Text {}
impl Cast<dyn DataObjectTypeMut> for Text {}
impl Cast<dyn DataObjectReferenceType> for Text {}
impl Cast<dyn DataObjectReferenceTypeMut> for Text {}
impl Cast<dyn DataOutputType> for Text {}
impl Cast<dyn DataOutputTypeMut> for Text {}
impl Cast<dyn DataOutputAssociationType> for Text {}
impl Cast<dyn DataOutputAssociationTypeMut> for Text {}
impl Cast<dyn DataStateType> for Text {}
impl Cast<dyn DataStateTypeMut> for Text {}
impl Cast<dyn DataStoreType> for Text {}
impl Cast<dyn DataStoreTypeMut> for Text {}
impl Cast<dyn DataStoreReferenceType> for Text {}
impl Cast<dyn DataStoreReferenceTypeMut> for Text {}
impl Cast<dyn DocumentationType> for Text {}
impl Cast<dyn DocumentationTypeMut> for Text {}
impl Cast<dyn EndEventType> for Text {}
impl Cast<dyn EndEventTypeMut> for Text {}
impl Cast<dyn EndPointType> for Text {}
impl Cast<dyn EndPointTypeMut> for Text {}
impl Cast<dyn ErrorType> for Text {}
impl Cast<dyn ErrorTypeMut> for Text {}
impl Cast<dyn ErrorEventDefinitionType> for Text {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Text {}
impl Cast<dyn EscalationType> for Text {}
impl Cast<dyn EscalationTypeMut> for Text {}
impl Cast<dyn EscalationEventDefinitionType> for Text {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Text {}
impl Cast<dyn EventType> for Text {}
impl Cast<dyn EventTypeMut> for Text {}
impl Cast<dyn EventBasedGatewayType> for Text {}
impl Cast<dyn EventBasedGatewayTypeMut> for Text {}
impl Cast<dyn EventDefinitionType> for Text {}
impl Cast<dyn EventDefinitionTypeMut> for Text {}
impl Cast<dyn ExclusiveGatewayType> for Text {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Text {}
impl Cast<dyn ExpressionType> for Text {}
impl Cast<dyn ExpressionTypeMut> for Text {}
impl Cast<dyn ExtensionType> for Text {}
impl Cast<dyn ExtensionTypeMut> for Text {}
impl Cast<dyn ExtensionElementsType> for Text {}
impl Cast<dyn ExtensionElementsTypeMut> for Text {}
impl Cast<dyn FlowElementType> for Text {}
impl Cast<dyn FlowElementTypeMut> for Text {}
impl Cast<dyn FlowNodeType> for Text {}
impl Cast<dyn FlowNodeTypeMut> for Text {}
impl Cast<dyn FormalExpressionType> for Text {}
impl Cast<dyn FormalExpressionTypeMut> for Text {}
impl Cast<dyn GatewayType> for Text {}
impl Cast<dyn GatewayTypeMut> for Text {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Text {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Text {}
impl Cast<dyn GlobalChoreographyTaskType> for Text {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Text {}
impl Cast<dyn GlobalConversationType> for Text {}
impl Cast<dyn GlobalConversationTypeMut> for Text {}
impl Cast<dyn GlobalManualTaskType> for Text {}
impl Cast<dyn GlobalManualTaskTypeMut> for Text {}
impl Cast<dyn GlobalScriptTaskType> for Text {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Text {}
impl Cast<dyn GlobalTaskType> for Text {}
impl Cast<dyn GlobalTaskTypeMut> for Text {}
impl Cast<dyn GlobalUserTaskType> for Text {}
impl Cast<dyn GlobalUserTaskTypeMut> for Text {}
impl Cast<dyn GroupType> for Text {}
impl Cast<dyn GroupTypeMut> for Text {}
impl Cast<dyn HumanPerformerType> for Text {}
impl Cast<dyn HumanPerformerTypeMut> for Text {}
impl Cast<dyn ImplicitThrowEventType> for Text {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Text {}
impl Cast<dyn InclusiveGatewayType> for Text {}
impl Cast<dyn InclusiveGatewayTypeMut> for Text {}
impl Cast<dyn InputSetType> for Text {}
impl Cast<dyn InputSetTypeMut> for Text {}
impl Cast<dyn InterfaceType> for Text {}
impl Cast<dyn InterfaceTypeMut> for Text {}
impl Cast<dyn IntermediateCatchEventType> for Text {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Text {}
impl Cast<dyn IntermediateThrowEventType> for Text {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Text {}
impl Cast<dyn InputOutputBindingType> for Text {}
impl Cast<dyn InputOutputBindingTypeMut> for Text {}
impl Cast<dyn InputOutputSpecificationType> for Text {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Text {}
impl Cast<dyn ItemDefinitionType> for Text {}
impl Cast<dyn ItemDefinitionTypeMut> for Text {}
impl Cast<dyn LaneType> for Text {}
impl Cast<dyn LaneTypeMut> for Text {}
impl Cast<dyn LaneSetType> for Text {}
impl Cast<dyn LaneSetTypeMut> for Text {}
impl Cast<dyn LinkEventDefinitionType> for Text {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Text {}
impl Cast<dyn LoopCharacteristicsType> for Text {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Text {}
impl Cast<dyn ManualTaskType> for Text {}
impl Cast<dyn ManualTaskTypeMut> for Text {}
impl Cast<dyn MessageType> for Text {}
impl Cast<dyn MessageTypeMut> for Text {}
impl Cast<dyn MessageEventDefinitionType> for Text {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Text {}
impl Cast<dyn MessageFlowType> for Text {}
impl Cast<dyn MessageFlowTypeMut> for Text {}
impl Cast<dyn MessageFlowAssociationType> for Text {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Text {}
impl Cast<dyn MonitoringType> for Text {}
impl Cast<dyn MonitoringTypeMut> for Text {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Text {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Text {}
impl Cast<dyn OperationType> for Text {}
impl Cast<dyn OperationTypeMut> for Text {}
impl Cast<dyn OutputSetType> for Text {}
impl Cast<dyn OutputSetTypeMut> for Text {}
impl Cast<dyn ParallelGatewayType> for Text {}
impl Cast<dyn ParallelGatewayTypeMut> for Text {}
impl Cast<dyn ParticipantType> for Text {}
impl Cast<dyn ParticipantTypeMut> for Text {}
impl Cast<dyn ParticipantAssociationType> for Text {}
impl Cast<dyn ParticipantAssociationTypeMut> for Text {}
impl Cast<dyn ParticipantMultiplicityType> for Text {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Text {}
impl Cast<dyn PartnerEntityType> for Text {}
impl Cast<dyn PartnerEntityTypeMut> for Text {}
impl Cast<dyn PartnerRoleType> for Text {}
impl Cast<dyn PartnerRoleTypeMut> for Text {}
impl Cast<dyn PerformerType> for Text {}
impl Cast<dyn PerformerTypeMut> for Text {}
impl Cast<dyn PotentialOwnerType> for Text {}
impl Cast<dyn PotentialOwnerTypeMut> for Text {}
impl Cast<dyn ProcessType> for Text {}
impl Cast<dyn ProcessTypeMut> for Text {}
impl Cast<dyn PropertyType> for Text {}
impl Cast<dyn PropertyTypeMut> for Text {}
impl Cast<dyn ReceiveTaskType> for Text {}
impl Cast<dyn ReceiveTaskTypeMut> for Text {}
impl Cast<dyn RelationshipType> for Text {}
impl Cast<dyn RelationshipTypeMut> for Text {}
impl Cast<dyn RenderingType> for Text {}
impl Cast<dyn RenderingTypeMut> for Text {}
impl Cast<dyn ResourceType> for Text {}
impl Cast<dyn ResourceTypeMut> for Text {}
impl Cast<dyn ResourceAssignmentExpressionType> for Text {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Text {}
impl Cast<dyn ResourceParameterType> for Text {}
impl Cast<dyn ResourceParameterTypeMut> for Text {}
impl Cast<dyn ResourceParameterBindingType> for Text {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Text {}
impl Cast<dyn ResourceRoleType> for Text {}
impl Cast<dyn ResourceRoleTypeMut> for Text {}
impl Cast<dyn RootElementType> for Text {}
impl Cast<dyn RootElementTypeMut> for Text {}
impl Cast<dyn ScriptTaskType> for Text {}
impl Cast<dyn ScriptTaskTypeMut> for Text {}
impl Cast<dyn ScriptType> for Text {}
impl Cast<dyn ScriptTypeMut> for Text {}
impl Cast<dyn SendTaskType> for Text {}
impl Cast<dyn SendTaskTypeMut> for Text {}
impl Cast<dyn SequenceFlowType> for Text {}
impl Cast<dyn SequenceFlowTypeMut> for Text {}
impl Cast<dyn ServiceTaskType> for Text {}
impl Cast<dyn ServiceTaskTypeMut> for Text {}
impl Cast<dyn SignalType> for Text {}
impl Cast<dyn SignalTypeMut> for Text {}
impl Cast<dyn SignalEventDefinitionType> for Text {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Text {}
impl Cast<dyn StandardLoopCharacteristicsType> for Text {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Text {}
impl Cast<dyn StartEventType> for Text {}
impl Cast<dyn StartEventTypeMut> for Text {}
impl Cast<dyn SubChoreographyType> for Text {}
impl Cast<dyn SubChoreographyTypeMut> for Text {}
impl Cast<dyn SubConversationType> for Text {}
impl Cast<dyn SubConversationTypeMut> for Text {}
impl Cast<dyn SubProcessType> for Text {}
impl Cast<dyn SubProcessTypeMut> for Text {}
impl Cast<dyn TaskType> for Text {}
impl Cast<dyn TaskTypeMut> for Text {}
impl Cast<dyn TerminateEventDefinitionType> for Text {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Text {}
impl Cast<dyn TextAnnotationType> for Text {}
impl Cast<dyn TextAnnotationTypeMut> for Text {}
impl Cast<dyn TextType> for Text {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TextTypeMut> for Text {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ThrowEventType> for Text {}
impl Cast<dyn ThrowEventTypeMut> for Text {}
impl Cast<dyn TimerEventDefinitionType> for Text {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Text {}
impl Cast<dyn TransactionType> for Text {}
impl Cast<dyn TransactionTypeMut> for Text {}
impl Cast<dyn UserTaskType> for Text {}
impl Cast<dyn UserTaskTypeMut> for Text {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Hash, From, XmlRead, Clone, PartialEq, Debug, Deserialize, Serialize)]
#[xml(tag = "bpmn:throwEvent")]
#[serde(tag = "type")]
pub enum ThrowEvent {}
impl ThrowEvent {
    pub fn into_inner(self) -> Box<dyn DocumentElement> {
        match self {}
    }
}
impl DocumentElementContainer for ThrowEvent {
    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        match self {
            _ => None,
        }
    }

    #[allow(unreachable_patterns, clippy::match_single_binding, unused_variables)]
    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        match self {
            _ => None,
        }
    }
}
impl DocumentElement for ThrowEvent {
    fn element(&self) -> Element {
        Element::ThrowEvent
    }
}
/// Access to `throwEvent`
pub trait ThrowEventType: EventType + Downcast + Debug + Send + DynClone {
    /// Get value of `dataInput` child
    fn data_inputs(&self) -> &Vec<DataInput>;
    /// Get value of `dataInputAssociation` child
    fn data_input_associations(&self) -> &Vec<DataInputAssociation>;
    /// Get value of `inputSet` child
    fn input_set(&self) -> &Option<InputSet>;
    /// Get value of `eventDefinition` child
    fn event_definitions(&self) -> &Vec<EventDefinition>;
    /// Get value of `eventDefinitionRef` child
    fn event_definition_refs(&self) -> &Vec<String>;
}
dyn_clone::clone_trait_object!(ThrowEventType);
impl_downcast!(ThrowEventType);
/// Mutable access to `throwEvent`
pub trait ThrowEventTypeMut:
    EventTypeMut + Downcast + Debug + Send + DynClone + ThrowEventType
{
    /// Get a mutable value of `dataInput` child
    fn data_inputs_mut(&mut self) -> &mut Vec<DataInput>;
    /// Set value of `dataInput` child
    fn set_data_inputs(&mut self, value: Vec<DataInput>);
    /// Get a mutable value of `dataInputAssociation` child
    fn data_input_associations_mut(&mut self) -> &mut Vec<DataInputAssociation>;
    /// Set value of `dataInputAssociation` child
    fn set_data_input_associations(&mut self, value: Vec<DataInputAssociation>);
    /// Get a mutable value of `inputSet` child
    fn input_set_mut(&mut self) -> &mut Option<InputSet>;
    /// Set value of `inputSet` child
    fn set_input_set(&mut self, value: Option<InputSet>);
    /// Get a mutable value of `eventDefinition` child
    fn event_definitions_mut(&mut self) -> &mut Vec<EventDefinition>;
    /// Set value of `eventDefinition` child
    fn set_event_definitions(&mut self, value: Vec<EventDefinition>);
    /// Get a mutable value of `eventDefinitionRef` child
    fn event_definition_refs_mut(&mut self) -> &mut Vec<String>;
    /// Set value of `eventDefinitionRef` child
    fn set_event_definition_refs(&mut self, value: Vec<String>);
}
dyn_clone::clone_trait_object!(ThrowEventTypeMut);
impl_downcast!(ThrowEventTypeMut);
impl Cast<dyn DefinitionsType> for ThrowEvent {}
impl Cast<dyn DefinitionsTypeMut> for ThrowEvent {}
impl Cast<dyn ImportType> for ThrowEvent {}
impl Cast<dyn ImportTypeMut> for ThrowEvent {}
impl Cast<dyn ActivityType> for ThrowEvent {}
impl Cast<dyn ActivityTypeMut> for ThrowEvent {}
impl Cast<dyn AdHocSubProcessType> for ThrowEvent {}
impl Cast<dyn AdHocSubProcessTypeMut> for ThrowEvent {}
impl Cast<dyn ArtifactType> for ThrowEvent {}
impl Cast<dyn ArtifactTypeMut> for ThrowEvent {}
impl Cast<dyn AssignmentType> for ThrowEvent {}
impl Cast<dyn AssignmentTypeMut> for ThrowEvent {}
impl Cast<dyn AssociationType> for ThrowEvent {}
impl Cast<dyn AssociationTypeMut> for ThrowEvent {}
impl Cast<dyn AuditingType> for ThrowEvent {}
impl Cast<dyn AuditingTypeMut> for ThrowEvent {}
impl Cast<dyn BaseElementType> for ThrowEvent {}
impl Cast<dyn BaseElementTypeMut> for ThrowEvent {}
impl Cast<dyn BaseElementWithMixedContentType> for ThrowEvent {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for ThrowEvent {}
impl Cast<dyn BoundaryEventType> for ThrowEvent {}
impl Cast<dyn BoundaryEventTypeMut> for ThrowEvent {}
impl Cast<dyn BusinessRuleTaskType> for ThrowEvent {}
impl Cast<dyn BusinessRuleTaskTypeMut> for ThrowEvent {}
impl Cast<dyn CallableElementType> for ThrowEvent {}
impl Cast<dyn CallableElementTypeMut> for ThrowEvent {}
impl Cast<dyn CallActivityType> for ThrowEvent {}
impl Cast<dyn CallActivityTypeMut> for ThrowEvent {}
impl Cast<dyn CallChoreographyType> for ThrowEvent {}
impl Cast<dyn CallChoreographyTypeMut> for ThrowEvent {}
impl Cast<dyn CallConversationType> for ThrowEvent {}
impl Cast<dyn CallConversationTypeMut> for ThrowEvent {}
impl Cast<dyn CancelEventDefinitionType> for ThrowEvent {}
impl Cast<dyn CancelEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn CatchEventType> for ThrowEvent {}
impl Cast<dyn CatchEventTypeMut> for ThrowEvent {}
impl Cast<dyn CategoryType> for ThrowEvent {}
impl Cast<dyn CategoryTypeMut> for ThrowEvent {}
impl Cast<dyn CategoryValueType> for ThrowEvent {}
impl Cast<dyn CategoryValueTypeMut> for ThrowEvent {}
impl Cast<dyn ChoreographyType> for ThrowEvent {}
impl Cast<dyn ChoreographyTypeMut> for ThrowEvent {}
impl Cast<dyn ChoreographyActivityType> for ThrowEvent {}
impl Cast<dyn ChoreographyActivityTypeMut> for ThrowEvent {}
impl Cast<dyn ChoreographyTaskType> for ThrowEvent {}
impl Cast<dyn ChoreographyTaskTypeMut> for ThrowEvent {}
impl Cast<dyn CollaborationType> for ThrowEvent {}
impl Cast<dyn CollaborationTypeMut> for ThrowEvent {}
impl Cast<dyn CompensateEventDefinitionType> for ThrowEvent {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionType> for ThrowEvent {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn ComplexGatewayType> for ThrowEvent {}
impl Cast<dyn ComplexGatewayTypeMut> for ThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionType> for ThrowEvent {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn ConversationType> for ThrowEvent {}
impl Cast<dyn ConversationTypeMut> for ThrowEvent {}
impl Cast<dyn ConversationAssociationType> for ThrowEvent {}
impl Cast<dyn ConversationAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn ConversationLinkType> for ThrowEvent {}
impl Cast<dyn ConversationLinkTypeMut> for ThrowEvent {}
impl Cast<dyn ConversationNodeType> for ThrowEvent {}
impl Cast<dyn ConversationNodeTypeMut> for ThrowEvent {}
impl Cast<dyn CorrelationKeyType> for ThrowEvent {}
impl Cast<dyn CorrelationKeyTypeMut> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyType> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyTypeMut> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingType> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for ThrowEvent {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for ThrowEvent {}
impl Cast<dyn CorrelationSubscriptionType> for ThrowEvent {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for ThrowEvent {}
impl Cast<dyn DataAssociationType> for ThrowEvent {}
impl Cast<dyn DataAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn DataInputType> for ThrowEvent {}
impl Cast<dyn DataInputTypeMut> for ThrowEvent {}
impl Cast<dyn DataInputAssociationType> for ThrowEvent {}
impl Cast<dyn DataInputAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn DataObjectType> for ThrowEvent {}
impl Cast<dyn DataObjectTypeMut> for ThrowEvent {}
impl Cast<dyn DataObjectReferenceType> for ThrowEvent {}
impl Cast<dyn DataObjectReferenceTypeMut> for ThrowEvent {}
impl Cast<dyn DataOutputType> for ThrowEvent {}
impl Cast<dyn DataOutputTypeMut> for ThrowEvent {}
impl Cast<dyn DataOutputAssociationType> for ThrowEvent {}
impl Cast<dyn DataOutputAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn DataStateType> for ThrowEvent {}
impl Cast<dyn DataStateTypeMut> for ThrowEvent {}
impl Cast<dyn DataStoreType> for ThrowEvent {}
impl Cast<dyn DataStoreTypeMut> for ThrowEvent {}
impl Cast<dyn DataStoreReferenceType> for ThrowEvent {}
impl Cast<dyn DataStoreReferenceTypeMut> for ThrowEvent {}
impl Cast<dyn DocumentationType> for ThrowEvent {}
impl Cast<dyn DocumentationTypeMut> for ThrowEvent {}
impl Cast<dyn EndEventType> for ThrowEvent {}
impl Cast<dyn EndEventTypeMut> for ThrowEvent {}
impl Cast<dyn EndPointType> for ThrowEvent {}
impl Cast<dyn EndPointTypeMut> for ThrowEvent {}
impl Cast<dyn ErrorType> for ThrowEvent {}
impl Cast<dyn ErrorTypeMut> for ThrowEvent {}
impl Cast<dyn ErrorEventDefinitionType> for ThrowEvent {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn EscalationType> for ThrowEvent {}
impl Cast<dyn EscalationTypeMut> for ThrowEvent {}
impl Cast<dyn EscalationEventDefinitionType> for ThrowEvent {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn EventType> for ThrowEvent {}
impl Cast<dyn EventTypeMut> for ThrowEvent {}
impl Cast<dyn EventBasedGatewayType> for ThrowEvent {}
impl Cast<dyn EventBasedGatewayTypeMut> for ThrowEvent {}
impl Cast<dyn EventDefinitionType> for ThrowEvent {}
impl Cast<dyn EventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn ExclusiveGatewayType> for ThrowEvent {}
impl Cast<dyn ExclusiveGatewayTypeMut> for ThrowEvent {}
impl Cast<dyn ExpressionType> for ThrowEvent {}
impl Cast<dyn ExpressionTypeMut> for ThrowEvent {}
impl Cast<dyn ExtensionType> for ThrowEvent {}
impl Cast<dyn ExtensionTypeMut> for ThrowEvent {}
impl Cast<dyn ExtensionElementsType> for ThrowEvent {}
impl Cast<dyn ExtensionElementsTypeMut> for ThrowEvent {}
impl Cast<dyn FlowElementType> for ThrowEvent {}
impl Cast<dyn FlowElementTypeMut> for ThrowEvent {}
impl Cast<dyn FlowNodeType> for ThrowEvent {}
impl Cast<dyn FlowNodeTypeMut> for ThrowEvent {}
impl Cast<dyn FormalExpressionType> for ThrowEvent {}
impl Cast<dyn FormalExpressionTypeMut> for ThrowEvent {}
impl Cast<dyn GatewayType> for ThrowEvent {}
impl Cast<dyn GatewayTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskType> for ThrowEvent {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskType> for ThrowEvent {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalConversationType> for ThrowEvent {}
impl Cast<dyn GlobalConversationTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalManualTaskType> for ThrowEvent {}
impl Cast<dyn GlobalManualTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalScriptTaskType> for ThrowEvent {}
impl Cast<dyn GlobalScriptTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalTaskType> for ThrowEvent {}
impl Cast<dyn GlobalTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GlobalUserTaskType> for ThrowEvent {}
impl Cast<dyn GlobalUserTaskTypeMut> for ThrowEvent {}
impl Cast<dyn GroupType> for ThrowEvent {}
impl Cast<dyn GroupTypeMut> for ThrowEvent {}
impl Cast<dyn HumanPerformerType> for ThrowEvent {}
impl Cast<dyn HumanPerformerTypeMut> for ThrowEvent {}
impl Cast<dyn ImplicitThrowEventType> for ThrowEvent {}
impl Cast<dyn ImplicitThrowEventTypeMut> for ThrowEvent {}
impl Cast<dyn InclusiveGatewayType> for ThrowEvent {}
impl Cast<dyn InclusiveGatewayTypeMut> for ThrowEvent {}
impl Cast<dyn InputSetType> for ThrowEvent {}
impl Cast<dyn InputSetTypeMut> for ThrowEvent {}
impl Cast<dyn InterfaceType> for ThrowEvent {}
impl Cast<dyn InterfaceTypeMut> for ThrowEvent {}
impl Cast<dyn IntermediateCatchEventType> for ThrowEvent {}
impl Cast<dyn IntermediateCatchEventTypeMut> for ThrowEvent {}
impl Cast<dyn IntermediateThrowEventType> for ThrowEvent {}
impl Cast<dyn IntermediateThrowEventTypeMut> for ThrowEvent {}
impl Cast<dyn InputOutputBindingType> for ThrowEvent {}
impl Cast<dyn InputOutputBindingTypeMut> for ThrowEvent {}
impl Cast<dyn InputOutputSpecificationType> for ThrowEvent {}
impl Cast<dyn InputOutputSpecificationTypeMut> for ThrowEvent {}
impl Cast<dyn ItemDefinitionType> for ThrowEvent {}
impl Cast<dyn ItemDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn LaneType> for ThrowEvent {}
impl Cast<dyn LaneTypeMut> for ThrowEvent {}
impl Cast<dyn LaneSetType> for ThrowEvent {}
impl Cast<dyn LaneSetTypeMut> for ThrowEvent {}
impl Cast<dyn LinkEventDefinitionType> for ThrowEvent {}
impl Cast<dyn LinkEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn LoopCharacteristicsType> for ThrowEvent {}
impl Cast<dyn LoopCharacteristicsTypeMut> for ThrowEvent {}
impl Cast<dyn ManualTaskType> for ThrowEvent {}
impl Cast<dyn ManualTaskTypeMut> for ThrowEvent {}
impl Cast<dyn MessageType> for ThrowEvent {}
impl Cast<dyn MessageTypeMut> for ThrowEvent {}
impl Cast<dyn MessageEventDefinitionType> for ThrowEvent {}
impl Cast<dyn MessageEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn MessageFlowType> for ThrowEvent {}
impl Cast<dyn MessageFlowTypeMut> for ThrowEvent {}
impl Cast<dyn MessageFlowAssociationType> for ThrowEvent {}
impl Cast<dyn MessageFlowAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn MonitoringType> for ThrowEvent {}
impl Cast<dyn MonitoringTypeMut> for ThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for ThrowEvent {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for ThrowEvent {}
impl Cast<dyn OperationType> for ThrowEvent {}
impl Cast<dyn OperationTypeMut> for ThrowEvent {}
impl Cast<dyn OutputSetType> for ThrowEvent {}
impl Cast<dyn OutputSetTypeMut> for ThrowEvent {}
impl Cast<dyn ParallelGatewayType> for ThrowEvent {}
impl Cast<dyn ParallelGatewayTypeMut> for ThrowEvent {}
impl Cast<dyn ParticipantType> for ThrowEvent {}
impl Cast<dyn ParticipantTypeMut> for ThrowEvent {}
impl Cast<dyn ParticipantAssociationType> for ThrowEvent {}
impl Cast<dyn ParticipantAssociationTypeMut> for ThrowEvent {}
impl Cast<dyn ParticipantMultiplicityType> for ThrowEvent {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for ThrowEvent {}
impl Cast<dyn PartnerEntityType> for ThrowEvent {}
impl Cast<dyn PartnerEntityTypeMut> for ThrowEvent {}
impl Cast<dyn PartnerRoleType> for ThrowEvent {}
impl Cast<dyn PartnerRoleTypeMut> for ThrowEvent {}
impl Cast<dyn PerformerType> for ThrowEvent {}
impl Cast<dyn PerformerTypeMut> for ThrowEvent {}
impl Cast<dyn PotentialOwnerType> for ThrowEvent {}
impl Cast<dyn PotentialOwnerTypeMut> for ThrowEvent {}
impl Cast<dyn ProcessType> for ThrowEvent {}
impl Cast<dyn ProcessTypeMut> for ThrowEvent {}
impl Cast<dyn PropertyType> for ThrowEvent {}
impl Cast<dyn PropertyTypeMut> for ThrowEvent {}
impl Cast<dyn ReceiveTaskType> for ThrowEvent {}
impl Cast<dyn ReceiveTaskTypeMut> for ThrowEvent {}
impl Cast<dyn RelationshipType> for ThrowEvent {}
impl Cast<dyn RelationshipTypeMut> for ThrowEvent {}
impl Cast<dyn RenderingType> for ThrowEvent {}
impl Cast<dyn RenderingTypeMut> for ThrowEvent {}
impl Cast<dyn ResourceType> for ThrowEvent {}
impl Cast<dyn ResourceTypeMut> for ThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionType> for ThrowEvent {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for ThrowEvent {}
impl Cast<dyn ResourceParameterType> for ThrowEvent {}
impl Cast<dyn ResourceParameterTypeMut> for ThrowEvent {}
impl Cast<dyn ResourceParameterBindingType> for ThrowEvent {}
impl Cast<dyn ResourceParameterBindingTypeMut> for ThrowEvent {}
impl Cast<dyn ResourceRoleType> for ThrowEvent {}
impl Cast<dyn ResourceRoleTypeMut> for ThrowEvent {}
impl Cast<dyn RootElementType> for ThrowEvent {}
impl Cast<dyn RootElementTypeMut> for ThrowEvent {}
impl Cast<dyn ScriptTaskType> for ThrowEvent {}
impl Cast<dyn ScriptTaskTypeMut> for ThrowEvent {}
impl Cast<dyn ScriptType> for ThrowEvent {}
impl Cast<dyn ScriptTypeMut> for ThrowEvent {}
impl Cast<dyn SendTaskType> for ThrowEvent {}
impl Cast<dyn SendTaskTypeMut> for ThrowEvent {}
impl Cast<dyn SequenceFlowType> for ThrowEvent {}
impl Cast<dyn SequenceFlowTypeMut> for ThrowEvent {}
impl Cast<dyn ServiceTaskType> for ThrowEvent {}
impl Cast<dyn ServiceTaskTypeMut> for ThrowEvent {}
impl Cast<dyn SignalType> for ThrowEvent {}
impl Cast<dyn SignalTypeMut> for ThrowEvent {}
impl Cast<dyn SignalEventDefinitionType> for ThrowEvent {}
impl Cast<dyn SignalEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsType> for ThrowEvent {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for ThrowEvent {}
impl Cast<dyn StartEventType> for ThrowEvent {}
impl Cast<dyn StartEventTypeMut> for ThrowEvent {}
impl Cast<dyn SubChoreographyType> for ThrowEvent {}
impl Cast<dyn SubChoreographyTypeMut> for ThrowEvent {}
impl Cast<dyn SubConversationType> for ThrowEvent {}
impl Cast<dyn SubConversationTypeMut> for ThrowEvent {}
impl Cast<dyn SubProcessType> for ThrowEvent {}
impl Cast<dyn SubProcessTypeMut> for ThrowEvent {}
impl Cast<dyn TaskType> for ThrowEvent {}
impl Cast<dyn TaskTypeMut> for ThrowEvent {}
impl Cast<dyn TerminateEventDefinitionType> for ThrowEvent {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn TextAnnotationType> for ThrowEvent {}
impl Cast<dyn TextAnnotationTypeMut> for ThrowEvent {}
impl Cast<dyn TextType> for ThrowEvent {}
impl Cast<dyn TextTypeMut> for ThrowEvent {}
impl Cast<dyn ThrowEventType> for ThrowEvent {}
impl Cast<dyn ThrowEventTypeMut> for ThrowEvent {}
impl Cast<dyn TimerEventDefinitionType> for ThrowEvent {}
impl Cast<dyn TimerEventDefinitionTypeMut> for ThrowEvent {}
impl Cast<dyn TransactionType> for ThrowEvent {}
impl Cast<dyn TransactionTypeMut> for ThrowEvent {}
impl Cast<dyn UserTaskType> for ThrowEvent {}
impl Cast<dyn UserTaskTypeMut> for ThrowEvent {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:timerEventDefinition")]
pub struct TimerEventDefinition {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(child = "bpmn:timeDate")]
    #[tia("TimerEventDefinitionType",rg*="time_date","TimerEventDefinitionTypeMut",s,rmg*="time_date_mut")]
    pub time_date: Option<TimerEventDefinitionTimeDate>,
    #[xml(child = "bpmn:timeDuration")]
    #[tia("TimerEventDefinitionType",rg*="time_duration","TimerEventDefinitionTypeMut",s,rmg*="time_duration_mut")]
    pub time_duration: Option<TimerEventDefinitionTimeDuration>,
    #[xml(child = "bpmn:timeCycle")]
    #[tia("TimerEventDefinitionType",rg*="time_cycle","TimerEventDefinitionTypeMut",s,rmg*="time_cycle_mut")]
    pub time_cycle: Option<TimerEventDefinitionTimeCycle>,
}
impl DocumentElement for TimerEventDefinition {
    fn element(&self) -> Element {
        Element::TimerEventDefinition
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for TimerEventDefinition {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.time_date.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.time_duration.find_by_id_mut(id) {
            return Some(e);
        }
        if let Some(e) = self.time_cycle.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.time_date.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.time_duration.find_by_id(id) {
            return Some(e);
        }
        if let Some(e) = self.time_cycle.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl EventDefinitionType for TimerEventDefinition {}
impl EventDefinitionTypeMut for TimerEventDefinition {}
impl RootElementType for TimerEventDefinition {}
impl RootElementTypeMut for TimerEventDefinition {}
//

/// Access to `timerEventDefinition`
pub trait TimerEventDefinitionType:
    EventDefinitionType + Downcast + Debug + Send + DynClone
{
    /// Get value of `timeDate` child
    fn time_date(&self) -> &Option<TimerEventDefinitionTimeDate>;
    /// Get value of `timeDuration` child
    fn time_duration(&self) -> &Option<TimerEventDefinitionTimeDuration>;
    /// Get value of `timeCycle` child
    fn time_cycle(&self) -> &Option<TimerEventDefinitionTimeCycle>;
}
dyn_clone::clone_trait_object!(TimerEventDefinitionType);
impl_downcast!(TimerEventDefinitionType);
/// Mutable access to `timerEventDefinition`
pub trait TimerEventDefinitionTypeMut:
    EventDefinitionTypeMut + Downcast + Debug + Send + DynClone + TimerEventDefinitionType
{
    /// Get a mutable value of `timeDate` child
    fn time_date_mut(&mut self) -> &mut Option<TimerEventDefinitionTimeDate>;
    /// Set value of `timeDate` child
    fn set_time_date(&mut self, value: Option<TimerEventDefinitionTimeDate>);
    /// Get a mutable value of `timeDuration` child
    fn time_duration_mut(&mut self) -> &mut Option<TimerEventDefinitionTimeDuration>;
    /// Set value of `timeDuration` child
    fn set_time_duration(&mut self, value: Option<TimerEventDefinitionTimeDuration>);
    /// Get a mutable value of `timeCycle` child
    fn time_cycle_mut(&mut self) -> &mut Option<TimerEventDefinitionTimeCycle>;
    /// Set value of `timeCycle` child
    fn set_time_cycle(&mut self, value: Option<TimerEventDefinitionTimeCycle>);
}
dyn_clone::clone_trait_object!(TimerEventDefinitionTypeMut);
impl_downcast!(TimerEventDefinitionTypeMut);
impl Cast<dyn DefinitionsType> for TimerEventDefinition {}
impl Cast<dyn DefinitionsTypeMut> for TimerEventDefinition {}
impl Cast<dyn ImportType> for TimerEventDefinition {}
impl Cast<dyn ImportTypeMut> for TimerEventDefinition {}
impl Cast<dyn ActivityType> for TimerEventDefinition {}
impl Cast<dyn ActivityTypeMut> for TimerEventDefinition {}
impl Cast<dyn AdHocSubProcessType> for TimerEventDefinition {}
impl Cast<dyn AdHocSubProcessTypeMut> for TimerEventDefinition {}
impl Cast<dyn ArtifactType> for TimerEventDefinition {}
impl Cast<dyn ArtifactTypeMut> for TimerEventDefinition {}
impl Cast<dyn AssignmentType> for TimerEventDefinition {}
impl Cast<dyn AssignmentTypeMut> for TimerEventDefinition {}
impl Cast<dyn AssociationType> for TimerEventDefinition {}
impl Cast<dyn AssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn AuditingType> for TimerEventDefinition {}
impl Cast<dyn AuditingTypeMut> for TimerEventDefinition {}
impl Cast<dyn BaseElementType> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for TimerEventDefinition {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for TimerEventDefinition {}
impl Cast<dyn BoundaryEventType> for TimerEventDefinition {}
impl Cast<dyn BoundaryEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn BusinessRuleTaskType> for TimerEventDefinition {}
impl Cast<dyn BusinessRuleTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn CallableElementType> for TimerEventDefinition {}
impl Cast<dyn CallableElementTypeMut> for TimerEventDefinition {}
impl Cast<dyn CallActivityType> for TimerEventDefinition {}
impl Cast<dyn CallActivityTypeMut> for TimerEventDefinition {}
impl Cast<dyn CallChoreographyType> for TimerEventDefinition {}
impl Cast<dyn CallChoreographyTypeMut> for TimerEventDefinition {}
impl Cast<dyn CallConversationType> for TimerEventDefinition {}
impl Cast<dyn CallConversationTypeMut> for TimerEventDefinition {}
impl Cast<dyn CancelEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn CancelEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn CatchEventType> for TimerEventDefinition {}
impl Cast<dyn CatchEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn CategoryType> for TimerEventDefinition {}
impl Cast<dyn CategoryTypeMut> for TimerEventDefinition {}
impl Cast<dyn CategoryValueType> for TimerEventDefinition {}
impl Cast<dyn CategoryValueTypeMut> for TimerEventDefinition {}
impl Cast<dyn ChoreographyType> for TimerEventDefinition {}
impl Cast<dyn ChoreographyTypeMut> for TimerEventDefinition {}
impl Cast<dyn ChoreographyActivityType> for TimerEventDefinition {}
impl Cast<dyn ChoreographyActivityTypeMut> for TimerEventDefinition {}
impl Cast<dyn ChoreographyTaskType> for TimerEventDefinition {}
impl Cast<dyn ChoreographyTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn CollaborationType> for TimerEventDefinition {}
impl Cast<dyn CollaborationTypeMut> for TimerEventDefinition {}
impl Cast<dyn CompensateEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionType> for TimerEventDefinition {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ComplexGatewayType> for TimerEventDefinition {}
impl Cast<dyn ComplexGatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ConversationType> for TimerEventDefinition {}
impl Cast<dyn ConversationTypeMut> for TimerEventDefinition {}
impl Cast<dyn ConversationAssociationType> for TimerEventDefinition {}
impl Cast<dyn ConversationAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn ConversationLinkType> for TimerEventDefinition {}
impl Cast<dyn ConversationLinkTypeMut> for TimerEventDefinition {}
impl Cast<dyn ConversationNodeType> for TimerEventDefinition {}
impl Cast<dyn ConversationNodeTypeMut> for TimerEventDefinition {}
impl Cast<dyn CorrelationKeyType> for TimerEventDefinition {}
impl Cast<dyn CorrelationKeyTypeMut> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyType> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyTypeMut> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingType> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for TimerEventDefinition {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for TimerEventDefinition {}
impl Cast<dyn CorrelationSubscriptionType> for TimerEventDefinition {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataAssociationType> for TimerEventDefinition {}
impl Cast<dyn DataAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataInputType> for TimerEventDefinition {}
impl Cast<dyn DataInputTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataInputAssociationType> for TimerEventDefinition {}
impl Cast<dyn DataInputAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataObjectType> for TimerEventDefinition {}
impl Cast<dyn DataObjectTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataObjectReferenceType> for TimerEventDefinition {}
impl Cast<dyn DataObjectReferenceTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataOutputType> for TimerEventDefinition {}
impl Cast<dyn DataOutputTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataOutputAssociationType> for TimerEventDefinition {}
impl Cast<dyn DataOutputAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataStateType> for TimerEventDefinition {}
impl Cast<dyn DataStateTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataStoreType> for TimerEventDefinition {}
impl Cast<dyn DataStoreTypeMut> for TimerEventDefinition {}
impl Cast<dyn DataStoreReferenceType> for TimerEventDefinition {}
impl Cast<dyn DataStoreReferenceTypeMut> for TimerEventDefinition {}
impl Cast<dyn DocumentationType> for TimerEventDefinition {}
impl Cast<dyn DocumentationTypeMut> for TimerEventDefinition {}
impl Cast<dyn EndEventType> for TimerEventDefinition {}
impl Cast<dyn EndEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn EndPointType> for TimerEventDefinition {}
impl Cast<dyn EndPointTypeMut> for TimerEventDefinition {}
impl Cast<dyn ErrorType> for TimerEventDefinition {}
impl Cast<dyn ErrorTypeMut> for TimerEventDefinition {}
impl Cast<dyn ErrorEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn EscalationType> for TimerEventDefinition {}
impl Cast<dyn EscalationTypeMut> for TimerEventDefinition {}
impl Cast<dyn EscalationEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn EventType> for TimerEventDefinition {}
impl Cast<dyn EventTypeMut> for TimerEventDefinition {}
impl Cast<dyn EventBasedGatewayType> for TimerEventDefinition {}
impl Cast<dyn EventBasedGatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn EventDefinitionType> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn EventDefinitionTypeMut> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ExclusiveGatewayType> for TimerEventDefinition {}
impl Cast<dyn ExclusiveGatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn ExpressionType> for TimerEventDefinition {}
impl Cast<dyn ExpressionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ExtensionType> for TimerEventDefinition {}
impl Cast<dyn ExtensionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ExtensionElementsType> for TimerEventDefinition {}
impl Cast<dyn ExtensionElementsTypeMut> for TimerEventDefinition {}
impl Cast<dyn FlowElementType> for TimerEventDefinition {}
impl Cast<dyn FlowElementTypeMut> for TimerEventDefinition {}
impl Cast<dyn FlowNodeType> for TimerEventDefinition {}
impl Cast<dyn FlowNodeTypeMut> for TimerEventDefinition {}
impl Cast<dyn FormalExpressionType> for TimerEventDefinition {}
impl Cast<dyn FormalExpressionTypeMut> for TimerEventDefinition {}
impl Cast<dyn GatewayType> for TimerEventDefinition {}
impl Cast<dyn GatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalConversationType> for TimerEventDefinition {}
impl Cast<dyn GlobalConversationTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalManualTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalManualTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalScriptTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalScriptTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GlobalUserTaskType> for TimerEventDefinition {}
impl Cast<dyn GlobalUserTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn GroupType> for TimerEventDefinition {}
impl Cast<dyn GroupTypeMut> for TimerEventDefinition {}
impl Cast<dyn HumanPerformerType> for TimerEventDefinition {}
impl Cast<dyn HumanPerformerTypeMut> for TimerEventDefinition {}
impl Cast<dyn ImplicitThrowEventType> for TimerEventDefinition {}
impl Cast<dyn ImplicitThrowEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn InclusiveGatewayType> for TimerEventDefinition {}
impl Cast<dyn InclusiveGatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn InputSetType> for TimerEventDefinition {}
impl Cast<dyn InputSetTypeMut> for TimerEventDefinition {}
impl Cast<dyn InterfaceType> for TimerEventDefinition {}
impl Cast<dyn InterfaceTypeMut> for TimerEventDefinition {}
impl Cast<dyn IntermediateCatchEventType> for TimerEventDefinition {}
impl Cast<dyn IntermediateCatchEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn IntermediateThrowEventType> for TimerEventDefinition {}
impl Cast<dyn IntermediateThrowEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn InputOutputBindingType> for TimerEventDefinition {}
impl Cast<dyn InputOutputBindingTypeMut> for TimerEventDefinition {}
impl Cast<dyn InputOutputSpecificationType> for TimerEventDefinition {}
impl Cast<dyn InputOutputSpecificationTypeMut> for TimerEventDefinition {}
impl Cast<dyn ItemDefinitionType> for TimerEventDefinition {}
impl Cast<dyn ItemDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn LaneType> for TimerEventDefinition {}
impl Cast<dyn LaneTypeMut> for TimerEventDefinition {}
impl Cast<dyn LaneSetType> for TimerEventDefinition {}
impl Cast<dyn LaneSetTypeMut> for TimerEventDefinition {}
impl Cast<dyn LinkEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn LinkEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn LoopCharacteristicsType> for TimerEventDefinition {}
impl Cast<dyn LoopCharacteristicsTypeMut> for TimerEventDefinition {}
impl Cast<dyn ManualTaskType> for TimerEventDefinition {}
impl Cast<dyn ManualTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn MessageType> for TimerEventDefinition {}
impl Cast<dyn MessageTypeMut> for TimerEventDefinition {}
impl Cast<dyn MessageEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn MessageEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn MessageFlowType> for TimerEventDefinition {}
impl Cast<dyn MessageFlowTypeMut> for TimerEventDefinition {}
impl Cast<dyn MessageFlowAssociationType> for TimerEventDefinition {}
impl Cast<dyn MessageFlowAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn MonitoringType> for TimerEventDefinition {}
impl Cast<dyn MonitoringTypeMut> for TimerEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for TimerEventDefinition {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for TimerEventDefinition {}
impl Cast<dyn OperationType> for TimerEventDefinition {}
impl Cast<dyn OperationTypeMut> for TimerEventDefinition {}
impl Cast<dyn OutputSetType> for TimerEventDefinition {}
impl Cast<dyn OutputSetTypeMut> for TimerEventDefinition {}
impl Cast<dyn ParallelGatewayType> for TimerEventDefinition {}
impl Cast<dyn ParallelGatewayTypeMut> for TimerEventDefinition {}
impl Cast<dyn ParticipantType> for TimerEventDefinition {}
impl Cast<dyn ParticipantTypeMut> for TimerEventDefinition {}
impl Cast<dyn ParticipantAssociationType> for TimerEventDefinition {}
impl Cast<dyn ParticipantAssociationTypeMut> for TimerEventDefinition {}
impl Cast<dyn ParticipantMultiplicityType> for TimerEventDefinition {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for TimerEventDefinition {}
impl Cast<dyn PartnerEntityType> for TimerEventDefinition {}
impl Cast<dyn PartnerEntityTypeMut> for TimerEventDefinition {}
impl Cast<dyn PartnerRoleType> for TimerEventDefinition {}
impl Cast<dyn PartnerRoleTypeMut> for TimerEventDefinition {}
impl Cast<dyn PerformerType> for TimerEventDefinition {}
impl Cast<dyn PerformerTypeMut> for TimerEventDefinition {}
impl Cast<dyn PotentialOwnerType> for TimerEventDefinition {}
impl Cast<dyn PotentialOwnerTypeMut> for TimerEventDefinition {}
impl Cast<dyn ProcessType> for TimerEventDefinition {}
impl Cast<dyn ProcessTypeMut> for TimerEventDefinition {}
impl Cast<dyn PropertyType> for TimerEventDefinition {}
impl Cast<dyn PropertyTypeMut> for TimerEventDefinition {}
impl Cast<dyn ReceiveTaskType> for TimerEventDefinition {}
impl Cast<dyn ReceiveTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn RelationshipType> for TimerEventDefinition {}
impl Cast<dyn RelationshipTypeMut> for TimerEventDefinition {}
impl Cast<dyn RenderingType> for TimerEventDefinition {}
impl Cast<dyn RenderingTypeMut> for TimerEventDefinition {}
impl Cast<dyn ResourceType> for TimerEventDefinition {}
impl Cast<dyn ResourceTypeMut> for TimerEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionType> for TimerEventDefinition {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for TimerEventDefinition {}
impl Cast<dyn ResourceParameterType> for TimerEventDefinition {}
impl Cast<dyn ResourceParameterTypeMut> for TimerEventDefinition {}
impl Cast<dyn ResourceParameterBindingType> for TimerEventDefinition {}
impl Cast<dyn ResourceParameterBindingTypeMut> for TimerEventDefinition {}
impl Cast<dyn ResourceRoleType> for TimerEventDefinition {}
impl Cast<dyn ResourceRoleTypeMut> for TimerEventDefinition {}
impl Cast<dyn RootElementType> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn RootElementTypeMut> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ScriptTaskType> for TimerEventDefinition {}
impl Cast<dyn ScriptTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn ScriptType> for TimerEventDefinition {}
impl Cast<dyn ScriptTypeMut> for TimerEventDefinition {}
impl Cast<dyn SendTaskType> for TimerEventDefinition {}
impl Cast<dyn SendTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn SequenceFlowType> for TimerEventDefinition {}
impl Cast<dyn SequenceFlowTypeMut> for TimerEventDefinition {}
impl Cast<dyn ServiceTaskType> for TimerEventDefinition {}
impl Cast<dyn ServiceTaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn SignalType> for TimerEventDefinition {}
impl Cast<dyn SignalTypeMut> for TimerEventDefinition {}
impl Cast<dyn SignalEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn SignalEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsType> for TimerEventDefinition {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for TimerEventDefinition {}
impl Cast<dyn StartEventType> for TimerEventDefinition {}
impl Cast<dyn StartEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn SubChoreographyType> for TimerEventDefinition {}
impl Cast<dyn SubChoreographyTypeMut> for TimerEventDefinition {}
impl Cast<dyn SubConversationType> for TimerEventDefinition {}
impl Cast<dyn SubConversationTypeMut> for TimerEventDefinition {}
impl Cast<dyn SubProcessType> for TimerEventDefinition {}
impl Cast<dyn SubProcessTypeMut> for TimerEventDefinition {}
impl Cast<dyn TaskType> for TimerEventDefinition {}
impl Cast<dyn TaskTypeMut> for TimerEventDefinition {}
impl Cast<dyn TerminateEventDefinitionType> for TimerEventDefinition {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for TimerEventDefinition {}
impl Cast<dyn TextAnnotationType> for TimerEventDefinition {}
impl Cast<dyn TextAnnotationTypeMut> for TimerEventDefinition {}
impl Cast<dyn TextType> for TimerEventDefinition {}
impl Cast<dyn TextTypeMut> for TimerEventDefinition {}
impl Cast<dyn ThrowEventType> for TimerEventDefinition {}
impl Cast<dyn ThrowEventTypeMut> for TimerEventDefinition {}
impl Cast<dyn TimerEventDefinitionType> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for TimerEventDefinition {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TransactionType> for TimerEventDefinition {}
impl Cast<dyn TransactionTypeMut> for TimerEventDefinition {}
impl Cast<dyn UserTaskType> for TimerEventDefinition {}
impl Cast<dyn UserTaskTypeMut> for TimerEventDefinition {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:transaction")]
pub struct Transaction {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "triggeredByEvent")]
    #[tia("SubProcessType",rg*="triggered_byevent","SubProcessTypeMut",s)]
    pub triggered_byevent: Option<bool>,
    #[xml(child = "bpmn:laneSet")]
    #[tia("SubProcessType",rg*="lane_sets","SubProcessTypeMut",s,rmg*="lane_sets_mut")]
    pub lane_sets: Vec<LaneSet>,
    #[xml(
        child = "bpmn:adHocSubProcess",
        child = "bpmn:boundaryEvent",
        child = "bpmn:businessRuleTask",
        child = "bpmn:callActivity",
        child = "bpmn:callChoreography",
        child = "bpmn:choreographyTask",
        child = "bpmn:complexGateway",
        child = "bpmn:dataObject",
        child = "bpmn:dataObjectReference",
        child = "bpmn:dataStoreReference",
        child = "bpmn:endEvent",
        child = "bpmn:event",
        child = "bpmn:eventBasedGateway",
        child = "bpmn:exclusiveGateway",
        child = "bpmn:implicitThrowEvent",
        child = "bpmn:inclusiveGateway",
        child = "bpmn:intermediateCatchEvent",
        child = "bpmn:intermediateThrowEvent",
        child = "bpmn:manualTask",
        child = "bpmn:parallelGateway",
        child = "bpmn:receiveTask",
        child = "bpmn:scriptTask",
        child = "bpmn:sendTask",
        child = "bpmn:sequenceFlow",
        child = "bpmn:serviceTask",
        child = "bpmn:startEvent",
        child = "bpmn:subChoreography",
        child = "bpmn:subProcess",
        child = "bpmn:task",
        child = "bpmn:transaction",
        child = "bpmn:userTask"
    )]
    #[tia("SubProcessType",rg*="flow_elements","SubProcessTypeMut",s,rmg*="flow_elements_mut")]
    pub flow_elements: Vec<FlowElement>,
    #[xml(
        child = "bpmn:association",
        child = "bpmn:group",
        child = "bpmn:textAnnotation"
    )]
    #[tia("SubProcessType",rg*="artifacts","SubProcessTypeMut",s,rmg*="artifacts_mut")]
    pub artifacts: Vec<Artifact>,
    #[xml(attr = "method")]
    #[tia("TransactionType",rg*="method","TransactionTypeMut",s)]
    pub method: Option<String>,
}
impl DocumentElement for Transaction {
    fn element(&self) -> Element {
        Element::Transaction
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for Transaction {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }

        None
    }
}
// Traits

//

/// Access to `transaction`
pub trait TransactionType: SubProcessType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `method`
    fn method(&self) -> &Option<String>;
}
dyn_clone::clone_trait_object!(TransactionType);
impl_downcast!(TransactionType);
/// Mutable access to `transaction`
pub trait TransactionTypeMut:
    SubProcessTypeMut + Downcast + Debug + Send + DynClone + TransactionType
{
    /// Set value of attribute `method`
    fn set_method(&mut self, value: Option<String>);
}
dyn_clone::clone_trait_object!(TransactionTypeMut);
impl_downcast!(TransactionTypeMut);
impl Cast<dyn DefinitionsType> for Transaction {}
impl Cast<dyn DefinitionsTypeMut> for Transaction {}
impl Cast<dyn ImportType> for Transaction {}
impl Cast<dyn ImportTypeMut> for Transaction {}
impl Cast<dyn ActivityType> for Transaction {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for Transaction {}
impl Cast<dyn AdHocSubProcessTypeMut> for Transaction {}
impl Cast<dyn ArtifactType> for Transaction {}
impl Cast<dyn ArtifactTypeMut> for Transaction {}
impl Cast<dyn AssignmentType> for Transaction {}
impl Cast<dyn AssignmentTypeMut> for Transaction {}
impl Cast<dyn AssociationType> for Transaction {}
impl Cast<dyn AssociationTypeMut> for Transaction {}
impl Cast<dyn AuditingType> for Transaction {}
impl Cast<dyn AuditingTypeMut> for Transaction {}
impl Cast<dyn BaseElementType> for Transaction {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Transaction {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Transaction {}
impl Cast<dyn BoundaryEventType> for Transaction {}
impl Cast<dyn BoundaryEventTypeMut> for Transaction {}
impl Cast<dyn BusinessRuleTaskType> for Transaction {}
impl Cast<dyn BusinessRuleTaskTypeMut> for Transaction {}
impl Cast<dyn CallableElementType> for Transaction {}
impl Cast<dyn CallableElementTypeMut> for Transaction {}
impl Cast<dyn CallActivityType> for Transaction {}
impl Cast<dyn CallActivityTypeMut> for Transaction {}
impl Cast<dyn CallChoreographyType> for Transaction {}
impl Cast<dyn CallChoreographyTypeMut> for Transaction {}
impl Cast<dyn CallConversationType> for Transaction {}
impl Cast<dyn CallConversationTypeMut> for Transaction {}
impl Cast<dyn CancelEventDefinitionType> for Transaction {}
impl Cast<dyn CancelEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn CatchEventType> for Transaction {}
impl Cast<dyn CatchEventTypeMut> for Transaction {}
impl Cast<dyn CategoryType> for Transaction {}
impl Cast<dyn CategoryTypeMut> for Transaction {}
impl Cast<dyn CategoryValueType> for Transaction {}
impl Cast<dyn CategoryValueTypeMut> for Transaction {}
impl Cast<dyn ChoreographyType> for Transaction {}
impl Cast<dyn ChoreographyTypeMut> for Transaction {}
impl Cast<dyn ChoreographyActivityType> for Transaction {}
impl Cast<dyn ChoreographyActivityTypeMut> for Transaction {}
impl Cast<dyn ChoreographyTaskType> for Transaction {}
impl Cast<dyn ChoreographyTaskTypeMut> for Transaction {}
impl Cast<dyn CollaborationType> for Transaction {}
impl Cast<dyn CollaborationTypeMut> for Transaction {}
impl Cast<dyn CompensateEventDefinitionType> for Transaction {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn ComplexBehaviorDefinitionType> for Transaction {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Transaction {}
impl Cast<dyn ComplexGatewayType> for Transaction {}
impl Cast<dyn ComplexGatewayTypeMut> for Transaction {}
impl Cast<dyn ConditionalEventDefinitionType> for Transaction {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn ConversationType> for Transaction {}
impl Cast<dyn ConversationTypeMut> for Transaction {}
impl Cast<dyn ConversationAssociationType> for Transaction {}
impl Cast<dyn ConversationAssociationTypeMut> for Transaction {}
impl Cast<dyn ConversationLinkType> for Transaction {}
impl Cast<dyn ConversationLinkTypeMut> for Transaction {}
impl Cast<dyn ConversationNodeType> for Transaction {}
impl Cast<dyn ConversationNodeTypeMut> for Transaction {}
impl Cast<dyn CorrelationKeyType> for Transaction {}
impl Cast<dyn CorrelationKeyTypeMut> for Transaction {}
impl Cast<dyn CorrelationPropertyType> for Transaction {}
impl Cast<dyn CorrelationPropertyTypeMut> for Transaction {}
impl Cast<dyn CorrelationPropertyBindingType> for Transaction {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Transaction {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Transaction {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Transaction {}
impl Cast<dyn CorrelationSubscriptionType> for Transaction {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Transaction {}
impl Cast<dyn DataAssociationType> for Transaction {}
impl Cast<dyn DataAssociationTypeMut> for Transaction {}
impl Cast<dyn DataInputType> for Transaction {}
impl Cast<dyn DataInputTypeMut> for Transaction {}
impl Cast<dyn DataInputAssociationType> for Transaction {}
impl Cast<dyn DataInputAssociationTypeMut> for Transaction {}
impl Cast<dyn DataObjectType> for Transaction {}
impl Cast<dyn DataObjectTypeMut> for Transaction {}
impl Cast<dyn DataObjectReferenceType> for Transaction {}
impl Cast<dyn DataObjectReferenceTypeMut> for Transaction {}
impl Cast<dyn DataOutputType> for Transaction {}
impl Cast<dyn DataOutputTypeMut> for Transaction {}
impl Cast<dyn DataOutputAssociationType> for Transaction {}
impl Cast<dyn DataOutputAssociationTypeMut> for Transaction {}
impl Cast<dyn DataStateType> for Transaction {}
impl Cast<dyn DataStateTypeMut> for Transaction {}
impl Cast<dyn DataStoreType> for Transaction {}
impl Cast<dyn DataStoreTypeMut> for Transaction {}
impl Cast<dyn DataStoreReferenceType> for Transaction {}
impl Cast<dyn DataStoreReferenceTypeMut> for Transaction {}
impl Cast<dyn DocumentationType> for Transaction {}
impl Cast<dyn DocumentationTypeMut> for Transaction {}
impl Cast<dyn EndEventType> for Transaction {}
impl Cast<dyn EndEventTypeMut> for Transaction {}
impl Cast<dyn EndPointType> for Transaction {}
impl Cast<dyn EndPointTypeMut> for Transaction {}
impl Cast<dyn ErrorType> for Transaction {}
impl Cast<dyn ErrorTypeMut> for Transaction {}
impl Cast<dyn ErrorEventDefinitionType> for Transaction {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn EscalationType> for Transaction {}
impl Cast<dyn EscalationTypeMut> for Transaction {}
impl Cast<dyn EscalationEventDefinitionType> for Transaction {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn EventType> for Transaction {}
impl Cast<dyn EventTypeMut> for Transaction {}
impl Cast<dyn EventBasedGatewayType> for Transaction {}
impl Cast<dyn EventBasedGatewayTypeMut> for Transaction {}
impl Cast<dyn EventDefinitionType> for Transaction {}
impl Cast<dyn EventDefinitionTypeMut> for Transaction {}
impl Cast<dyn ExclusiveGatewayType> for Transaction {}
impl Cast<dyn ExclusiveGatewayTypeMut> for Transaction {}
impl Cast<dyn ExpressionType> for Transaction {}
impl Cast<dyn ExpressionTypeMut> for Transaction {}
impl Cast<dyn ExtensionType> for Transaction {}
impl Cast<dyn ExtensionTypeMut> for Transaction {}
impl Cast<dyn ExtensionElementsType> for Transaction {}
impl Cast<dyn ExtensionElementsTypeMut> for Transaction {}
impl Cast<dyn FlowElementType> for Transaction {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for Transaction {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for Transaction {}
impl Cast<dyn FormalExpressionTypeMut> for Transaction {}
impl Cast<dyn GatewayType> for Transaction {}
impl Cast<dyn GatewayTypeMut> for Transaction {}
impl Cast<dyn GlobalBusinessRuleTaskType> for Transaction {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Transaction {}
impl Cast<dyn GlobalChoreographyTaskType> for Transaction {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Transaction {}
impl Cast<dyn GlobalConversationType> for Transaction {}
impl Cast<dyn GlobalConversationTypeMut> for Transaction {}
impl Cast<dyn GlobalManualTaskType> for Transaction {}
impl Cast<dyn GlobalManualTaskTypeMut> for Transaction {}
impl Cast<dyn GlobalScriptTaskType> for Transaction {}
impl Cast<dyn GlobalScriptTaskTypeMut> for Transaction {}
impl Cast<dyn GlobalTaskType> for Transaction {}
impl Cast<dyn GlobalTaskTypeMut> for Transaction {}
impl Cast<dyn GlobalUserTaskType> for Transaction {}
impl Cast<dyn GlobalUserTaskTypeMut> for Transaction {}
impl Cast<dyn GroupType> for Transaction {}
impl Cast<dyn GroupTypeMut> for Transaction {}
impl Cast<dyn HumanPerformerType> for Transaction {}
impl Cast<dyn HumanPerformerTypeMut> for Transaction {}
impl Cast<dyn ImplicitThrowEventType> for Transaction {}
impl Cast<dyn ImplicitThrowEventTypeMut> for Transaction {}
impl Cast<dyn InclusiveGatewayType> for Transaction {}
impl Cast<dyn InclusiveGatewayTypeMut> for Transaction {}
impl Cast<dyn InputSetType> for Transaction {}
impl Cast<dyn InputSetTypeMut> for Transaction {}
impl Cast<dyn InterfaceType> for Transaction {}
impl Cast<dyn InterfaceTypeMut> for Transaction {}
impl Cast<dyn IntermediateCatchEventType> for Transaction {}
impl Cast<dyn IntermediateCatchEventTypeMut> for Transaction {}
impl Cast<dyn IntermediateThrowEventType> for Transaction {}
impl Cast<dyn IntermediateThrowEventTypeMut> for Transaction {}
impl Cast<dyn InputOutputBindingType> for Transaction {}
impl Cast<dyn InputOutputBindingTypeMut> for Transaction {}
impl Cast<dyn InputOutputSpecificationType> for Transaction {}
impl Cast<dyn InputOutputSpecificationTypeMut> for Transaction {}
impl Cast<dyn ItemDefinitionType> for Transaction {}
impl Cast<dyn ItemDefinitionTypeMut> for Transaction {}
impl Cast<dyn LaneType> for Transaction {}
impl Cast<dyn LaneTypeMut> for Transaction {}
impl Cast<dyn LaneSetType> for Transaction {}
impl Cast<dyn LaneSetTypeMut> for Transaction {}
impl Cast<dyn LinkEventDefinitionType> for Transaction {}
impl Cast<dyn LinkEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn LoopCharacteristicsType> for Transaction {}
impl Cast<dyn LoopCharacteristicsTypeMut> for Transaction {}
impl Cast<dyn ManualTaskType> for Transaction {}
impl Cast<dyn ManualTaskTypeMut> for Transaction {}
impl Cast<dyn MessageType> for Transaction {}
impl Cast<dyn MessageTypeMut> for Transaction {}
impl Cast<dyn MessageEventDefinitionType> for Transaction {}
impl Cast<dyn MessageEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn MessageFlowType> for Transaction {}
impl Cast<dyn MessageFlowTypeMut> for Transaction {}
impl Cast<dyn MessageFlowAssociationType> for Transaction {}
impl Cast<dyn MessageFlowAssociationTypeMut> for Transaction {}
impl Cast<dyn MonitoringType> for Transaction {}
impl Cast<dyn MonitoringTypeMut> for Transaction {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Transaction {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Transaction {}
impl Cast<dyn OperationType> for Transaction {}
impl Cast<dyn OperationTypeMut> for Transaction {}
impl Cast<dyn OutputSetType> for Transaction {}
impl Cast<dyn OutputSetTypeMut> for Transaction {}
impl Cast<dyn ParallelGatewayType> for Transaction {}
impl Cast<dyn ParallelGatewayTypeMut> for Transaction {}
impl Cast<dyn ParticipantType> for Transaction {}
impl Cast<dyn ParticipantTypeMut> for Transaction {}
impl Cast<dyn ParticipantAssociationType> for Transaction {}
impl Cast<dyn ParticipantAssociationTypeMut> for Transaction {}
impl Cast<dyn ParticipantMultiplicityType> for Transaction {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Transaction {}
impl Cast<dyn PartnerEntityType> for Transaction {}
impl Cast<dyn PartnerEntityTypeMut> for Transaction {}
impl Cast<dyn PartnerRoleType> for Transaction {}
impl Cast<dyn PartnerRoleTypeMut> for Transaction {}
impl Cast<dyn PerformerType> for Transaction {}
impl Cast<dyn PerformerTypeMut> for Transaction {}
impl Cast<dyn PotentialOwnerType> for Transaction {}
impl Cast<dyn PotentialOwnerTypeMut> for Transaction {}
impl Cast<dyn ProcessType> for Transaction {}
impl Cast<dyn ProcessTypeMut> for Transaction {}
impl Cast<dyn PropertyType> for Transaction {}
impl Cast<dyn PropertyTypeMut> for Transaction {}
impl Cast<dyn ReceiveTaskType> for Transaction {}
impl Cast<dyn ReceiveTaskTypeMut> for Transaction {}
impl Cast<dyn RelationshipType> for Transaction {}
impl Cast<dyn RelationshipTypeMut> for Transaction {}
impl Cast<dyn RenderingType> for Transaction {}
impl Cast<dyn RenderingTypeMut> for Transaction {}
impl Cast<dyn ResourceType> for Transaction {}
impl Cast<dyn ResourceTypeMut> for Transaction {}
impl Cast<dyn ResourceAssignmentExpressionType> for Transaction {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Transaction {}
impl Cast<dyn ResourceParameterType> for Transaction {}
impl Cast<dyn ResourceParameterTypeMut> for Transaction {}
impl Cast<dyn ResourceParameterBindingType> for Transaction {}
impl Cast<dyn ResourceParameterBindingTypeMut> for Transaction {}
impl Cast<dyn ResourceRoleType> for Transaction {}
impl Cast<dyn ResourceRoleTypeMut> for Transaction {}
impl Cast<dyn RootElementType> for Transaction {}
impl Cast<dyn RootElementTypeMut> for Transaction {}
impl Cast<dyn ScriptTaskType> for Transaction {}
impl Cast<dyn ScriptTaskTypeMut> for Transaction {}
impl Cast<dyn ScriptType> for Transaction {}
impl Cast<dyn ScriptTypeMut> for Transaction {}
impl Cast<dyn SendTaskType> for Transaction {}
impl Cast<dyn SendTaskTypeMut> for Transaction {}
impl Cast<dyn SequenceFlowType> for Transaction {}
impl Cast<dyn SequenceFlowTypeMut> for Transaction {}
impl Cast<dyn ServiceTaskType> for Transaction {}
impl Cast<dyn ServiceTaskTypeMut> for Transaction {}
impl Cast<dyn SignalType> for Transaction {}
impl Cast<dyn SignalTypeMut> for Transaction {}
impl Cast<dyn SignalEventDefinitionType> for Transaction {}
impl Cast<dyn SignalEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn StandardLoopCharacteristicsType> for Transaction {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Transaction {}
impl Cast<dyn StartEventType> for Transaction {}
impl Cast<dyn StartEventTypeMut> for Transaction {}
impl Cast<dyn SubChoreographyType> for Transaction {}
impl Cast<dyn SubChoreographyTypeMut> for Transaction {}
impl Cast<dyn SubConversationType> for Transaction {}
impl Cast<dyn SubConversationTypeMut> for Transaction {}
impl Cast<dyn SubProcessType> for Transaction {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn SubProcessTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskType> for Transaction {}
impl Cast<dyn TaskTypeMut> for Transaction {}
impl Cast<dyn TerminateEventDefinitionType> for Transaction {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn TextAnnotationType> for Transaction {}
impl Cast<dyn TextAnnotationTypeMut> for Transaction {}
impl Cast<dyn TextType> for Transaction {}
impl Cast<dyn TextTypeMut> for Transaction {}
impl Cast<dyn ThrowEventType> for Transaction {}
impl Cast<dyn ThrowEventTypeMut> for Transaction {}
impl Cast<dyn TimerEventDefinitionType> for Transaction {}
impl Cast<dyn TimerEventDefinitionTypeMut> for Transaction {}
impl Cast<dyn TransactionType> for Transaction {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TransactionTypeMut> for Transaction {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn UserTaskType> for Transaction {}
impl Cast<dyn UserTaskTypeMut> for Transaction {}
/// Auto-generated from BPNM schema
///
/// (See codegen-rust.xsl)
#[derive(Tia, Hash, Default, Clone, XmlRead, PartialEq, Debug, Serialize, Deserialize)]
#[xml(tag = "bpmn:userTask")]
pub struct UserTask {
    #[xml(attr = "id")]
    #[tia("BaseElementType",rg*="id","BaseElementTypeMut",s)]
    pub id: Option<Id>,
    #[xml(child = "bpmn:documentation")]
    #[tia("BaseElementType",rg*="documentations","BaseElementTypeMut",s,rmg*="documentations_mut")]
    pub documentations: Vec<Documentation>,
    #[xml(child = "bpmn:extensionElements")]
    #[tia("BaseElementType",rg*="extension_elements","BaseElementTypeMut",s,rmg*="extension_elements_mut")]
    pub extension_elements: Option<ExtensionElements>,
    #[xml(attr = "name")]
    #[tia("FlowElementType",rg*="name","FlowElementTypeMut",s)]
    pub name: Option<String>,
    #[xml(child = "bpmn:auditing")]
    #[tia("FlowElementType",rg*="auditing","FlowElementTypeMut",s,rmg*="auditing_mut")]
    pub auditing: Option<Auditing>,
    #[xml(child = "bpmn:monitoring")]
    #[tia("FlowElementType",rg*="monitoring","FlowElementTypeMut",s,rmg*="monitoring_mut")]
    pub monitoring: Option<Monitoring>,
    #[xml(flatten_text = "bpmn:categoryValueRef")]
    #[tia("FlowElementType",rg*="category_value_refs","FlowElementTypeMut",s,rmg*="category_value_refs_mut")]
    pub category_value_refs: Vec<String>,
    #[xml(flatten_text = "bpmn:incoming")]
    #[tia("FlowNodeType",rg*="incomings","FlowNodeTypeMut",s,rmg*="incomings_mut")]
    pub incomings: Vec<String>,
    #[xml(flatten_text = "bpmn:outgoing")]
    #[tia("FlowNodeType",rg*="outgoings","FlowNodeTypeMut",s,rmg*="outgoings_mut")]
    pub outgoings: Vec<String>,
    #[xml(attr = "isForCompensation")]
    #[tia("ActivityType",rg*="is_for_compensation","ActivityTypeMut",s)]
    pub is_for_compensation: Option<bool>,
    #[xml(attr = "startQuantity")]
    #[tia("ActivityType",rg*="start_quantity","ActivityTypeMut",s)]
    pub start_quantity: Option<Integer>,
    #[xml(attr = "completionQuantity")]
    #[tia("ActivityType",rg*="completion_quantity","ActivityTypeMut",s)]
    pub completion_quantity: Option<Integer>,
    #[xml(attr = "default")]
    #[tia("ActivityType",rg*="default","ActivityTypeMut",s)]
    pub default: Option<String>,
    #[xml(child = "bpmn:ioSpecification")]
    #[tia("ActivityType",rg*="io_specification","ActivityTypeMut",s,rmg*="io_specification_mut")]
    pub io_specification: Option<InputOutputSpecification>,
    #[xml(child = "bpmn:property")]
    #[tia("ActivityType",rg*="properties","ActivityTypeMut",s,rmg*="properties_mut")]
    pub properties: Vec<Property>,
    #[xml(child = "bpmn:dataInputAssociation")]
    #[tia("ActivityType",rg*="data_input_associations","ActivityTypeMut",s,rmg*="data_input_associations_mut")]
    pub data_input_associations: Vec<DataInputAssociation>,
    #[xml(child = "bpmn:dataOutputAssociation")]
    #[tia("ActivityType",rg*="data_output_associations","ActivityTypeMut",s,rmg*="data_output_associations_mut")]
    pub data_output_associations: Vec<DataOutputAssociation>,
    #[xml(child = "bpmn:resourceRole")]
    #[tia("ActivityType",rg*="resource_roles","ActivityTypeMut",s,rmg*="resource_roles_mut")]
    pub resource_roles: Vec<ResourceRole>,
    #[xml(
        child = "bpmn:multiInstanceLoopCharacteristics",
        child = "bpmn:standardLoopCharacteristics"
    )]
    #[tia("ActivityType",rg*="loop_characteristics","ActivityTypeMut",s,rmg*="loop_characteristics_mut")]
    pub loop_characteristics: Option<LoopCharacteristics>,
    #[xml(attr = "implementation")]
    #[tia("UserTaskType",rg*="implementation","UserTaskTypeMut",s)]
    pub implementation: Option<String>,
    #[xml(child = "bpmn:rendering")]
    #[tia("UserTaskType",rg*="renderings","UserTaskTypeMut",s,rmg*="renderings_mut")]
    pub renderings: Vec<Rendering>,
}
impl DocumentElement for UserTask {
    fn element(&self) -> Element {
        Element::UserTask
    }
}
#[allow(unused_variables)]
impl DocumentElementContainer for UserTask {
    fn find_by_id_mut(&mut self, id: &str) -> Option<&mut dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.renderings.find_by_id_mut(id) {
            return Some(e);
        }
        None
    }

    fn find_by_id(&self, id: &str) -> Option<&dyn DocumentElement> {
        if let Some(ref id_) = self.id {
            if id_ == id {
                return Some(self);
            }
        }
        if let Some(e) = self.renderings.find_by_id(id) {
            return Some(e);
        }
        None
    }
}
// Traits
impl TaskType for UserTask {}
impl TaskTypeMut for UserTask {}
//

/// Access to `userTask`
pub trait UserTaskType: TaskType + Downcast + Debug + Send + DynClone {
    /// Get value of attribute `implementation`
    fn implementation(&self) -> &Option<String>;
    /// Get value of `rendering` child
    fn renderings(&self) -> &Vec<Rendering>;
}
dyn_clone::clone_trait_object!(UserTaskType);
impl_downcast!(UserTaskType);
/// Mutable access to `userTask`
pub trait UserTaskTypeMut: TaskTypeMut + Downcast + Debug + Send + DynClone + UserTaskType {
    /// Set value of attribute `implementation`
    fn set_implementation(&mut self, value: Option<String>);
    /// Get a mutable value of `rendering` child
    fn renderings_mut(&mut self) -> &mut Vec<Rendering>;
    /// Set value of `rendering` child
    fn set_renderings(&mut self, value: Vec<Rendering>);
}
dyn_clone::clone_trait_object!(UserTaskTypeMut);
impl_downcast!(UserTaskTypeMut);
impl Cast<dyn DefinitionsType> for UserTask {}
impl Cast<dyn DefinitionsTypeMut> for UserTask {}
impl Cast<dyn ImportType> for UserTask {}
impl Cast<dyn ImportTypeMut> for UserTask {}
impl Cast<dyn ActivityType> for UserTask {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn ActivityTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn AdHocSubProcessType> for UserTask {}
impl Cast<dyn AdHocSubProcessTypeMut> for UserTask {}
impl Cast<dyn ArtifactType> for UserTask {}
impl Cast<dyn ArtifactTypeMut> for UserTask {}
impl Cast<dyn AssignmentType> for UserTask {}
impl Cast<dyn AssignmentTypeMut> for UserTask {}
impl Cast<dyn AssociationType> for UserTask {}
impl Cast<dyn AssociationTypeMut> for UserTask {}
impl Cast<dyn AuditingType> for UserTask {}
impl Cast<dyn AuditingTypeMut> for UserTask {}
impl Cast<dyn BaseElementType> for UserTask {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for UserTask {}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for UserTask {}
impl Cast<dyn BoundaryEventType> for UserTask {}
impl Cast<dyn BoundaryEventTypeMut> for UserTask {}
impl Cast<dyn BusinessRuleTaskType> for UserTask {}
impl Cast<dyn BusinessRuleTaskTypeMut> for UserTask {}
impl Cast<dyn CallableElementType> for UserTask {}
impl Cast<dyn CallableElementTypeMut> for UserTask {}
impl Cast<dyn CallActivityType> for UserTask {}
impl Cast<dyn CallActivityTypeMut> for UserTask {}
impl Cast<dyn CallChoreographyType> for UserTask {}
impl Cast<dyn CallChoreographyTypeMut> for UserTask {}
impl Cast<dyn CallConversationType> for UserTask {}
impl Cast<dyn CallConversationTypeMut> for UserTask {}
impl Cast<dyn CancelEventDefinitionType> for UserTask {}
impl Cast<dyn CancelEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn CatchEventType> for UserTask {}
impl Cast<dyn CatchEventTypeMut> for UserTask {}
impl Cast<dyn CategoryType> for UserTask {}
impl Cast<dyn CategoryTypeMut> for UserTask {}
impl Cast<dyn CategoryValueType> for UserTask {}
impl Cast<dyn CategoryValueTypeMut> for UserTask {}
impl Cast<dyn ChoreographyType> for UserTask {}
impl Cast<dyn ChoreographyTypeMut> for UserTask {}
impl Cast<dyn ChoreographyActivityType> for UserTask {}
impl Cast<dyn ChoreographyActivityTypeMut> for UserTask {}
impl Cast<dyn ChoreographyTaskType> for UserTask {}
impl Cast<dyn ChoreographyTaskTypeMut> for UserTask {}
impl Cast<dyn CollaborationType> for UserTask {}
impl Cast<dyn CollaborationTypeMut> for UserTask {}
impl Cast<dyn CompensateEventDefinitionType> for UserTask {}
impl Cast<dyn CompensateEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn ComplexBehaviorDefinitionType> for UserTask {}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for UserTask {}
impl Cast<dyn ComplexGatewayType> for UserTask {}
impl Cast<dyn ComplexGatewayTypeMut> for UserTask {}
impl Cast<dyn ConditionalEventDefinitionType> for UserTask {}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn ConversationType> for UserTask {}
impl Cast<dyn ConversationTypeMut> for UserTask {}
impl Cast<dyn ConversationAssociationType> for UserTask {}
impl Cast<dyn ConversationAssociationTypeMut> for UserTask {}
impl Cast<dyn ConversationLinkType> for UserTask {}
impl Cast<dyn ConversationLinkTypeMut> for UserTask {}
impl Cast<dyn ConversationNodeType> for UserTask {}
impl Cast<dyn ConversationNodeTypeMut> for UserTask {}
impl Cast<dyn CorrelationKeyType> for UserTask {}
impl Cast<dyn CorrelationKeyTypeMut> for UserTask {}
impl Cast<dyn CorrelationPropertyType> for UserTask {}
impl Cast<dyn CorrelationPropertyTypeMut> for UserTask {}
impl Cast<dyn CorrelationPropertyBindingType> for UserTask {}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for UserTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for UserTask {}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for UserTask {}
impl Cast<dyn CorrelationSubscriptionType> for UserTask {}
impl Cast<dyn CorrelationSubscriptionTypeMut> for UserTask {}
impl Cast<dyn DataAssociationType> for UserTask {}
impl Cast<dyn DataAssociationTypeMut> for UserTask {}
impl Cast<dyn DataInputType> for UserTask {}
impl Cast<dyn DataInputTypeMut> for UserTask {}
impl Cast<dyn DataInputAssociationType> for UserTask {}
impl Cast<dyn DataInputAssociationTypeMut> for UserTask {}
impl Cast<dyn DataObjectType> for UserTask {}
impl Cast<dyn DataObjectTypeMut> for UserTask {}
impl Cast<dyn DataObjectReferenceType> for UserTask {}
impl Cast<dyn DataObjectReferenceTypeMut> for UserTask {}
impl Cast<dyn DataOutputType> for UserTask {}
impl Cast<dyn DataOutputTypeMut> for UserTask {}
impl Cast<dyn DataOutputAssociationType> for UserTask {}
impl Cast<dyn DataOutputAssociationTypeMut> for UserTask {}
impl Cast<dyn DataStateType> for UserTask {}
impl Cast<dyn DataStateTypeMut> for UserTask {}
impl Cast<dyn DataStoreType> for UserTask {}
impl Cast<dyn DataStoreTypeMut> for UserTask {}
impl Cast<dyn DataStoreReferenceType> for UserTask {}
impl Cast<dyn DataStoreReferenceTypeMut> for UserTask {}
impl Cast<dyn DocumentationType> for UserTask {}
impl Cast<dyn DocumentationTypeMut> for UserTask {}
impl Cast<dyn EndEventType> for UserTask {}
impl Cast<dyn EndEventTypeMut> for UserTask {}
impl Cast<dyn EndPointType> for UserTask {}
impl Cast<dyn EndPointTypeMut> for UserTask {}
impl Cast<dyn ErrorType> for UserTask {}
impl Cast<dyn ErrorTypeMut> for UserTask {}
impl Cast<dyn ErrorEventDefinitionType> for UserTask {}
impl Cast<dyn ErrorEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn EscalationType> for UserTask {}
impl Cast<dyn EscalationTypeMut> for UserTask {}
impl Cast<dyn EscalationEventDefinitionType> for UserTask {}
impl Cast<dyn EscalationEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn EventType> for UserTask {}
impl Cast<dyn EventTypeMut> for UserTask {}
impl Cast<dyn EventBasedGatewayType> for UserTask {}
impl Cast<dyn EventBasedGatewayTypeMut> for UserTask {}
impl Cast<dyn EventDefinitionType> for UserTask {}
impl Cast<dyn EventDefinitionTypeMut> for UserTask {}
impl Cast<dyn ExclusiveGatewayType> for UserTask {}
impl Cast<dyn ExclusiveGatewayTypeMut> for UserTask {}
impl Cast<dyn ExpressionType> for UserTask {}
impl Cast<dyn ExpressionTypeMut> for UserTask {}
impl Cast<dyn ExtensionType> for UserTask {}
impl Cast<dyn ExtensionTypeMut> for UserTask {}
impl Cast<dyn ExtensionElementsType> for UserTask {}
impl Cast<dyn ExtensionElementsTypeMut> for UserTask {}
impl Cast<dyn FlowElementType> for UserTask {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowElementTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeType> for UserTask {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FlowNodeTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn FormalExpressionType> for UserTask {}
impl Cast<dyn FormalExpressionTypeMut> for UserTask {}
impl Cast<dyn GatewayType> for UserTask {}
impl Cast<dyn GatewayTypeMut> for UserTask {}
impl Cast<dyn GlobalBusinessRuleTaskType> for UserTask {}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for UserTask {}
impl Cast<dyn GlobalChoreographyTaskType> for UserTask {}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for UserTask {}
impl Cast<dyn GlobalConversationType> for UserTask {}
impl Cast<dyn GlobalConversationTypeMut> for UserTask {}
impl Cast<dyn GlobalManualTaskType> for UserTask {}
impl Cast<dyn GlobalManualTaskTypeMut> for UserTask {}
impl Cast<dyn GlobalScriptTaskType> for UserTask {}
impl Cast<dyn GlobalScriptTaskTypeMut> for UserTask {}
impl Cast<dyn GlobalTaskType> for UserTask {}
impl Cast<dyn GlobalTaskTypeMut> for UserTask {}
impl Cast<dyn GlobalUserTaskType> for UserTask {}
impl Cast<dyn GlobalUserTaskTypeMut> for UserTask {}
impl Cast<dyn GroupType> for UserTask {}
impl Cast<dyn GroupTypeMut> for UserTask {}
impl Cast<dyn HumanPerformerType> for UserTask {}
impl Cast<dyn HumanPerformerTypeMut> for UserTask {}
impl Cast<dyn ImplicitThrowEventType> for UserTask {}
impl Cast<dyn ImplicitThrowEventTypeMut> for UserTask {}
impl Cast<dyn InclusiveGatewayType> for UserTask {}
impl Cast<dyn InclusiveGatewayTypeMut> for UserTask {}
impl Cast<dyn InputSetType> for UserTask {}
impl Cast<dyn InputSetTypeMut> for UserTask {}
impl Cast<dyn InterfaceType> for UserTask {}
impl Cast<dyn InterfaceTypeMut> for UserTask {}
impl Cast<dyn IntermediateCatchEventType> for UserTask {}
impl Cast<dyn IntermediateCatchEventTypeMut> for UserTask {}
impl Cast<dyn IntermediateThrowEventType> for UserTask {}
impl Cast<dyn IntermediateThrowEventTypeMut> for UserTask {}
impl Cast<dyn InputOutputBindingType> for UserTask {}
impl Cast<dyn InputOutputBindingTypeMut> for UserTask {}
impl Cast<dyn InputOutputSpecificationType> for UserTask {}
impl Cast<dyn InputOutputSpecificationTypeMut> for UserTask {}
impl Cast<dyn ItemDefinitionType> for UserTask {}
impl Cast<dyn ItemDefinitionTypeMut> for UserTask {}
impl Cast<dyn LaneType> for UserTask {}
impl Cast<dyn LaneTypeMut> for UserTask {}
impl Cast<dyn LaneSetType> for UserTask {}
impl Cast<dyn LaneSetTypeMut> for UserTask {}
impl Cast<dyn LinkEventDefinitionType> for UserTask {}
impl Cast<dyn LinkEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn LoopCharacteristicsType> for UserTask {}
impl Cast<dyn LoopCharacteristicsTypeMut> for UserTask {}
impl Cast<dyn ManualTaskType> for UserTask {}
impl Cast<dyn ManualTaskTypeMut> for UserTask {}
impl Cast<dyn MessageType> for UserTask {}
impl Cast<dyn MessageTypeMut> for UserTask {}
impl Cast<dyn MessageEventDefinitionType> for UserTask {}
impl Cast<dyn MessageEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn MessageFlowType> for UserTask {}
impl Cast<dyn MessageFlowTypeMut> for UserTask {}
impl Cast<dyn MessageFlowAssociationType> for UserTask {}
impl Cast<dyn MessageFlowAssociationTypeMut> for UserTask {}
impl Cast<dyn MonitoringType> for UserTask {}
impl Cast<dyn MonitoringTypeMut> for UserTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for UserTask {}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for UserTask {}
impl Cast<dyn OperationType> for UserTask {}
impl Cast<dyn OperationTypeMut> for UserTask {}
impl Cast<dyn OutputSetType> for UserTask {}
impl Cast<dyn OutputSetTypeMut> for UserTask {}
impl Cast<dyn ParallelGatewayType> for UserTask {}
impl Cast<dyn ParallelGatewayTypeMut> for UserTask {}
impl Cast<dyn ParticipantType> for UserTask {}
impl Cast<dyn ParticipantTypeMut> for UserTask {}
impl Cast<dyn ParticipantAssociationType> for UserTask {}
impl Cast<dyn ParticipantAssociationTypeMut> for UserTask {}
impl Cast<dyn ParticipantMultiplicityType> for UserTask {}
impl Cast<dyn ParticipantMultiplicityTypeMut> for UserTask {}
impl Cast<dyn PartnerEntityType> for UserTask {}
impl Cast<dyn PartnerEntityTypeMut> for UserTask {}
impl Cast<dyn PartnerRoleType> for UserTask {}
impl Cast<dyn PartnerRoleTypeMut> for UserTask {}
impl Cast<dyn PerformerType> for UserTask {}
impl Cast<dyn PerformerTypeMut> for UserTask {}
impl Cast<dyn PotentialOwnerType> for UserTask {}
impl Cast<dyn PotentialOwnerTypeMut> for UserTask {}
impl Cast<dyn ProcessType> for UserTask {}
impl Cast<dyn ProcessTypeMut> for UserTask {}
impl Cast<dyn PropertyType> for UserTask {}
impl Cast<dyn PropertyTypeMut> for UserTask {}
impl Cast<dyn ReceiveTaskType> for UserTask {}
impl Cast<dyn ReceiveTaskTypeMut> for UserTask {}
impl Cast<dyn RelationshipType> for UserTask {}
impl Cast<dyn RelationshipTypeMut> for UserTask {}
impl Cast<dyn RenderingType> for UserTask {}
impl Cast<dyn RenderingTypeMut> for UserTask {}
impl Cast<dyn ResourceType> for UserTask {}
impl Cast<dyn ResourceTypeMut> for UserTask {}
impl Cast<dyn ResourceAssignmentExpressionType> for UserTask {}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for UserTask {}
impl Cast<dyn ResourceParameterType> for UserTask {}
impl Cast<dyn ResourceParameterTypeMut> for UserTask {}
impl Cast<dyn ResourceParameterBindingType> for UserTask {}
impl Cast<dyn ResourceParameterBindingTypeMut> for UserTask {}
impl Cast<dyn ResourceRoleType> for UserTask {}
impl Cast<dyn ResourceRoleTypeMut> for UserTask {}
impl Cast<dyn RootElementType> for UserTask {}
impl Cast<dyn RootElementTypeMut> for UserTask {}
impl Cast<dyn ScriptTaskType> for UserTask {}
impl Cast<dyn ScriptTaskTypeMut> for UserTask {}
impl Cast<dyn ScriptType> for UserTask {}
impl Cast<dyn ScriptTypeMut> for UserTask {}
impl Cast<dyn SendTaskType> for UserTask {}
impl Cast<dyn SendTaskTypeMut> for UserTask {}
impl Cast<dyn SequenceFlowType> for UserTask {}
impl Cast<dyn SequenceFlowTypeMut> for UserTask {}
impl Cast<dyn ServiceTaskType> for UserTask {}
impl Cast<dyn ServiceTaskTypeMut> for UserTask {}
impl Cast<dyn SignalType> for UserTask {}
impl Cast<dyn SignalTypeMut> for UserTask {}
impl Cast<dyn SignalEventDefinitionType> for UserTask {}
impl Cast<dyn SignalEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn StandardLoopCharacteristicsType> for UserTask {}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for UserTask {}
impl Cast<dyn StartEventType> for UserTask {}
impl Cast<dyn StartEventTypeMut> for UserTask {}
impl Cast<dyn SubChoreographyType> for UserTask {}
impl Cast<dyn SubChoreographyTypeMut> for UserTask {}
impl Cast<dyn SubConversationType> for UserTask {}
impl Cast<dyn SubConversationTypeMut> for UserTask {}
impl Cast<dyn SubProcessType> for UserTask {}
impl Cast<dyn SubProcessTypeMut> for UserTask {}
impl Cast<dyn TaskType> for UserTask {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TaskTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn TerminateEventDefinitionType> for UserTask {}
impl Cast<dyn TerminateEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn TextAnnotationType> for UserTask {}
impl Cast<dyn TextAnnotationTypeMut> for UserTask {}
impl Cast<dyn TextType> for UserTask {}
impl Cast<dyn TextTypeMut> for UserTask {}
impl Cast<dyn ThrowEventType> for UserTask {}
impl Cast<dyn ThrowEventTypeMut> for UserTask {}
impl Cast<dyn TimerEventDefinitionType> for UserTask {}
impl Cast<dyn TimerEventDefinitionTypeMut> for UserTask {}
impl Cast<dyn TransactionType> for UserTask {}
impl Cast<dyn TransactionTypeMut> for UserTask {}
impl Cast<dyn UserTaskType> for UserTask {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        Some(self)
    }

    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        Some(self)
    }
}
impl Cast<dyn UserTaskTypeMut> for UserTask {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        Some(self)
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        Some(self)
    }
}
impl Cast<dyn DefinitionsType> for Expr {
    fn cast(&self) -> Option<&(dyn DefinitionsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DefinitionsType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DefinitionsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DefinitionsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DefinitionsTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DefinitionsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DefinitionsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DefinitionsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DefinitionsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportType> for Expr {
    fn cast(&self) -> Option<&(dyn ImportType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImportType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ImportType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImportType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ImportType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImportTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ImportTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImportTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ImportTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImportTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ImportTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityType> for Expr {
    fn cast(&self) -> Option<&(dyn ActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ActivityType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ActivityType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ActivityTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ActivityTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessType> for Expr {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AdHocSubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AdHocSubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AdHocSubProcessTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AdHocSubProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AdHocSubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactType> for Expr {
    fn cast(&self) -> Option<&(dyn ArtifactType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ArtifactType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ArtifactType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ArtifactType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ArtifactType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ArtifactTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ArtifactTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ArtifactTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ArtifactTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ArtifactTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentType> for Expr {
    fn cast(&self) -> Option<&(dyn AssignmentType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssignmentType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AssignmentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssignmentType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AssignmentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssignmentTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn AssignmentTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AssignmentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssignmentTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AssignmentTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn AssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn AssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingType> for Expr {
    fn cast(&self) -> Option<&(dyn AuditingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AuditingType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AuditingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AuditingType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AuditingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn AuditingTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn AuditingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AuditingTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn AuditingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn AuditingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn AuditingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementType> for Expr {
    fn cast(&self) -> Option<&(dyn BaseElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn BaseElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentType> for Expr {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementWithMixedContentType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementWithMixedContentType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BaseElementWithMixedContentTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BaseElementWithMixedContentTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn BaseElementWithMixedContentTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn BoundaryEventType> for Expr {
    fn cast(&self) -> Option<&(dyn BoundaryEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BoundaryEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BoundaryEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BoundaryEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BoundaryEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn BoundaryEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BoundaryEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BoundaryEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BoundaryEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn BusinessRuleTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn BusinessRuleTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn BusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementType> for Expr {
    fn cast(&self) -> Option<&(dyn CallableElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallableElementType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallableElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallableElementType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallableElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallableElementTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CallableElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallableElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallableElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallableElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityType> for Expr {
    fn cast(&self) -> Option<&(dyn CallActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallActivityType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallActivityType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallActivityTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CallActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyType> for Expr {
    fn cast(&self) -> Option<&(dyn CallChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallChoreographyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallChoreographyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CallChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationType> for Expr {
    fn cast(&self) -> Option<&(dyn CallConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallConversationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallConversationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CallConversationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CallConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CallConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CallConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CallConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CancelEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CancelEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CancelEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CancelEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CancelEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventType> for Expr {
    fn cast(&self) -> Option<&(dyn CatchEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CatchEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CatchEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CatchEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CatchEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CatchEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryType> for Expr {
    fn cast(&self) -> Option<&(dyn CategoryType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CategoryTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueType> for Expr {
    fn cast(&self) -> Option<&(dyn CategoryValueType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryValueType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryValueType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryValueType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CategoryValueTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CategoryValueTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryValueTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CategoryValueTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CategoryValueTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyType> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityType> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyActivityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyActivityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyActivityTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyActivityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyActivityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ChoreographyTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ChoreographyTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationType> for Expr {
    fn cast(&self) -> Option<&(dyn CollaborationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CollaborationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CollaborationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CollaborationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CollaborationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CollaborationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CollaborationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CollaborationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CollaborationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CollaborationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CompensateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CompensateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CompensateEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CompensateEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CompensateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexBehaviorDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexBehaviorDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexBehaviorDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexBehaviorDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn ComplexGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexGatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ComplexGatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ComplexGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ComplexGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConditionalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConditionalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConditionalEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConditionalEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConditionalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationType> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkType> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationLinkType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationLinkType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationLinkType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationLinkType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationLinkTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationLinkTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationLinkTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationLinkTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationLinkTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeType> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationNodeType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationNodeType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ConversationNodeTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ConversationNodeTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ConversationNodeTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ConversationNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyType> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationKeyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationKeyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationKeyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationKeyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationKeyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationKeyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationKeyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationKeyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyType> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingType> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyBindingTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationPropertyBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationPropertyBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionType> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
            Expr::FormalExpression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationPropertyRetrievalExpressionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
            Expr::FormalExpression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(
        &mut self,
    ) -> Option<&mut (dyn CorrelationPropertyRetrievalExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
            Expr::FormalExpression(e) => {
                Cast::<dyn CorrelationPropertyRetrievalExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn CorrelationSubscriptionType> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationSubscriptionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationSubscriptionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn CorrelationSubscriptionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn CorrelationSubscriptionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn CorrelationSubscriptionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn DataAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputType> for Expr {
    fn cast(&self) -> Option<&(dyn DataInputType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataInputTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn DataInputAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataInputAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataInputAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataInputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectType> for Expr {
    fn cast(&self) -> Option<&(dyn DataObjectType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataObjectTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceType> for Expr {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataObjectReferenceTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataObjectReferenceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataObjectReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputType> for Expr {
    fn cast(&self) -> Option<&(dyn DataOutputType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataOutputTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataOutputAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataOutputAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataOutputAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateType> for Expr {
    fn cast(&self) -> Option<&(dyn DataStateType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStateType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStateType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStateType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStateType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStateTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataStateTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStateTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStateTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStateTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStateTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreType> for Expr {
    fn cast(&self) -> Option<&(dyn DataStoreType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataStoreTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceType> for Expr {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreReferenceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreReferenceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DataStoreReferenceTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DataStoreReferenceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DataStoreReferenceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationType> for Expr {
    fn cast(&self) -> Option<&(dyn DocumentationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DocumentationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DocumentationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DocumentationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DocumentationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn DocumentationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn DocumentationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn DocumentationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn DocumentationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn DocumentationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventType> for Expr {
    fn cast(&self) -> Option<&(dyn EndEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EndEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EndEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EndEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EndEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EndEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointType> for Expr {
    fn cast(&self) -> Option<&(dyn EndPointType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndPointType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EndPointType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndPointType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EndPointType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EndPointTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EndPointTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndPointTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EndPointTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EndPointTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EndPointTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorType> for Expr {
    fn cast(&self) -> Option<&(dyn ErrorType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ErrorTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ErrorEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ErrorEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ErrorEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationType> for Expr {
    fn cast(&self) -> Option<&(dyn EscalationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EscalationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EscalationEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EscalationEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EscalationEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventType> for Expr {
    fn cast(&self) -> Option<&(dyn EventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventBasedGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventBasedGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventBasedGatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventBasedGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventBasedGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn EventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn EventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn EventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn EventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn EventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn EventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExclusiveGatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExclusiveGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionType> for Expr {
    fn cast(&self) -> Option<&(dyn ExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExpressionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExpressionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExpressionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionType> for Expr {
    fn cast(&self) -> Option<&(dyn ExtensionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ExtensionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsType> for Expr {
    fn cast(&self) -> Option<&(dyn ExtensionElementsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionElementsType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionElementsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionElementsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ExtensionElementsTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionElementsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ExtensionElementsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ExtensionElementsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementType> for Expr {
    fn cast(&self) -> Option<&(dyn FlowElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowElementType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowElementType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowElementTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn FlowElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeType> for Expr {
    fn cast(&self) -> Option<&(dyn FlowNodeType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowNodeType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowNodeType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowNodeType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FlowNodeTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn FlowNodeTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowNodeTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FlowNodeTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FlowNodeTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionType> for Expr {
    fn cast(&self) -> Option<&(dyn FormalExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FormalExpressionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FormalExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FormalExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn FormalExpressionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn FormalExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn FormalExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn FormalExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn FormalExpressionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn GatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalBusinessRuleTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalBusinessRuleTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalBusinessRuleTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalBusinessRuleTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalChoreographyTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalChoreographyTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalChoreographyTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalChoreographyTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalChoreographyTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalConversationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalConversationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalManualTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalManualTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalScriptTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalScriptTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalUserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalUserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GlobalUserTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GlobalUserTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GlobalUserTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupType> for Expr {
    fn cast(&self) -> Option<&(dyn GroupType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GroupType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GroupType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GroupType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GroupType>::cast_mut(e),
        }
    }
}
impl Cast<dyn GroupTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn GroupTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GroupTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn GroupTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn GroupTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn GroupTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerType> for Expr {
    fn cast(&self) -> Option<&(dyn HumanPerformerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn HumanPerformerType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn HumanPerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn HumanPerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn HumanPerformerTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn HumanPerformerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn HumanPerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn HumanPerformerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn HumanPerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventType> for Expr {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ImplicitThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ImplicitThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ImplicitThrowEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ImplicitThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ImplicitThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InclusiveGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InclusiveGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InclusiveGatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InclusiveGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InclusiveGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetType> for Expr {
    fn cast(&self) -> Option<&(dyn InputSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputSetType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputSetType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputSetTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn InputSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputSetTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceType> for Expr {
    fn cast(&self) -> Option<&(dyn InterfaceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InterfaceType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InterfaceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InterfaceType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InterfaceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InterfaceTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn InterfaceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InterfaceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InterfaceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InterfaceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventType> for Expr {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateCatchEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateCatchEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateCatchEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateCatchEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateCatchEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventType> for Expr {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn IntermediateThrowEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn IntermediateThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn IntermediateThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingType> for Expr {
    fn cast(&self) -> Option<&(dyn InputOutputBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputBindingType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputBindingTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationType> for Expr {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputSpecificationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputSpecificationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn InputOutputSpecificationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn InputOutputSpecificationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn InputOutputSpecificationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn ItemDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ItemDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ItemDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ItemDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ItemDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ItemDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ItemDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ItemDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneType> for Expr {
    fn cast(&self) -> Option<&(dyn LaneType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn LaneTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetType> for Expr {
    fn cast(&self) -> Option<&(dyn LaneSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneSetType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneSetType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LaneSetTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn LaneSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LaneSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LaneSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LinkEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LinkEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LinkEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LinkEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LinkEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsType> for Expr {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn LoopCharacteristicsTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn LoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn LoopCharacteristicsTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn ManualTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ManualTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ManualTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ManualTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ManualTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ManualTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ManualTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ManualTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ManualTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageType> for Expr {
    fn cast(&self) -> Option<&(dyn MessageType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MessageTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowType> for Expr {
    fn cast(&self) -> Option<&(dyn MessageFlowType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MessageFlowTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MessageFlowAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MessageFlowAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MessageFlowAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringType> for Expr {
    fn cast(&self) -> Option<&(dyn MonitoringType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MonitoringType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MonitoringType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MonitoringType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MonitoringType>::cast_mut(e),
        }
    }
}
impl Cast<dyn MonitoringTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MonitoringTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MonitoringTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MonitoringTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn MonitoringTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsType> for Expr {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsType>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn MultiInstanceLoopCharacteristicsTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast(e)
            }
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn MultiInstanceLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn MultiInstanceLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn OperationType> for Expr {
    fn cast(&self) -> Option<&(dyn OperationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OperationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn OperationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OperationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn OperationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OperationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn OperationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OperationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn OperationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OperationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn OperationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetType> for Expr {
    fn cast(&self) -> Option<&(dyn OutputSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OutputSetType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn OutputSetType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OutputSetType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn OutputSetType>::cast_mut(e),
        }
    }
}
impl Cast<dyn OutputSetTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn OutputSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn OutputSetTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn OutputSetTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn OutputSetTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayType> for Expr {
    fn cast(&self) -> Option<&(dyn ParallelGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParallelGatewayType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParallelGatewayType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParallelGatewayType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParallelGatewayTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParallelGatewayTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParallelGatewayTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParallelGatewayTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantType> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationType> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantAssociationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantAssociationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantAssociationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantAssociationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantAssociationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityType> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantMultiplicityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantMultiplicityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ParticipantMultiplicityTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ParticipantMultiplicityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ParticipantMultiplicityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityType> for Expr {
    fn cast(&self) -> Option<&(dyn PartnerEntityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerEntityType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerEntityType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerEntityType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerEntityTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn PartnerEntityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerEntityTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerEntityTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerEntityTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleType> for Expr {
    fn cast(&self) -> Option<&(dyn PartnerRoleType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerRoleType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PartnerRoleTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn PartnerRoleTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PartnerRoleTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PartnerRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerType> for Expr {
    fn cast(&self) -> Option<&(dyn PerformerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PerformerType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PerformerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PerformerType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PerformerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PerformerTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn PerformerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PerformerTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PerformerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PerformerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PerformerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerType> for Expr {
    fn cast(&self) -> Option<&(dyn PotentialOwnerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PotentialOwnerType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PotentialOwnerType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PotentialOwnerType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PotentialOwnerTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PotentialOwnerTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PotentialOwnerTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PotentialOwnerTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessType> for Expr {
    fn cast(&self) -> Option<&(dyn ProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ProcessType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ProcessType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ProcessTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ProcessTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyType> for Expr {
    fn cast(&self) -> Option<&(dyn PropertyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PropertyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PropertyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PropertyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PropertyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn PropertyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn PropertyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PropertyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn PropertyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn PropertyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn PropertyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn ReceiveTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ReceiveTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ReceiveTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ReceiveTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ReceiveTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ReceiveTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ReceiveTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ReceiveTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipType> for Expr {
    fn cast(&self) -> Option<&(dyn RelationshipType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RelationshipType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RelationshipType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RelationshipType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RelationshipType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RelationshipTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn RelationshipTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RelationshipTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RelationshipTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RelationshipTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingType> for Expr {
    fn cast(&self) -> Option<&(dyn RenderingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RenderingType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RenderingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RenderingType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RenderingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RenderingTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn RenderingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RenderingTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RenderingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RenderingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RenderingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceType> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionType> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceAssignmentExpressionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceAssignmentExpressionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceAssignmentExpressionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn ResourceAssignmentExpressionTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn ResourceParameterType> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceParameterType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceParameterTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingType> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterBindingType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterBindingType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceParameterBindingTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceParameterBindingTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceParameterBindingTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleType> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceRoleType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceRoleType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceRoleType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceRoleType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ResourceRoleTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ResourceRoleTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceRoleTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ResourceRoleTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ResourceRoleTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementType> for Expr {
    fn cast(&self) -> Option<&(dyn RootElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RootElementType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RootElementType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RootElementType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RootElementType>::cast_mut(e),
        }
    }
}
impl Cast<dyn RootElementTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn RootElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RootElementTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn RootElementTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn RootElementTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn RootElementTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn ScriptTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ScriptTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptType> for Expr {
    fn cast(&self) -> Option<&(dyn ScriptType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ScriptTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ScriptTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ScriptTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ScriptTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn SendTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SendTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SendTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SendTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SendTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SendTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SendTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SendTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SendTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SendTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowType> for Expr {
    fn cast(&self) -> Option<&(dyn SequenceFlowType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SequenceFlowType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SequenceFlowType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SequenceFlowType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SequenceFlowTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SequenceFlowTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SequenceFlowTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SequenceFlowTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SequenceFlowTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn ServiceTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ServiceTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ServiceTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ServiceTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ServiceTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ServiceTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ServiceTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ServiceTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ServiceTaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalType> for Expr {
    fn cast(&self) -> Option<&(dyn SignalType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SignalTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SignalEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SignalEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SignalEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsType> for Expr {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn StandardLoopCharacteristicsType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StandardLoopCharacteristicsTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StandardLoopCharacteristicsTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => {
                Cast::<dyn StandardLoopCharacteristicsTypeMut>::cast_mut(e)
            }
        }
    }
}
impl Cast<dyn StartEventType> for Expr {
    fn cast(&self) -> Option<&(dyn StartEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StartEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn StartEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StartEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn StartEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn StartEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn StartEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StartEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn StartEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn StartEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn StartEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyType> for Expr {
    fn cast(&self) -> Option<&(dyn SubChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubChoreographyType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubChoreographyType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubChoreographyType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubChoreographyTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SubChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubChoreographyTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubChoreographyTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubChoreographyTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationType> for Expr {
    fn cast(&self) -> Option<&(dyn SubConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubConversationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubConversationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubConversationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubConversationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubConversationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SubConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubConversationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubConversationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubConversationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessType> for Expr {
    fn cast(&self) -> Option<&(dyn SubProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubProcessType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubProcessType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubProcessType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubProcessType>::cast_mut(e),
        }
    }
}
impl Cast<dyn SubProcessTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn SubProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn SubProcessTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn SubProcessTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn SubProcessTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskType> for Expr {
    fn cast(&self) -> Option<&(dyn TaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TaskTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TerminateEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TerminateEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TerminateEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TerminateEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TerminateEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationType> for Expr {
    fn cast(&self) -> Option<&(dyn TextAnnotationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextAnnotationType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TextAnnotationType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TextAnnotationType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextAnnotationTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TextAnnotationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TextAnnotationTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextAnnotationTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TextAnnotationTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextType> for Expr {
    fn cast(&self) -> Option<&(dyn TextType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TextType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TextType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TextTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TextTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TextTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TextTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TextTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventType> for Expr {
    fn cast(&self) -> Option<&(dyn ThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ThrowEventType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ThrowEventType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ThrowEventType>::cast_mut(e),
        }
    }
}
impl Cast<dyn ThrowEventTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn ThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn ThrowEventTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn ThrowEventTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn ThrowEventTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionType> for Expr {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TimerEventDefinitionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TimerEventDefinitionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TimerEventDefinitionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TimerEventDefinitionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TimerEventDefinitionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionType> for Expr {
    fn cast(&self) -> Option<&(dyn TransactionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TransactionType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TransactionType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TransactionType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TransactionType>::cast_mut(e),
        }
    }
}
impl Cast<dyn TransactionTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn TransactionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TransactionTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn TransactionTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn TransactionTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn TransactionTypeMut>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskType> for Expr {
    fn cast(&self) -> Option<&(dyn UserTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn UserTaskType>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn UserTaskType>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskType + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn UserTaskType>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn UserTaskType>::cast_mut(e),
        }
    }
}
impl Cast<dyn UserTaskTypeMut> for Expr {
    fn cast(&self) -> Option<&(dyn UserTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
            Expr::FormalExpression(e) => Cast::<dyn UserTaskTypeMut>::cast(e),
        }
    }
    fn cast_mut(&mut self) -> Option<&mut (dyn UserTaskTypeMut + 'static)> {
        match self {
            Expr::Expression(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
            Expr::FormalExpression(e) => Cast::<dyn UserTaskTypeMut>::cast_mut(e),
        }
    }
}