ThemeStruct

struct ThemeStruct

Represents a collection of chime sounds. A theme can be permanent (year-round collection with no start/end times) or timeboxed (seasonal collection active only between start and end times).

  • A stable string identifier for the theme used for display matching (for example, halloween, birthday).

    Declaration

    Swift

    let name: String
  • For timeboxed themes, the start time when the theme becomes active, expressed as seconds since the Unix epoch. If not present, the theme has no start restriction.

    Declaration

    Swift

    let startTimeSeconds: UInt64?
  • For timeboxed themes, the end time when the theme expires, expressed as seconds since the Unix epoch. If not present, the theme has no end restriction.

    Declaration

    Swift

    let endTimeSeconds: UInt64?
  • The collection of audio files (chimes) included in this theme.

    Declaration

    Swift

    let chimeSounds: [Google.ChimeThemesTrait.ChimeStruct]
  • Creates a new Struct instance using data read from the given TraitDecoder.

    Throws

    HomeError.parseError when parsing fails.

    Declaration

    Swift

    init(decoder: TraitDecoder) throws

    Parameters

    decoder

    The raw data representing this Struct.

  • Writes this Struct to the given TraitEncoder. Throws HomeError.parseError if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

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