@@ -52,6 +52,25 @@ type Event struct {
5252
5353 // The total duration in seconds that it takes for the Event to complete.
5454 Duration float64 `json:"duration"`
55+
56+ // The maintenance policy configured by the user for the event.
57+ // NOTE: MaintenancePolicySet can only be used with v4beta.
58+ MaintenancePolicySet string `json:"maintenance_policy_set"`
59+
60+ // Describes the nature of the event (e.g., whether it is scheduled or emergency).
61+ Description string `json:"description"`
62+
63+ // The origin of the event (e.g., platform, user).
64+ Source string `json:"source"`
65+
66+ // Scheduled start time for the event.
67+ NotBefore * time.Time `json:"-"`
68+
69+ // The actual start time of the event.
70+ StartTime * time.Time `json:"-"`
71+
72+ // The actual completion time of the event.
73+ CompleteTime * time.Time `json:"-"`
5574}
5675
5776// EventAction constants start with Action and include all known Linode API Event Actions.
@@ -121,6 +140,7 @@ const (
121140 ActionLinodeMigrateDatacenterCreate EventAction = "linode_migrate_datacenter_create"
122141 ActionLinodeMutate EventAction = "linode_mutate"
123142 ActionLinodeMutateCreate EventAction = "linode_mutate_create"
143+ ActionLinodePowerOffOn EventAction = "linode_poweroff_on"
124144 ActionLinodeReboot EventAction = "linode_reboot"
125145 ActionLinodeRebuild EventAction = "linode_rebuild"
126146 ActionLinodeResize EventAction = "linode_resize"
@@ -261,6 +281,7 @@ const (
261281 EventNotification EventStatus = "notification"
262282 EventScheduled EventStatus = "scheduled"
263283 EventStarted EventStatus = "started"
284+ EventCanceled EventStatus = "canceled"
264285)
265286
266287// EventEntity provides detailed information about the Event's
@@ -284,6 +305,9 @@ func (i *Event) UnmarshalJSON(b []byte) error {
284305
285306 Created * parseabletime.ParseableTime `json:"created"`
286307 TimeRemaining json.RawMessage `json:"time_remaining"`
308+ NotBefore * parseabletime.ParseableTime `json:"not_before"`
309+ StartTime * parseabletime.ParseableTime `json:"start_time"`
310+ CompleteTime * parseabletime.ParseableTime `json:"complete_time"`
287311 }{
288312 Mask : (* Mask )(i ),
289313 }
@@ -294,6 +318,9 @@ func (i *Event) UnmarshalJSON(b []byte) error {
294318
295319 i .Created = (* time .Time )(p .Created )
296320 i .TimeRemaining = duration .UnmarshalTimeRemaining (p .TimeRemaining )
321+ i .NotBefore = (* time .Time )(p .NotBefore )
322+ i .StartTime = (* time .Time )(p .StartTime )
323+ i .CompleteTime = (* time .Time )(p .CompleteTime )
297324
298325 return nil
299326}
0 commit comments