-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels_gen.go
More file actions
9029 lines (8360 loc) · 446 KB
/
Copy pathmodels_gen.go
File metadata and controls
9029 lines (8360 loc) · 446 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by internal/cmd/gen; DO NOT EDIT.
package flashduty
// AlertFeedType Alert activity feed entry type. Each value identifies one alert lifecycle event; the matching `detail` payload shape is determined by this field.
type AlertFeedType string
const (
AlertFeedTypeANew AlertFeedType = "a_new"
AlertFeedTypeAComm AlertFeedType = "a_comm"
AlertFeedTypeAClose AlertFeedType = "a_close"
)
// String returns the underlying string value, implementing fmt.Stringer.
func (e AlertFeedType) String() string { return string(e) }
// AlertRuleExportListResponse is a list response payload.
type AlertRuleExportListResponse []AlertRuleExport
type CSVFileResponse string
// String returns the underlying string value, implementing fmt.Stringer.
func (e CSVFileResponse) String() string { return string(e) }
// DataSourceListResponse is a list response payload.
type DataSourceListResponse []DataSourceItem
// ErrorCode Flashduty error code enum. Every failed API response sets `error.code` to one of these values. The value is a stable wire string — not a localized message and not a numeric status. HTTP status is informational.
type ErrorCode string
const (
ErrorCodeOK ErrorCode = "OK"
ErrorCodeInvalidParameter ErrorCode = "InvalidParameter"
ErrorCodeBadRequest ErrorCode = "BadRequest"
ErrorCodeInvalidContentType ErrorCode = "InvalidContentType"
ErrorCodeResourceNotFound ErrorCode = "ResourceNotFound"
ErrorCodeNoLicense ErrorCode = "NoLicense"
ErrorCodeReferenceExist ErrorCode = "ReferenceExist"
ErrorCodeUnauthorized ErrorCode = "Unauthorized"
ErrorCodeBalanceNotEnough ErrorCode = "BalanceNotEnough"
ErrorCodeAccessDenied ErrorCode = "AccessDenied"
ErrorCodeRouteNotFound ErrorCode = "RouteNotFound"
ErrorCodeMethodNotAllowed ErrorCode = "MethodNotAllowed"
ErrorCodeUndonedOrderExist ErrorCode = "UndonedOrderExist"
ErrorCodeRequestLocked ErrorCode = "RequestLocked"
ErrorCodeEntityTooLarge ErrorCode = "EntityTooLarge"
ErrorCodeRequestTooFrequently ErrorCode = "RequestTooFrequently"
ErrorCodeRequestVerifyRequired ErrorCode = "RequestVerifyRequired"
ErrorCodeDangerousOperation ErrorCode = "DangerousOperation"
ErrorCodeInternalError ErrorCode = "InternalError"
ErrorCodeServiceUnavailable ErrorCode = "ServiceUnavailable"
)
// String returns the underlying string value, implementing fmt.Stringer.
func (e ErrorCode) String() string { return string(e) }
// FeedSeverity Severity level.
type FeedSeverity string
const (
FeedSeverityOK FeedSeverity = "Ok"
FeedSeverityCritical FeedSeverity = "Critical"
FeedSeverityWarning FeedSeverity = "Warning"
FeedSeverityInfo FeedSeverity = "Info"
)
// String returns the underlying string value, implementing fmt.Stringer.
func (e FeedSeverity) String() string { return string(e) }
// FilterGroup is an alias for OrFilterGroup.
type FilterGroup = OrFilterGroup
// IncidentCardHiddenFields is a map response payload.
type IncidentCardHiddenFields map[string][]string
// IncidentFeedType Incident timeline entry type. Each value identifies one lifecycle event; the matching `detail` payload shape is determined by this field. Incident types are prefixed with `i_`.
type IncidentFeedType string
const (
IncidentFeedTypeINew IncidentFeedType = "i_new"
IncidentFeedTypeIAssign IncidentFeedType = "i_assign"
IncidentFeedTypeIARspd IncidentFeedType = "i_a_rspd"
IncidentFeedTypeINotify IncidentFeedType = "i_notify"
IncidentFeedTypeIStorm IncidentFeedType = "i_storm"
IncidentFeedTypeISnooze IncidentFeedType = "i_snooze"
IncidentFeedTypeIWake IncidentFeedType = "i_wake"
IncidentFeedTypeIAck IncidentFeedType = "i_ack"
IncidentFeedTypeIUnack IncidentFeedType = "i_unack"
IncidentFeedTypeIComm IncidentFeedType = "i_comm"
IncidentFeedTypeIRslv IncidentFeedType = "i_rslv"
IncidentFeedTypeIReopen IncidentFeedType = "i_reopen"
IncidentFeedTypeIMerge IncidentFeedType = "i_merge"
IncidentFeedTypeIRTitle IncidentFeedType = "i_r_title"
IncidentFeedTypeIRDesc IncidentFeedType = "i_r_desc"
IncidentFeedTypeIRImpact IncidentFeedType = "i_r_impact"
IncidentFeedTypeIRRc IncidentFeedType = "i_r_rc"
IncidentFeedTypeIRRsltn IncidentFeedType = "i_r_rsltn"
IncidentFeedTypeIRSeverity IncidentFeedType = "i_r_severity"
IncidentFeedTypeIRField IncidentFeedType = "i_r_field"
IncidentFeedTypeIMFlapping IncidentFeedType = "i_m_flapping"
IncidentFeedTypeIMReply IncidentFeedType = "i_m_reply"
IncidentFeedTypeICustom IncidentFeedType = "i_custom"
IncidentFeedTypeIWrCreate IncidentFeedType = "i_wr_create"
IncidentFeedTypeIWrDelete IncidentFeedType = "i_wr_delete"
IncidentFeedTypeIAutoRefresh IncidentFeedType = "i_auto_refresh"
IncidentFeedTypeAMerge IncidentFeedType = "a_merge"
)
// String returns the underlying string value, implementing fmt.Stringer.
func (e IncidentFeedType) String() string { return string(e) }
// InsightIncidentExportRequest is an alias for InsightFilter.
type InsightIncidentExportRequest = InsightFilter
// OrFilterGroup is a list response payload.
type OrFilterGroup [][]FilterCondition
// PermissionFactorListResponse is a list response payload.
type PermissionFactorListResponse []PermissionFactorItem
// QueryRowsResponse is a list response payload.
type QueryRowsResponse []QueryRow
// RuleAuditListResponse is a list response payload.
type RuleAuditListResponse []AlertRuleAudit
// RuleBasicListResponse is a list response payload.
type RuleBasicListResponse []AlertRuleBasic
// RuleCounterChannelResponse is a map response payload.
type RuleCounterChannelResponse map[string]int64
// RuleCounterNodeResponse is a map response payload.
type RuleCounterNodeResponse map[string]int64
// RuleCounterTotalResponse is a list response payload.
type RuleCounterTotalResponse []AlertRuleCounter
// RuleDsTypesResponse is a list response payload.
type RuleDsTypesResponse []DsType
// RuleImportRequest is a list response payload.
type RuleImportRequest []AlertRule
// RuleImportResponse is a list response payload.
type RuleImportResponse []NameMessage
// RuleNameMessageListResponse is a list response payload.
type RuleNameMessageListResponse []NameMessage
// RuleStatusResponse is a list response payload.
type RuleStatusResponse []AlertRuleStatus
// RUMDataQueryResponse is a map response payload.
type RUMDataQueryResponse map[string]RUMDataQueryOutput
// SLSLogstoresResponse is a list response payload.
type SLSLogstoresResponse []string
// SLSProjectsResponse is a list response payload.
type SLSProjectsResponse []string
type StatusPageSubscriberExportResponse string
// String returns the underlying string value, implementing fmt.Stringer.
func (e StatusPageSubscriberExportResponse) String() string { return string(e) }
// StoreRulesetListResponse is a list response payload.
type StoreRulesetListResponse []StoreRulesetItem
// A2aAgentCreateRequest is generated from the Flashduty OpenAPI schema.
type A2aAgentCreateRequest struct {
// Agent display name.
AgentName string `json:"agent_name" toon:"agent_name"`
// Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS. Defaults to false.
AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"`
// Skip TLS certificate verification when connecting to this agent's endpoint (self-signed/private certs). Defaults to false.
AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"`
// Authentication config key-values, e.g. the API key or bearer token. Values for sensitive keys (`api_key`, `token`, `client_secret`) are masked back in responses.
AuthConfig map[string]string `json:"auth_config,omitempty" toon:"auth_config,omitempty"`
// Authentication mode: `shared` (default) shares one credential across all users; `per_user_secret` requires `secret_schema.header_name`; `per_user_oauth` runs per-user OAuth.
AuthMode string `json:"auth_mode,omitempty" toon:"auth_mode,omitempty"`
// Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`.
AuthType string `json:"auth_type,omitempty" toon:"auth_type,omitempty"`
// URL of the remote agent card. Must be an absolute `http` or `https` URL with a non-empty host; reachability is enforced by the execution environment, not at creation time.
CardURL string `json:"card_url" toon:"card_url"`
// BYOC runner ID. Required when `environment_kind=byoc`; the runner must belong to the account or a team the caller belongs to.
EnvironmentID string `json:"environment_id,omitempty" toon:"environment_id,omitempty"`
// Execution environment binding. Omit or send empty for automatic routing; `byoc` pins the agent to a specific runner given by `environment_id`. `cloud` is not accepted — configured A2A agents need a persistent runner, not a disposable cloud sandbox.
EnvironmentKind string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"`
// Natural-language instructions for the remote agent. Required — a deprecated `description` field is still accepted for legacy clients and, if both are sent, must exactly match `instructions`.
Instructions string `json:"instructions" toon:"instructions"`
// JSON-encoded OAuth metadata; populated by the OAuth discovery flow for `per_user_oauth` mode.
OauthMetadata string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"`
// JSON-encoded secret schema, e.g. `{"header_name":"X-Api-Key"}`; required when `auth_mode=per_user_secret`.
SecretSchema string `json:"secret_schema,omitempty" toon:"secret_schema,omitempty"`
// Whether the remote agent supports streaming.
Streaming bool `json:"streaming,omitempty" toon:"streaming,omitempty"`
// Team scope: 0 = account-wide; >0 = team. Creating at account scope requires the owner/admin role; creating into a team requires actual membership in that team.
TeamID int64 `json:"team_id,omitempty" toon:"team_id,omitempty"`
}
// A2aAgentCreateResponse is generated from the Flashduty OpenAPI schema.
type A2aAgentCreateResponse struct {
// ID of the newly created agent.
AgentID string `json:"agent_id" toon:"agent_id"`
}
// A2aAgentIDRequest is generated from the Flashduty OpenAPI schema.
type A2aAgentIDRequest struct {
// Target agent ID.
AgentID string `json:"agent_id" toon:"agent_id"`
}
// A2aAgentItem is generated from the Flashduty OpenAPI schema.
type A2aAgentItem struct {
// Owning account ID.
AccountID int64 `json:"account_id" toon:"account_id"`
// Agent name resolved from the remote card.
AgentCardName string `json:"agent_card_name" toon:"agent_card_name"`
// Skills advertised by the remote card.
AgentCardSkills []string `json:"agent_card_skills" toon:"agent_card_skills"`
// Unique A2A agent ID (prefix `a2a_`).
AgentID string `json:"agent_id" toon:"agent_id"`
// Agent display name.
AgentName string `json:"agent_name" toon:"agent_name"`
// Allow non-loopback HTTP OAuth discovery/metadata endpoints for this agent instead of requiring HTTPS.
AllowInsecureOauthHTTP bool `json:"allow_insecure_oauth_http" toon:"allow_insecure_oauth_http"`
// Skip TLS certificate verification when connecting to this agent's endpoint.
AllowInsecureTlsSkipVerify bool `json:"allow_insecure_tls_skip_verify" toon:"allow_insecure_tls_skip_verify"`
// Authentication config; sensitive values (`api_key`, `token`, `client_secret`) are masked.
AuthConfig map[string]string `json:"auth_config" toon:"auth_config"`
// Authentication mode.
AuthMode string `json:"auth_mode" toon:"auth_mode"`
// Authentication type for reaching the remote agent: `none`, `api_key`, or `bearer`.
AuthType string `json:"auth_type" toon:"auth_type"`
// Whether the caller may edit this agent.
CanEdit bool `json:"can_edit" toon:"can_edit"`
// Card-resolution timeout in seconds. Always 0 today — the API does not yet expose a way to set it.
CardResolveTimeout int64 `json:"card_resolve_timeout" toon:"card_resolve_timeout"`
// URL of the remote agent card.
CardURL string `json:"card_url" toon:"card_url"`
// Creation time. Unix timestamp in milliseconds.
CreatedAt TimestampMilli `json:"created_at" toon:"created_at"`
// Member ID that created the agent.
CreatedBy int64 `json:"created_by" toon:"created_by"`
// BYOC runner ID. Set only when `environment_kind=byoc`; empty otherwise.
EnvironmentID string `json:"environment_id" toon:"environment_id"`
// Execution environment binding. Empty selects automatic routing; `byoc` pins the agent to a specific runner named by `environment_id`.
EnvironmentKind string `json:"environment_kind" toon:"environment_kind"`
// Natural-language instructions for the remote agent (formerly named `description`).
Instructions string `json:"instructions" toon:"instructions"`
// JSON-encoded OAuth metadata (per_user_oauth mode).
OauthMetadata string `json:"oauth_metadata" toon:"oauth_metadata"`
// JSON-encoded secret schema (per_user_secret mode).
SecretSchema string `json:"secret_schema" toon:"secret_schema"`
// Agent status.
Status string `json:"status" toon:"status"`
// Whether the remote agent supports streaming responses.
Streaming bool `json:"streaming" toon:"streaming"`
// Single-task execution timeout in seconds. Always 0 today — the API does not yet expose a way to set it.
TaskTimeout int64 `json:"task_timeout" toon:"task_timeout"`
// Team scope: 0 = account-wide; >0 = the owning team.
TeamID int64 `json:"team_id" toon:"team_id"`
// Last update time. Unix timestamp in milliseconds.
UpdatedAt TimestampMilli `json:"updated_at" toon:"updated_at"`
}
// A2aAgentListRequest is generated from the Flashduty OpenAPI schema.
type A2aAgentListRequest struct {
// Include account-scoped (team_id=0) rows. Defaults to true.
IncludeAccount *bool `json:"include_account,omitempty" toon:"include_account,omitempty"`
// Page size.
Limit int64 `json:"limit,omitempty" toon:"limit,omitempty"`
// Row offset for pagination.
Offset int64 `json:"offset,omitempty" toon:"offset,omitempty"`
// Case-insensitive substring search across agent name, instructions, card URL, agent ID, and the resolved card name.
Query string `json:"query,omitempty" toon:"query,omitempty"`
// Visibility scope: `all` (account-scope plus the caller's visible teams), `account` (account-scope only), or `team` (team-scoped rows across the caller's visible teams).
Scope string `json:"scope,omitempty" toon:"scope,omitempty"`
// Filter to these team IDs; empty = the caller's visible set.
TeamIDs []int64 `json:"team_ids,omitempty" toon:"team_ids,omitempty"`
}
// A2aAgentListResponse is generated from the Flashduty OpenAPI schema.
type A2aAgentListResponse struct {
// A2A agents on this page.
Items []A2aAgentItem `json:"items" toon:"items"`
// Total number of matching agents.
Total int64 `json:"total" toon:"total"`
}
// A2aAgentUpdateRequest is generated from the Flashduty OpenAPI schema.
type A2aAgentUpdateRequest struct {
// Target agent ID.
AgentID string `json:"agent_id" toon:"agent_id"`
// New display name. Omit to leave unchanged.
AgentName *string `json:"agent_name,omitempty" toon:"agent_name,omitempty"`
// Toggle non-loopback HTTP OAuth discovery for this agent. Omit to leave unchanged.
AllowInsecureOauthHTTP *bool `json:"allow_insecure_oauth_http,omitempty" toon:"allow_insecure_oauth_http,omitempty"`
// Toggle TLS certificate verification skipping for this agent. Omit to leave unchanged.
AllowInsecureTlsSkipVerify *bool `json:"allow_insecure_tls_skip_verify,omitempty" toon:"allow_insecure_tls_skip_verify,omitempty"`
// Replace the auth config. Omit to leave unchanged. Sending back the masked value (or an empty string) for a sensitive key keeps the stored secret instead of overwriting it.
AuthConfig map[string]string `json:"auth_config,omitempty" toon:"auth_config,omitempty"`
// New auth mode: shared, per_user_secret, or per_user_oauth. Changing it always rewrites secret_schema together with it.
AuthMode *string `json:"auth_mode,omitempty" toon:"auth_mode,omitempty"`
// New auth type. Omit to leave unchanged.
AuthType *string `json:"auth_type,omitempty" toon:"auth_type,omitempty"`
// New card URL. Omit to leave unchanged.
CardURL *string `json:"card_url,omitempty" toon:"card_url,omitempty"`
// New BYOC runner ID. Required alongside `environment_kind=byoc`. Omit to leave unchanged.
EnvironmentID *string `json:"environment_id,omitempty" toon:"environment_id,omitempty"`
// New execution environment binding: empty for automatic, `byoc` for a specific runner. `cloud` is rejected. Omit to leave unchanged.
EnvironmentKind *string `json:"environment_kind,omitempty" toon:"environment_kind,omitempty"`
// New instructions. Omit to leave unchanged. A deprecated `description` field is also accepted; if both are sent they must match.
Instructions *string `json:"instructions,omitempty" toon:"instructions,omitempty"`
// New JSON OAuth metadata. If omitted while auth_mode changes, it is cleared to empty.
OauthMetadata *string `json:"oauth_metadata,omitempty" toon:"oauth_metadata,omitempty"`
// New JSON secret schema.
SecretSchema *string `json:"secret_schema,omitempty" toon:"secret_schema,omitempty"`
// Toggle streaming support. Omit to leave unchanged.
Streaming *bool `json:"streaming,omitempty" toon:"streaming,omitempty"`
// Reassign team scope. Omit to leave unchanged. Reassigning requires rights on the destination team; if the team changes without also sending a new environment binding, the existing runner binding must remain selectable by the caller or the update is rejected.
TeamID *int64 `json:"team_id,omitempty" toon:"team_id,omitempty"`
}
// AccountInfo is generated from the Flashduty OpenAPI schema.
type AccountInfo struct {
// Account identifier.
AccountID int64 `json:"account_id" toon:"account_id"`
// Account name.
AccountName string `json:"account_name" toon:"account_name"`
// Account avatar URL.
Avatar string `json:"avatar" toon:"avatar"`
// Calling country code for the contact phone.
CountryCode string `json:"country_code" toon:"country_code"`
// Account creation time, Unix timestamp in seconds.
CreatedAt Timestamp `json:"created_at" toon:"created_at"`
// Primary account domain (login subdomain).
Domain string `json:"domain" toon:"domain"`
// Account contact email.
Email string `json:"email" toon:"email"`
// Additional account domains.
ExtraDomains []string `json:"extra_domains" toon:"extra_domains"`
// Account language preference (e.g. zh-CN, en-US).
Locale string `json:"locale" toon:"locale"`
// Account identifier on the cloud marketplace platform (present only for marketplace accounts).
MpAccountID string `json:"mp_account_id" toon:"mp_account_id"`
// Cloud marketplace platform the account was provisioned from (present only for marketplace accounts).
MpPlat string `json:"mp_plat" toon:"mp_plat"`
// Account contact phone, masked for privacy.
Phone string `json:"phone" toon:"phone"`
// Account access restrictions (present only when configured).
Restrictions AccountInfoRestrictions `json:"restrictions" toon:"restrictions"`
// Account default timezone (IANA name, e.g. Asia/Shanghai).
TimeZone string `json:"time_zone" toon:"time_zone"`
}
// AckIncidentRequest is generated from the Flashduty OpenAPI schema.
type AckIncidentRequest struct {
// Custom field values for the acknowledgement form. Allowed keys and values depend on the incident's visible form.
CustomFields CustomFieldValues `json:"custom_fields,omitempty" toon:"custom_fields,omitempty"`
// Images attached to the acknowledgement timeline entry.
Images []IncidentActionImage `json:"images,omitempty" toon:"images,omitempty"`
// Incident IDs to acknowledge. At most 100 per call.
IncidentIDs []string `json:"incident_ids" toon:"incident_ids"`
// Form summary recorded as a timeline comment. Accepted only when the acknowledgement form contains a summary element.
Summary string `json:"summary,omitempty" toon:"summary,omitempty"`
}
// AddIncidentResponderRequest is generated from the Flashduty OpenAPI schema.
type AddIncidentResponderRequest struct {
// Incident ID (MongoDB ObjectID).
IncidentID string `json:"incident_id" toon:"incident_id"`
// Optional notification override. Defaults to following each person's personal preference.
Notify AddIncidentResponderRequestNotify `json:"notify,omitzero" toon:"notify,omitempty"`
// Member IDs to add as responders.
PersonIDs []int64 `json:"person_ids" toon:"person_ids"`
}
// AddWarRoomMemberRequest is generated from the Flashduty OpenAPI schema.
type AddWarRoomMemberRequest struct {
// Chat ID of the war room within the IM platform.
ChatID string `json:"chat_id" toon:"chat_id"`
// IM integration that hosts the war room.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Person IDs to add to the war room.
MemberIDs []int64 `json:"member_ids" toon:"member_ids"`
}
// AffectedStatusPageComponentItem is generated from the Flashduty OpenAPI schema.
type AffectedStatusPageComponentItem struct {
// Timestamp when the component was first available, in unix seconds.
AvailableSinceSeconds Timestamp `json:"available_since_seconds" toon:"available_since_seconds"`
// Component ID.
ComponentID string `json:"component_id" toon:"component_id"`
// Component description.
Description string `json:"description" toon:"description"`
// When true, the component is hidden entirely from summary endpoints.
HideAll bool `json:"hide_all" toon:"hide_all"`
// When true, uptime data is hidden from summary responses.
HideUptime bool `json:"hide_uptime" toon:"hide_uptime"`
// Component display name.
Name string `json:"name" toon:"name"`
// Display order within its section.
OrderID int64 `json:"order_id" toon:"order_id"`
// Parent section ID.
SectionID string `json:"section_id" toon:"section_id"`
// Current component status resulting from the event.
Status string `json:"status" toon:"status"`
}
// AlertEventGlobalListRequest is generated from the Flashduty OpenAPI schema.
type AlertEventGlobalListRequest struct {
ListOptions
// Sort ascending when `true`.
Asc bool `json:"asc,omitempty" toon:"asc,omitempty"`
// Filter by channel IDs. Max 100.
ChannelIDs []int64 `json:"channel_ids,omitempty" toon:"channel_ids,omitempty"`
// End of search window, Unix epoch seconds.
EndTime int64 `json:"end_time,omitempty" toon:"end_time,omitempty"`
// Filter by integration IDs.
IntegrationIDs []int64 `json:"integration_ids,omitempty" toon:"integration_ids,omitempty"`
// Filter by integration types (plugin keys).
IntegrationTypes []string `json:"integration_types,omitempty" toon:"integration_types,omitempty"`
// Sort field (ES field name).
Orderby string `json:"orderby,omitempty" toon:"orderby,omitempty"`
// Comma-separated severity filter, e.g. `Critical,Warning`.
Severities string `json:"severities,omitempty" toon:"severities,omitempty"`
// Start of search window, Unix epoch seconds.
StartTime int64 `json:"start_time,omitempty" toon:"start_time,omitempty"`
}
// AlertEventGlobalListResponse is generated from the Flashduty OpenAPI schema.
type AlertEventGlobalListResponse struct {
HasNextPage bool `json:"has_next_page" toon:"has_next_page"`
Items []AlertEventItem `json:"items" toon:"items"`
SearchAfterCtx string `json:"search_after_ctx" toon:"search_after_ctx"`
Total int64 `json:"total" toon:"total"`
}
// AlertEventItem is generated from the Flashduty OpenAPI schema.
type AlertEventItem struct {
// Account ID.
AccountID int64 `json:"account_id" toon:"account_id"`
// Parent alert ID (MongoDB ObjectID).
AlertID string `json:"alert_id" toon:"alert_id"`
// Deduplication key used to merge events into an alert.
AlertKey string `json:"alert_key" toon:"alert_key"`
// Channel ID the event is routed to.
ChannelID int64 `json:"channel_id" toon:"channel_id"`
// Record creation time, Unix epoch seconds.
CreatedAt Timestamp `json:"created_at" toon:"created_at"`
// Deprecated. Use `integration_id` instead.
DataSourceID int64 `json:"data_source_id" toon:"data_source_id"`
// Soft-delete timestamp (seconds). Zero if not deleted.
DeletedAt Timestamp `json:"deleted_at" toon:"deleted_at"`
// Event description.
Description string `json:"description" toon:"description"`
// Event ID (MongoDB ObjectID).
EventID string `json:"event_id" toon:"event_id"`
// Severity of this event.
EventSeverity string `json:"event_severity" toon:"event_severity"`
// Status of this event.
EventStatus string `json:"event_status" toon:"event_status"`
// Event timestamp, Unix epoch seconds.
EventTime Timestamp `json:"event_time" toon:"event_time"`
// Images attached to the event.
Images []AlertImage `json:"images" toon:"images"`
// Integration that produced this event.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Type/plugin key of the integration that produced this event.
IntegrationType string `json:"integration_type" toon:"integration_type"`
// Label key-value pairs.
Labels map[string]string `json:"labels" toon:"labels"`
// Event title.
Title string `json:"title" toon:"title"`
// Title template used to derive `title` from labels.
TitleRule string `json:"title_rule" toon:"title_rule"`
// Record update time, Unix epoch seconds.
UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"`
}
// AlertEventListRequest is generated from the Flashduty OpenAPI schema.
type AlertEventListRequest struct {
ListOptions
// Alert ID (MongoDB ObjectID).
AlertID string `json:"alert_id" toon:"alert_id"`
// When true, return events oldest-first. Defaults to newest-first.
Asc bool `json:"asc,omitempty" toon:"asc,omitempty"`
}
// AlertEventListResponse is generated from the Flashduty OpenAPI schema.
type AlertEventListResponse struct {
// Whether another page is available.
HasNextPage bool `json:"has_next_page" toon:"has_next_page"`
// Raw alert events in the requested order.
Items []AlertEventItem `json:"items" toon:"items"`
// Cursor to pass as `search_after_ctx` for the next page.
SearchAfterCtx string `json:"search_after_ctx" toon:"search_after_ctx"`
// Total matching event count.
Total int64 `json:"total" toon:"total"`
}
// AlertFeedRequest is generated from the Flashduty OpenAPI schema.
type AlertFeedRequest struct {
ListOptions
// Alert ID.
AlertID string `json:"alert_id" toon:"alert_id"`
// Sort ascending.
Asc bool `json:"asc,omitempty" toon:"asc,omitempty"`
// Filter by feed types.
Types []string `json:"types,omitempty" toon:"types,omitempty"`
}
// AlertFeedResponse is generated from the Flashduty OpenAPI schema.
type AlertFeedResponse struct {
HasNextPage bool `json:"has_next_page" toon:"has_next_page"`
Items []FeedItem `json:"items" toon:"items"`
}
// AlertImage is generated from the Flashduty OpenAPI schema.
type AlertImage struct {
// Alt text.
Alt string `json:"alt" toon:"alt"`
// Optional link URL when the image is clicked.
Href string `json:"href" toon:"href"`
// Image source URL or internal image reference (starts with `img_` or `http`).
Src string `json:"src" toon:"src"`
}
// AlertInfo is generated from the Flashduty OpenAPI schema.
type AlertInfo struct {
// Account ID.
AccountID int64 `json:"account_id" toon:"account_id"`
// Alert ID (MongoDB ObjectID).
AlertID string `json:"alert_id" toon:"alert_id"`
// Deduplication key used to merge events into the alert.
AlertKey string `json:"alert_key" toon:"alert_key"`
// Current severity.
AlertSeverity string `json:"alert_severity" toon:"alert_severity"`
// Current status.
AlertStatus string `json:"alert_status" toon:"alert_status"`
// Channel ID.
ChannelID int64 `json:"channel_id" toon:"channel_id"`
// Channel display name.
ChannelName string `json:"channel_name" toon:"channel_name"`
// Channel status.
ChannelStatus string `json:"channel_status" toon:"channel_status"`
// Creation timestamp (seconds).
CreatedAt Timestamp `json:"created_at" toon:"created_at"`
// Deprecated. Use `integration_id` instead.
DataSourceID int64 `json:"data_source_id" toon:"data_source_id"`
// Deprecated. Use `integration_name`.
DataSourceName string `json:"data_source_name" toon:"data_source_name"`
// Deprecated. Use `integration_ref_id`.
DataSourceRefID string `json:"data_source_ref_id" toon:"data_source_ref_id"`
// Deprecated. Use `integration_type`.
DataSourceType string `json:"data_source_type" toon:"data_source_type"`
// Soft-delete timestamp (seconds). Zero if not deleted.
DeletedAt Timestamp `json:"deleted_at" toon:"deleted_at"`
// Alert description.
Description string `json:"description" toon:"description"`
// Unix timestamp (seconds) when the alert recovered. 0 if still active.
EndTime Timestamp `json:"end_time" toon:"end_time"`
// Total number of raw events merged into this alert.
EventCnt int64 `json:"event_cnt" toon:"event_cnt"`
// Raw alert event preview, populated only when requested. Capped at the 20 newest events per alert.
Events []AlertEventItem `json:"events" toon:"events"`
// Whether this alert has ever been silenced.
EverMuted bool `json:"ever_muted" toon:"ever_muted"`
// Attached images.
Images []Image `json:"images" toon:"images"`
// Parent incident reference, if the alert has been merged into one.
Incident IncidentShort `json:"incident" toon:"incident"`
// Integration ID that produced the alert.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Integration display name.
IntegrationName string `json:"integration_name" toon:"integration_name"`
// Integration reference ID.
IntegrationRefID string `json:"integration_ref_id" toon:"integration_ref_id"`
// Integration type string.
IntegrationType string `json:"integration_type" toon:"integration_type"`
// Alert labels.
Labels map[string]string `json:"labels" toon:"labels"`
// Unix timestamp (seconds) of the most recent event.
LastTime Timestamp `json:"last_time" toon:"last_time"`
// Primary responder email, if any.
ResponderEmail string `json:"responder_email" toon:"responder_email"`
// Primary responder name, if any.
ResponderName string `json:"responder_name" toon:"responder_name"`
// Unix timestamp (seconds) when the alert first fired.
StartTime Timestamp `json:"start_time" toon:"start_time"`
// Alert title.
Title string `json:"title" toon:"title"`
// Title rendering rule.
TitleRule string `json:"title_rule" toon:"title_rule"`
// Last update timestamp (seconds).
UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"`
}
// AlertInfoRequest is generated from the Flashduty OpenAPI schema.
type AlertInfoRequest struct {
// Alert ID (ObjectID hex string).
AlertID string `json:"alert_id" toon:"alert_id"`
}
// AlertItem is generated from the Flashduty OpenAPI schema.
type AlertItem struct {
// Account ID.
AccountID int64 `json:"account_id" toon:"account_id"`
// Unique alert ID (ObjectID hex string).
AlertID string `json:"alert_id" toon:"alert_id"`
// Deduplication key.
AlertKey string `json:"alert_key" toon:"alert_key"`
// Current severity.
AlertSeverity string `json:"alert_severity" toon:"alert_severity"`
// Current status.
AlertStatus string `json:"alert_status" toon:"alert_status"`
// ID of the channel the alert belongs to.
ChannelID int64 `json:"channel_id" toon:"channel_id"`
// Display name of the channel.
ChannelName string `json:"channel_name" toon:"channel_name"`
// Status of the channel (e.g. `enabled`, `disabled`).
ChannelStatus string `json:"channel_status" toon:"channel_status"`
// Creation timestamp, Unix epoch seconds.
CreatedAt Timestamp `json:"created_at" toon:"created_at"`
// Deprecated. Use `integration_id` instead. Deprecated: use `integration_id` instead.
DataSourceID int64 `json:"data_source_id" toon:"data_source_id"`
// Deprecated. Use `integration_name` instead.
DataSourceName string `json:"data_source_name" toon:"data_source_name"`
// Deprecated. Use `integration_ref_id` instead.
DataSourceRefID string `json:"data_source_ref_id" toon:"data_source_ref_id"`
// Deprecated. Use `integration_type` instead.
DataSourceType string `json:"data_source_type" toon:"data_source_type"`
// Alert description.
Description string `json:"description" toon:"description"`
// Resolution time, Unix epoch seconds. 0 if still active.
EndTime Timestamp `json:"end_time" toon:"end_time"`
// Total number of raw events received by this alert.
EventCnt int64 `json:"event_cnt" toon:"event_cnt"`
// Recent raw events attached to this alert. Populated only by some endpoints.
Events []AlertEventItem `json:"events" toon:"events"`
// True if this alert has ever been silenced.
EverMuted bool `json:"ever_muted" toon:"ever_muted"`
// Images attached to the alert.
Images []AlertImage `json:"images" toon:"images"`
// Associated incident, if any.
Incident IncidentShort `json:"incident" toon:"incident"`
// ID of the integration that produced this alert.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Display name of the integration.
IntegrationName string `json:"integration_name" toon:"integration_name"`
// External reference ID of the integration.
IntegrationRefID string `json:"integration_ref_id" toon:"integration_ref_id"`
// Type/plugin key of the integration.
IntegrationType string `json:"integration_type" toon:"integration_type"`
// Label key-value pairs.
Labels map[string]string `json:"labels" toon:"labels"`
// Last-event time, Unix epoch seconds.
LastTime Timestamp `json:"last_time" toon:"last_time"`
// Email of the current responder (from the associated incident).
ResponderEmail string `json:"responder_email" toon:"responder_email"`
// Display name of the current responder (from the associated incident).
ResponderName string `json:"responder_name" toon:"responder_name"`
// First-seen time, Unix epoch seconds.
StartTime Timestamp `json:"start_time" toon:"start_time"`
// Alert title.
Title string `json:"title" toon:"title"`
// Title template used to derive `title` from the event labels (e.g. `$service::$cluster`).
TitleRule string `json:"title_rule" toon:"title_rule"`
// Last update timestamp, Unix epoch seconds.
UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"`
}
// AlertListByIDsRequest is generated from the Flashduty OpenAPI schema.
type AlertListByIDsRequest struct {
// List of alert IDs (ObjectID hex strings).
AlertIDs []string `json:"alert_ids" toon:"alert_ids"`
}
// AlertListRequest is generated from the Flashduty OpenAPI schema.
type AlertListRequest struct {
ListOptions
// Filter to specific alert IDs (ObjectID hex strings).
AlertIDs []string `json:"alert_ids,omitempty" toon:"alert_ids,omitempty"`
// Filter by alert deduplication keys.
AlertKeys []string `json:"alert_keys,omitempty" toon:"alert_keys,omitempty"`
// Comma-separated severity filter, e.g. `Critical,Warning`. Allowed values: `Critical`, `Warning`, `Info`, `Ok`.
AlertSeverity string `json:"alert_severity,omitempty" toon:"alert_severity,omitempty"`
// Sort ascending when `true`. Default descending.
Asc bool `json:"asc,omitempty" toon:"asc,omitempty"`
// When `true`, the time range filter is applied on `updated_at` rather than `start_time`.
ByUpdatedAt bool `json:"by_updated_at,omitempty" toon:"by_updated_at,omitempty"`
// Filter by channel IDs.
ChannelIDs []int64 `json:"channel_ids,omitempty" toon:"channel_ids,omitempty"`
// End of the search window, Unix epoch seconds. Max span 31 days.
EndTime int64 `json:"end_time" toon:"end_time"`
// Filter by whether the alert has ever been silenced.
EverMuted *bool `json:"ever_muted,omitempty" toon:"ever_muted,omitempty"`
// Filter by integration IDs.
IntegrationIDs []int64 `json:"integration_ids,omitempty" toon:"integration_ids,omitempty"`
// Filter by active (`true`) or resolved (`false`) status.
IsActive *bool `json:"is_active,omitempty" toon:"is_active,omitempty"`
// Sort field.
Orderby string `json:"orderby,omitempty" toon:"orderby,omitempty"`
// Start of the search window, Unix epoch seconds.
StartTime int64 `json:"start_time" toon:"start_time"`
}
// AlertListResponse is generated from the Flashduty OpenAPI schema.
type AlertListResponse struct {
// True if more pages are available.
HasNextPage bool `json:"has_next_page" toon:"has_next_page"`
Items []AlertItem `json:"items" toon:"items"`
// Cursor for the next page.
SearchAfterCtx string `json:"search_after_ctx" toon:"search_after_ctx"`
// Total matching alerts.
Total int64 `json:"total" toon:"total"`
}
// AlertMergeRequest is generated from the Flashduty OpenAPI schema.
type AlertMergeRequest struct {
// Alert IDs to merge.
AlertIDs []string `json:"alert_ids" toon:"alert_ids"`
// Optional comment on the merge action.
Comment string `json:"comment,omitempty" toon:"comment,omitempty"`
// Target incident ID.
IncidentID string `json:"incident_id" toon:"incident_id"`
// Optional new owner for the target incident.
OwnerID int64 `json:"owner_id,omitempty" toon:"owner_id,omitempty"`
// Optional new title for the target incident.
Title string `json:"title,omitempty" toon:"title,omitempty"`
}
// AlertPipeline is generated from the Flashduty OpenAPI schema.
type AlertPipeline struct {
// Optional OR-of-AND filter. When omitted, the rule applies to all alerts.
If OrFilterGroup `json:"if,omitempty" toon:"if,omitempty"`
// Rule type.
Kind string `json:"kind,omitempty" toon:"kind,omitempty"`
// Kind-specific settings. Shape depends on `kind`:
// - `title_reset`: `{ "title": "<string>" }`
// - `description_reset`: `{ "description": "<string>" }`
// - `severity_reset`: `{ "severity": "Critical"|"Warning"|"Info" }`
// - `alert_drop`: `{}` (empty object)
// - `alert_inhibit`: `{ "equals": ["<label_key>", ...], "source_filters": <OrFilterGroup> }`
Settings any `json:"settings,omitempty" toon:"settings,omitempty"`
}
// AlertPipelineInfoRequest is generated from the Flashduty OpenAPI schema.
type AlertPipelineInfoRequest struct {
// Integration ID.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
}
// AlertPipelineItem is generated from the Flashduty OpenAPI schema.
type AlertPipelineItem struct {
// Creation timestamp, Unix epoch seconds.
CreatedAt Timestamp `json:"created_at" toon:"created_at"`
// Member ID who created the pipeline.
CreatorID int64 `json:"creator_id" toon:"creator_id"`
// Integration ID this pipeline applies to.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Ordered list of processing rules.
Rules []AlertPipeline `json:"rules" toon:"rules"`
// Pipeline status. Possible values: `enabled`, `disabled`.
Status string `json:"status" toon:"status"`
// Last update timestamp, Unix epoch seconds.
UpdatedAt Timestamp `json:"updated_at" toon:"updated_at"`
// Member ID who last updated the pipeline.
UpdatedBy int64 `json:"updated_by" toon:"updated_by"`
}
// AlertPipelineListRequest is generated from the Flashduty OpenAPI schema.
type AlertPipelineListRequest struct {
// Integration IDs.
IntegrationIDs []int64 `json:"integration_ids" toon:"integration_ids"`
}
// AlertPipelineListResponse is generated from the Flashduty OpenAPI schema.
type AlertPipelineListResponse struct {
Items []AlertPipelineItem `json:"items" toon:"items"`
}
// AlertPipelineUpsertRequest is generated from the Flashduty OpenAPI schema.
type AlertPipelineUpsertRequest struct {
// Integration ID to configure.
IntegrationID int64 `json:"integration_id" toon:"integration_id"`
// Rules to apply. Max 50.
Rules []AlertPipeline `json:"rules" toon:"rules"`
}
// AlertRule is generated from the Flashduty OpenAPI schema.
type AlertRule struct {
AccountID uint64 `json:"account_id,omitempty" toon:"account_id,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" toon:"annotations,omitempty"`
// Channel IDs to send alerts to.
ChannelIDs []uint64 `json:"channel_ids,omitempty" toon:"channel_ids,omitempty"`
CreatedAt int64 `json:"created_at,omitempty" toon:"created_at,omitempty"`
CreatorID uint64 `json:"creator_id,omitempty" toon:"creator_id,omitempty"`
CreatorName string `json:"creator_name,omitempty" toon:"creator_name,omitempty"`
// 5-field cron schedule.
CronPattern string `json:"cron_pattern,omitempty" toon:"cron_pattern,omitempty"`
DebugLogEnabled bool `json:"debug_log_enabled,omitempty" toon:"debug_log_enabled,omitempty"`
DelaySeconds int64 `json:"delay_seconds,omitempty" toon:"delay_seconds,omitempty"`
Description string `json:"description,omitempty" toon:"description,omitempty"`
// Format for the description. Defaults to `text` when omitted or empty.
DescriptionType string `json:"description_type,omitempty" toon:"description_type,omitempty"`
// Specific data source IDs.
DsIDs []uint64 `json:"ds_ids,omitempty" toon:"ds_ids,omitempty"`
// Data source name patterns (supports wildcards).
DsList []string `json:"ds_list,omitempty" toon:"ds_list,omitempty"`
// Data source type.
DsType string `json:"ds_type,omitempty" toon:"ds_type,omitempty"`
Enabled bool `json:"enabled,omitempty" toon:"enabled,omitempty"`
// Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.
EnabledTimes []AlertRuleEnabledTimesItem `json:"enabled_times,omitempty" toon:"enabled_times,omitempty"`
// Folder the rule belongs to.
FolderID uint64 `json:"folder_id,omitempty" toon:"folder_id,omitempty"`
ID uint64 `json:"id,omitempty" toon:"id,omitempty"`
// Custom labels.
Labels map[string]string `json:"labels,omitempty" toon:"labels,omitempty"`
// Rule name.
Name string `json:"name,omitempty" toon:"name,omitempty"`
// Notification repeat interval in seconds.
RepeatInterval int64 `json:"repeat_interval,omitempty" toon:"repeat_interval,omitempty"`
// Max number of repeat notifications.
RepeatTotal int64 `json:"repeat_total,omitempty" toon:"repeat_total,omitempty"`
RuleConfigs RuleConfigs `json:"rule_configs,omitzero" toon:"rule_configs,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty" toon:"updated_at,omitempty"`
UpdaterID uint64 `json:"updater_id,omitempty" toon:"updater_id,omitempty"`
UpdaterName string `json:"updater_name,omitempty" toon:"updater_name,omitempty"`
}
// AlertRuleAudit is generated from the Flashduty OpenAPI schema.
type AlertRuleAudit struct {
AccountID uint64 `json:"account_id" toon:"account_id"`
// Action performed, e.g. `create`, `update`.
Action string `json:"action" toon:"action"`
// ID of the alert rule this record belongs to.
AlertRuleID uint64 `json:"alert_rule_id" toon:"alert_rule_id"`
// JSON string of the full rule snapshot at audit time. Populated on `/monit/rule/audit/detail`, omitted on list responses.
Content string `json:"content" toon:"content"`
CreatedAt int64 `json:"created_at" toon:"created_at"`
CreatorID uint64 `json:"creator_id" toon:"creator_id"`
CreatorName string `json:"creator_name" toon:"creator_name"`
// Audit record ID.
ID uint64 `json:"id" toon:"id"`
}
// AlertRuleBasic is generated from the Flashduty OpenAPI schema.
type AlertRuleBasic struct {
// Account ID.
AccountID uint64 `json:"account_id" toon:"account_id"`
CreatedAt int64 `json:"created_at" toon:"created_at"`
CreatorID uint64 `json:"creator_id" toon:"creator_id"`
CreatorName string `json:"creator_name" toon:"creator_name"`
// 5-field cron schedule, e.g. `* * * * *`.
CronPattern string `json:"cron_pattern" toon:"cron_pattern"`
// Whether debug logging is enabled.
DebugLogEnabled bool `json:"debug_log_enabled" toon:"debug_log_enabled"`
// Evaluation delay in seconds.
DelaySeconds int64 `json:"delay_seconds" toon:"delay_seconds"`
// Data source type, e.g. `prometheus`.
DsType string `json:"ds_type" toon:"ds_type"`
// Whether the rule is enabled.
Enabled bool `json:"enabled" toon:"enabled"`
// Folder ID.
FolderID uint64 `json:"folder_id" toon:"folder_id"`
// Unique rule ID.
ID uint64 `json:"id" toon:"id"`
// Custom labels.
Labels map[string]string `json:"labels" toon:"labels"`
// Rule name.
Name string `json:"name" toon:"name"`
// True if the rule currently has active alerts.
Triggered bool `json:"triggered" toon:"triggered"`
UpdatedAt int64 `json:"updated_at" toon:"updated_at"`
UpdaterID uint64 `json:"updater_id" toon:"updater_id"`
UpdaterName string `json:"updater_name" toon:"updater_name"`
}
// AlertRuleCounter is generated from the Flashduty OpenAPI schema.
type AlertRuleCounter struct {
AccountID uint64 `json:"account_id" toon:"account_id"`
// Sample timestamp, Unix epoch seconds.
Clock Timestamp `json:"clock" toon:"clock"`
ID uint64 `json:"id" toon:"id"`
// Rule count at the sample time.
Num int64 `json:"num" toon:"num"`
}
// AlertRuleExport is generated from the Flashduty OpenAPI schema.
type AlertRuleExport struct {
Annotations map[string]string `json:"annotations" toon:"annotations"`
CronPattern string `json:"cron_pattern" toon:"cron_pattern"`
DebugLogEnabled bool `json:"debug_log_enabled" toon:"debug_log_enabled"`
DelaySeconds int64 `json:"delay_seconds" toon:"delay_seconds"`
Description string `json:"description" toon:"description"`
DescriptionType string `json:"description_type" toon:"description_type"`
DsIDs []uint64 `json:"ds_ids" toon:"ds_ids"`
DsList []string `json:"ds_list" toon:"ds_list"`
DsType string `json:"ds_type" toon:"ds_type"`
Enabled bool `json:"enabled" toon:"enabled"`
EnabledTimes []EnabledTime `json:"enabled_times" toon:"enabled_times"`
Labels map[string]string `json:"labels" toon:"labels"`
Name string `json:"name" toon:"name"`
RepeatInterval int64 `json:"repeat_interval" toon:"repeat_interval"`
RepeatTotal int64 `json:"repeat_total" toon:"repeat_total"`
RuleConfigs RuleConfigs `json:"rule_configs" toon:"rule_configs"`
}
// AlertRuleInfoResponse is generated from the Flashduty OpenAPI schema.
type AlertRuleInfoResponse struct {
AccountID uint64 `json:"account_id" toon:"account_id"`
Annotations map[string]string `json:"annotations" toon:"annotations"`
// Channel IDs to send alerts to.
ChannelIDs []uint64 `json:"channel_ids" toon:"channel_ids"`
CreatedAt int64 `json:"created_at" toon:"created_at"`
CreatorID uint64 `json:"creator_id" toon:"creator_id"`
CreatorName string `json:"creator_name" toon:"creator_name"`
// 5-field cron schedule.
CronPattern string `json:"cron_pattern" toon:"cron_pattern"`
DebugLogEnabled bool `json:"debug_log_enabled" toon:"debug_log_enabled"`
DelaySeconds int64 `json:"delay_seconds" toon:"delay_seconds"`
Description string `json:"description" toon:"description"`
// Format for the description. Defaults to `text` when omitted or empty.
DescriptionType string `json:"description_type" toon:"description_type"`
// Specific data source IDs.
DsIDs []uint64 `json:"ds_ids" toon:"ds_ids"`
// Data source name patterns (supports wildcards).
DsList []string `json:"ds_list" toon:"ds_list"`
// Data source type.
DsType string `json:"ds_type" toon:"ds_type"`
Enabled bool `json:"enabled" toon:"enabled"`
// Time windows when the rule is active. Defaults to all days from 00:00 to 23:59 when omitted or empty.
EnabledTimes []AlertRuleInfoResponseEnabledTimesItem `json:"enabled_times" toon:"enabled_times"`
// Folder the rule belongs to.
FolderID uint64 `json:"folder_id" toon:"folder_id"`
ID uint64 `json:"id" toon:"id"`
// Custom labels.
Labels map[string]string `json:"labels" toon:"labels"`
// Rule name.
Name string `json:"name" toon:"name"`
// Notification repeat interval in seconds.
RepeatInterval int64 `json:"repeat_interval" toon:"repeat_interval"`
// Max number of repeat notifications.
RepeatTotal int64 `json:"repeat_total" toon:"repeat_total"`
RuleConfigs RuleConfigs `json:"rule_configs" toon:"rule_configs"`
UpdatedAt int64 `json:"updated_at" toon:"updated_at"`
UpdaterID uint64 `json:"updater_id" toon:"updater_id"`
UpdaterName string `json:"updater_name" toon:"updater_name"`
}
// AlertRuleStatus is generated from the Flashduty OpenAPI schema.
type AlertRuleStatus struct {
FolderID uint64 `json:"folder_id" toon:"folder_id"`
FolderName string `json:"folder_name" toon:"folder_name"`
// Total rules in the folder family.
RuleTotal int64 `json:"rule_total" toon:"rule_total"`
// Rules with active alerts.
TriggeredRuleCount int64 `json:"triggered_rule_count" toon:"triggered_rule_count"`
}
// ApAlertDrop is generated from the Flashduty OpenAPI schema.
type ApAlertDrop struct{}
// ApAlertInhibit is generated from the Flashduty OpenAPI schema.
type ApAlertInhibit struct {
// Label keys whose values must be equal between the source and current alert for inhibition to apply.
Equals []string `json:"equals" toon:"equals"`
// Filter that identifies the source alerts to inhibit.
SourceFilters OrFilterGroup `json:"source_filters" toon:"source_filters"`
}
// ApDescriptionReset is generated from the Flashduty OpenAPI schema.
type ApDescriptionReset struct {
// New description template.
Description string `json:"description" toon:"description"`
}
// ApSeverityReset is generated from the Flashduty OpenAPI schema.
type ApSeverityReset struct {
// Target severity level.
Severity string `json:"severity" toon:"severity"`
}
// ApTitleReset is generated from the Flashduty OpenAPI schema.
type ApTitleReset struct {
// New title template. Supports Golang template syntax referencing alert fields.
Title string `json:"title" toon:"title"`
}
// AssignIncidentRequest is generated from the Flashduty OpenAPI schema.
type AssignIncidentRequest struct {
AssignedTo AssignedTo `json:"assigned_to" toon:"assigned_to"`
// Single incident ID. Ignored when `incident_ids` is also provided.
IncidentID string `json:"incident_id,omitempty" toon:"incident_id,omitempty"`
// Batch incident IDs.