// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; import { FilterSetting } from "./FilterSetting"; export class NotifyStrategyDetailCustomTemplateEntries extends $dara.Model { /** * @remarks * The UUID of the notification template. * * @example * template-uuid-xxx */ templateUuid?: string; static names(): { [key: string]: string } { return { templateUuid: 'templateUuid', }; } static types(): { [key: string]: any } { return { templateUuid: 'string', }; } validate() { super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class NotifyStrategyDetailGroupingSetting extends $dara.Model { /** * @remarks * The event fields by which events are grouped for noise reduction. Events in the same group are merged into a single notification. An empty array indicates no grouping. * * @example * ["alertname"] */ groupingKeys?: string[]; /** * @remarks * The check period in minutes. * * @example * 0 */ periodMin?: number; /** * @remarks * The silence duration in seconds. * * @example * 0 */ silenceSec?: number; /** * @remarks * The number of trigger times. * * @example * 0 */ times?: number; static names(): { [key: string]: string } { return { groupingKeys: 'groupingKeys', periodMin: 'periodMin', silenceSec: 'silenceSec', times: 'times', }; } static types(): { [key: string]: any } { return { groupingKeys: { 'type': 'array', 'itemType': 'string' }, periodMin: 'number', silenceSec: 'number', times: 'number', }; } validate() { if(Array.isArray(this.groupingKeys)) { $dara.Model.validateArray(this.groupingKeys); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class NotifyStrategyDetailRoutesChannels extends $dara.Model { /** * @remarks * The channel type. Valid values: DING, WEIXIN, FEISHU, SLACK, TEAMS, WEBHOOK, CONTACT, GROUP, DUTY, and DING_COOL_APP. * * @example * WEBHOOK */ channelType?: string; /** * @remarks * The enabled sub-channels. Valid values: EMAIL, SMS, VOICE, DING, WEIXIN, FEISHU, and WEBHOOK. * * @example * ["EMAIL","SMS"] */ enabledSubChannels?: string[]; /** * @remarks * The list of receiver identifiers. * * @example * ["webhook-uuid-xxx"] */ receivers?: string[]; static names(): { [key: string]: string } { return { channelType: 'channelType', enabledSubChannels: 'enabledSubChannels', receivers: 'receivers', }; } static types(): { [key: string]: any } { return { channelType: 'string', enabledSubChannels: { 'type': 'array', 'itemType': 'string' }, receivers: { 'type': 'array', 'itemType': 'string' }, }; } validate() { if(Array.isArray(this.enabledSubChannels)) { $dara.Model.validateArray(this.enabledSubChannels); } if(Array.isArray(this.receivers)) { $dara.Model.validateArray(this.receivers); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class NotifyStrategyDetailRoutesEffectTimeRange extends $dara.Model { /** * @remarks * The effective days of the week. Valid values: 0 to 6 (0 = Sunday, 6 = Saturday). The value 7 is not supported. * * @example * [0,1,2,3,4,5,6] */ dayInWeek?: number[]; /** * @remarks * The end time of the day in minutes. Valid values: 0 to 1439. * * @example * 1439 */ endTimeInMinute?: number; /** * @remarks * The start time of the day in minutes. Valid values: 0 to 1438. * * @example * 0 */ startTimeInMinute?: number; /** * @remarks * The IANA time zone identifier. * * @example * Asia/Shanghai */ timeZone?: string; static names(): { [key: string]: string } { return { dayInWeek: 'dayInWeek', endTimeInMinute: 'endTimeInMinute', startTimeInMinute: 'startTimeInMinute', timeZone: 'timeZone', }; } static types(): { [key: string]: any } { return { dayInWeek: { 'type': 'array', 'itemType': 'number' }, endTimeInMinute: 'number', startTimeInMinute: 'number', timeZone: 'string', }; } validate() { if(Array.isArray(this.dayInWeek)) { $dara.Model.validateArray(this.dayInWeek); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class NotifyStrategyDetailRoutes extends $dara.Model { /** * @remarks * The list of notification channels. * * @example * [] */ channels?: NotifyStrategyDetailRoutesChannels[]; /** * @remarks * The digital employee name. This parameter is required when enableRca is set to true. * * @example * 数字员工名 */ digitalEmployeeName?: string; /** * @remarks * The effective time range. */ effectTimeRange?: NotifyStrategyDetailRoutesEffectTimeRange; /** * @remarks * Specifies whether to enable root cause analysis (RCA). * * @example * false */ enableRca?: boolean; /** * @remarks * The route-level event filter conditions. * * @example * {} */ filterSetting?: FilterSetting; static names(): { [key: string]: string } { return { channels: 'channels', digitalEmployeeName: 'digitalEmployeeName', effectTimeRange: 'effectTimeRange', enableRca: 'enableRca', filterSetting: 'filterSetting', }; } static types(): { [key: string]: any } { return { channels: { 'type': 'array', 'itemType': NotifyStrategyDetailRoutesChannels }, digitalEmployeeName: 'string', effectTimeRange: NotifyStrategyDetailRoutesEffectTimeRange, enableRca: 'boolean', filterSetting: FilterSetting, }; } validate() { if(Array.isArray(this.channels)) { $dara.Model.validateArray(this.channels); } if(this.effectTimeRange && typeof (this.effectTimeRange as any).validate === 'function') { (this.effectTimeRange as any).validate(); } if(this.filterSetting && typeof (this.filterSetting as any).validate === 'function') { (this.filterSetting as any).validate(); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } } export class NotifyStrategyDetail extends $dara.Model { /** * @remarks * The list of custom notification templates. * * @example * [] */ customTemplateEntries?: NotifyStrategyDetailCustomTemplateEntries[]; /** * @remarks * The description of the notification policy. * * @example * 生产环境告警通知策略 */ description?: string; /** * @remarks * The grouping and merging settings. */ groupingSetting?: NotifyStrategyDetailGroupingSetting; /** * @remarks * Specifies whether to ignore notifications for recovery events. A value of true indicates that recovery notifications are not sent. * * @example * true */ ignoreRestoredNotification?: boolean; /** * @remarks * The list of notification channel routing settings. * * @example * [] */ routes?: NotifyStrategyDetailRoutes[]; static names(): { [key: string]: string } { return { customTemplateEntries: 'customTemplateEntries', description: 'description', groupingSetting: 'groupingSetting', ignoreRestoredNotification: 'ignoreRestoredNotification', routes: 'routes', }; } static types(): { [key: string]: any } { return { customTemplateEntries: { 'type': 'array', 'itemType': NotifyStrategyDetailCustomTemplateEntries }, description: 'string', groupingSetting: NotifyStrategyDetailGroupingSetting, ignoreRestoredNotification: 'boolean', routes: { 'type': 'array', 'itemType': NotifyStrategyDetailRoutes }, }; } validate() { if(Array.isArray(this.customTemplateEntries)) { $dara.Model.validateArray(this.customTemplateEntries); } if(this.groupingSetting && typeof (this.groupingSetting as any).validate === 'function') { (this.groupingSetting as any).validate(); } if(Array.isArray(this.routes)) { $dara.Model.validateArray(this.routes); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }