    struct DataPublishedEvent

Event emitted when custom event data is published.
- `


  ### [identifier](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV10identifier0aB3SDK06ScopedH2IDVvpZ)


  ` Identifier for this event.

  The Event ID is appended onto the Trait ID of the trait this event belongs to.

  #### Declaration

  Swift

      static let identifier: ScopedEventID

- `


  ### [name](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV4names12StaticStringVvpZ)


  ` Name of the given event type.

  #### Declaration

  Swift

      static let name: StaticString

- `


  ### [eventField(id:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV10eventField2id0aB3SDK0J0_pSgs6UInt32V_tFZ)


  ` Returns the field corresponding to the given field ID.

  #### Declaration

  Swift

      static func eventField(id: UInt32) -> (any Field)?

- `


  ### [timestamp](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV9timestampSdvp)


  ` Timestamp of when the given event occurred on the sender.

  #### Declaration

  Swift

      let timestamp: TimeInterval

- `


  ### [importance](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV10importance0aB3SDK0H10ImportanceOvp)


  ` Reported importance level of the given event.

  #### Declaration

  Swift

      let importance: EventImportance

- `


  ### [number](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV6numberSuvp)


  ` Optional number of the event in the sequence history of this field.

  #### Declaration

  Swift

      let number: UInt

- `


  ### [partID](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV6partIDSSSgvp)


  ` Optional ID of the part that emitted this event.

  #### Declaration

  Swift

      let partID: String?

- `


  ### [init(decoder:timestamp:importance:number:partID:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV7decoder9timestamp10importance6number6partIDAG0aB3SDK0F7DecoderV_SdAM0H10ImportanceOSuSSSgtKcfc)


  ` Initializer to decode the event.

  #### Declaration

  Swift

      init(decoder: TraitDecoder, timestamp: TimeInterval, importance: EventImportance, number: UInt, partID: String?) throws

- `


  ### [encode(with:)](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV6encode4withy0aB3SDK0F7EncoderC_tKF)


  ` Encodes the given event.

  #### Declaration

  Swift

      func encode(with encoder: TraitEncoder) throws

- `


  ### [debugDescription](https://developers.home.google.com/reference/swift/GoogleHomeTypes/Enums/Google/DataPublisherTrait/DataPublishedEvent#/s:15GoogleHomeTypes0A0O18DataPublisherTraitV0D14PublishedEventV16debugDescriptionSSvp)


  ` A textual representation of this instance, suitable for debugging.

  Calling this property directly is discouraged. Instead, convert an
  instance of any type to a string by using the `String(reflecting:)`
  initializer. This initializer works with any type, and uses the custom
  `debugDescription` property for types that conform to
  `CustomDebugStringConvertible`:

      struct Point: CustomDebugStringConvertible {
          let x: Int, y: Int

          var debugDescription: String {
              return "(\(x), \(y))"
          }
      }

      let p = Point(x: 21, y: 30)
      let s = String(reflecting: p)
      print(s)
      // Prints "(21, 30)"

  The conversion of `p` to a string in the assignment to `s` uses the
  `Point` type's `debugDescription` property.

  #### Declaration

  Swift

      var debugDescription: String { get }