@@ -41,6 +41,7 @@ syntax = "proto3";
4141package frequenz.api.dispatch.v1 ;
4242
4343import "google/protobuf/empty.proto" ;
44+ import "google/protobuf/field_mask.proto" ;
4445import "google/protobuf/struct.proto" ;
4546import "google/protobuf/timestamp.proto" ;
4647
@@ -332,32 +333,71 @@ message DispatchCreateRequest {
332333
333334// Message to update the dispatch with the given ID, with the given attributes
334335message DispatchUpdateRequest {
335- // The dispatch identifier
336- uint64 id = 1 ;
336+ // Message containing the updated dispatch attributes
337+ message DispatchUpdate {
338+ // Message containing the updated recurrence rule attributes
339+ message RecurrenceRuleUpdate {
340+ // The frequency specifier of this recurring dispatch
341+ optional RecurrenceRule.Frequency freq = 1 ;
337342
338- // The start time
339- // When updating a dispatch, ensure that the starting timestamp is set to
340- // the current time or any future time.
341- // Timestamps earlier than the current time are not allowed.
342- google.protobuf.Timestamp start_time = 2 ;
343+ // How often this dispatch should recur, based on the frequency
344+ optional uint32 interval = 2 ;
343345
344- // Duration in seconds
345- optional uint32 duration = 3 ;
346+ // When this dispatch should end.
347+ RecurrenceRule.EndCriteria end_criteria = 3 ;
346348
347- // The component selector
348- ComponentSelector selector = 4 ;
349+ // On which minute(s) of the hour does the event occur
350+ repeated uint32 byminutes = 4 ;
349351
350- // The "active" status
351- optional bool is_active = 5 ;
352+ // On which hour(s) of the day does the event occur
353+ repeated uint32 byhours = 5 ;
352354
353- // The "dry run" status
354- optional bool is_dry_run = 6 ;
355+ // On which day(s) of the week does the event occur
356+ repeated RecurrenceRule.Weekday byweekdays = 6 ;
355357
356- // The dispatch payload
357- google.protobuf.Struct payload = 7 ;
358+ // On which day(s) of the month does the event occur
359+ repeated uint32 bymonthdays = 7 ;
358360
359- // The recurrence rule
360- RecurrenceRule recurrence = 8 ;
361+ // On which month(s) of the year does the event occur
362+ repeated uint32 bymonths = 8 ;
363+ }
364+
365+ // The type of dispatch
366+ optional string type = 1 ;
367+
368+ // The start time
369+ // When updating a dispatch, ensure that the starting timestamp is set to
370+ // the current time or any future time.
371+ // Timestamps earlier than the current time are not allowed.
372+ google.protobuf.Timestamp start_time = 2 ;
373+
374+ // Duration in seconds
375+ optional uint32 duration = 3 ;
376+
377+ // The component selector
378+ ComponentSelector selector = 4 ;
379+
380+ // The "active" status
381+ optional bool is_active = 5 ;
382+
383+ // The "dry run" status
384+ optional bool is_dry_run = 6 ;
385+
386+ // The dispatch payload
387+ google.protobuf.Struct payload = 7 ;
388+
389+ // The recurrence rule
390+ RecurrenceRuleUpdate recurrence = 8 ;
391+ }
392+
393+ // The dispatch identifier
394+ uint64 id = 1 ;
395+
396+ // Field mask specifying which fields should be updated
397+ google.protobuf.FieldMask update_mask = 2 ;
398+
399+ // The updated dispatch attributes
400+ DispatchUpdate update = 3 ;
361401}
362402
363403// Message to get a single dispatch by its ID
0 commit comments