// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; import { NotifyStrategyConfig } from "./NotifyStrategyConfig"; import { ResponsePlanConfig } from "./ResponsePlanConfig"; import { SubscriptionConfig } from "./SubscriptionConfig"; export class NotifyPolicyConfig extends $dara.Model { /** * @remarks * The description of the policy, which helps identify its purpose. * * @example * 生产环境告警通知策略 */ description?: string; /** * @remarks * The policy name. We recommend that you specify this parameter for the Create operation. If a policy with the same name already exists in the workspace, ConflictName (409) is returned. * * @example * 生产环境告警通知策略 */ name?: string; /** * @remarks * The notification strategy sub-entity, which includes noise reduction, notification routing, channels, and custom templates. Required for the Create operation. * * @example * {} */ notifyStrategy?: NotifyStrategyConfig; /** * @remarks * The response plan sub-entity, which includes upgrade, repeated notification, automatic recovery, and action integration. Optional. * * @example * {} */ responsePlan?: ResponsePlanConfig; /** * @remarks * The subscription sub-entity, which includes event filtering, cross-workspace routing, and legacy product event subscription switches. Optional. If not specified, all events in the current workspace are subscribed to. * * @example * {} */ subscription?: SubscriptionConfig; /** * @remarks * The unique identifier of the policy. Required for the Update operation. Omitted for the Create operation because it is generated by the backend. * * @example * 04779a183add4f2ca06ab440f16cc580 */ uuid?: string; /** * @remarks * Required for the Update operation. The write succeeds only when this value matches the backend record. If the values do not match, OptimisticLockFailed is returned. * * @example * 1 */ version?: number; static names(): { [key: string]: string } { return { description: 'description', name: 'name', notifyStrategy: 'notifyStrategy', responsePlan: 'responsePlan', subscription: 'subscription', uuid: 'uuid', version: 'version', }; } static types(): { [key: string]: any } { return { description: 'string', name: 'string', notifyStrategy: NotifyStrategyConfig, responsePlan: ResponsePlanConfig, subscription: SubscriptionConfig, uuid: 'string', version: 'number', }; } validate() { if(this.notifyStrategy && typeof (this.notifyStrategy as any).validate === 'function') { (this.notifyStrategy as any).validate(); } if(this.responsePlan && typeof (this.responsePlan as any).validate === 'function') { (this.responsePlan as any).validate(); } if(this.subscription && typeof (this.subscription as any).validate === 'function') { (this.subscription as any).validate(); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }