///|
/// A copy with `label` replaced.
pub fn Participant::with_label(
  self : Participant,
  label : String,
) -> Participant {
  { ..self, label, }
}

///|
/// A copy with `label` replaced.
pub fn Message::with_label(self : Message, label : String) -> Message {
  { ..self, label, }
}

///|
/// A copy with `text` replaced.
pub fn Note::with_text(self : Note, text : String) -> Note {
  { ..self, text, }
}

///|
/// A copy with `participants` replaced.
pub fn Sequence::with_participants(
  self : Sequence,
  participants : ArrayView[Participant],
) -> Sequence {
  { ..self, participants: ReadOnlyArray::from_array(participants), }
}

///|
/// A copy with `events` replaced.
pub fn Sequence::with_events(
  self : Sequence,
  events : ArrayView[Event],
) -> Sequence {
  { ..self, events: ReadOnlyArray::from_array(events), }
}