<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/Event",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents5EventV"
  },
  "title" : "Event"
}
-->

# Event

Maintains the status of the pipeline.

```
struct Event
```

## Topics

### Creating the event

[`init(origin: String, itemCount: Int, totalItemCount: Int?, metrics: [MetricsKey : any Sendable])`](/documentation/CreateMLComponents/Event/init(origin:itemCount:totalItemCount:metrics:))

Creates an event.

### Getting the properties

[`var itemCount: Int`](/documentation/CreateMLComponents/Event/itemCount)

The number of items processed so far.

[`var metrics: [MetricsKey : any Sendable]`](/documentation/CreateMLComponents/Event/metrics)

A dictionary of custom metrics values.

[`var origin: String`](/documentation/CreateMLComponents/Event/origin)

A description of the event’s origin.

[`var totalItemCount: Int?`](/documentation/CreateMLComponents/Event/totalItemCount)

The total number of items being processed.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`Escapable`](/documentation/Swift/Escapable)

[`Copyable`](/documentation/Swift/Copyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)