ScheduledEvent

struct ScheduledEvent

The event that will be subscribed to when an automation needs to be scheduled.

  • Returns a TypedParameter for Google.TimeTrait.ScheduledEvent.EventFields.clockTime with the given TimeOfDay.

    Declaration

    Swift

    static func clockTime(_ clockTime: TimeOfDay) -> TypedParameter<Google.TimeTrait.ScheduledEvent>
  • Returns a TypedParameter for Google.TimeTrait.ScheduledEvent.EventFields.solarTime with the given SolarTime.

    Declaration

    Swift

    static func solarTime(_ solarTime: SolarTime) -> TypedParameter<Google.TimeTrait.ScheduledEvent>
  • Returns a TypedParameter for Google.TimeTrait.ScheduledEvent.EventFields.daysOfWeek with the given [Locale.Weekday].

    Declaration

    Swift

    static func daysOfWeek(_ daysOfWeek: [Locale.Weekday]) -> TypedParameter<Google.TimeTrait.ScheduledEvent>
  • Returns the field corresponding to the given field ID.

    Declaration

    Swift

    static func eventField(id: UInt32) -> (any Field)?
  • The payload of the event.

    Declaration

    Swift

    struct Payload
  • 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 of the given event type.

    Declaration

    Swift

    static let name: StaticString
  • Timestamp of when the given event occurred on the sender.

    Declaration

    Swift

    let timestamp: TimeInterval
  • Reported importance level of the given event.

    Declaration

    Swift

    let importance: EventImportance
  • Optional number of the event in the sequence history of this field.

    Declaration

    Swift

    let number: UInt
  • Initializer to decode the event.

    Declaration

    Swift

    init(decoder: TraitDecoder, timestamp: TimeInterval, importance: EventImportance, number: UInt) throws
  • Encodes the given event.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • 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 }