// This file is auto-generated, don't edit it import * as $dara from '@darabonba/typescript'; import { NotifyStrategyForSNSView } from "./NotifyStrategyForSnsview"; import { IncidentResponsePlanForSNSView } from "./IncidentResponsePlanForSnsview"; import { SubscriptionForSNSView } from "./SubscriptionForSnsview"; import { SubscriptionForView } from "./SubscriptionForView"; export class SubscriptionAndNotifyStrategyForView extends $dara.Model { /** * @remarks * The creation time. The value is a UNIX timestamp string in milliseconds. * * @example * 1719820800000 */ createTime?: string; /** * @remarks * The description of the alert policy. * * @example * Alert policy for ECS faults in the production environment. Notifications are sent to the on-duty group */ description?: string; /** * @remarks * Indicates whether the alert policy is enabled. This field is controlled by the EnableAlertPolicy and DisableAlertPolicy operations. The Create and Update operations do not directly set this field. * * @example * true */ enabled?: boolean; /** * @remarks * The migration batch ID. This is an internal system field. The value is an empty string for user-created policies and is populated for policies migrated from the legacy version. * * @example * 123 */ migrationBatchId?: string; /** * @remarks * The migration metadata JSON string. This is an internal system field. You do not need to configure this field. * * @example * {} */ migrationMeta?: string; /** * @remarks * The name of the alert policy. * * @example * ECS Fault Notification Policy */ name?: string; /** * @remarks * The snapshot of the notification strategy details, including notification routes (routes), notification channels (channels), grouping settings (groupingSetting), and custom templates (customTemplateEntries). */ notifyStrategy?: NotifyStrategyForSNSView; /** * @remarks * The UUID of the associated notifyStrategy. This UUID is shared with the responsePlan UUID. * * @example * 7076c75c-c804-461e-975f-c6f9ed5af745 */ notifyStrategyUuid?: string; /** * @remarks * The snapshot of the event response plan details, including escalation policy (escalationId), repeat notification (repeatNotifySetting), automatic recovery (autoRecoverSeconds), and action integration (pushingSetting). */ responsePlan?: IncidentResponsePlanForSNSView; /** * @remarks * The snapshot of the primary subscription details, including filter conditions (filterSetting) and cross-workspace subscription configuration (workspaceFilterSetting). */ subscription?: SubscriptionForSNSView; /** * @remarks * The UUID of the primary subscription. This UUID is generated when the alert policy is bound to a subscription in a 1:1 relationship. * * @example * 7076c75c-c804-461e-975f-c6f9ed5af745 */ subscriptionUuid?: string; /** * @remarks * The list of all associated subscriptions, including the primary subscription. This list is generated by the backend through a reverse lookup. The array length is greater than 1 only when workspace-level subscriptions are added in addition to the primary subscription. */ subscriptions?: SubscriptionForView[]; /** * @remarks * The last update time. The value is a UNIX timestamp string in milliseconds. * * @example * 1719820800000 */ updateTime?: string; /** * @remarks * The userId of the owner. * * @example * 1234567890123456 */ userId?: string; /** * @remarks * The UUID of the alert policy. * * @example * 7076c75c-c804-461e-975f-c6f9ed5af745 */ uuid?: string; /** * @remarks * The optimistic lock version number. You must pass in the current value during an Update operation to prevent concurrent conflicts. The value is incremented by 1 after each successful Update operation. * * @example * 1 */ version?: number; /** * @remarks * The workspace identifier. * * @example * default-cms-1234567890-cn-hangzhou */ workspace?: string; static names(): { [key: string]: string } { return { createTime: 'createTime', description: 'description', enabled: 'enabled', migrationBatchId: 'migrationBatchId', migrationMeta: 'migrationMeta', name: 'name', notifyStrategy: 'notifyStrategy', notifyStrategyUuid: 'notifyStrategyUuid', responsePlan: 'responsePlan', subscription: 'subscription', subscriptionUuid: 'subscriptionUuid', subscriptions: 'subscriptions', updateTime: 'updateTime', userId: 'userId', uuid: 'uuid', version: 'version', workspace: 'workspace', }; } static types(): { [key: string]: any } { return { createTime: 'string', description: 'string', enabled: 'boolean', migrationBatchId: 'string', migrationMeta: 'string', name: 'string', notifyStrategy: NotifyStrategyForSNSView, notifyStrategyUuid: 'string', responsePlan: IncidentResponsePlanForSNSView, subscription: SubscriptionForSNSView, subscriptionUuid: 'string', subscriptions: { 'type': 'array', 'itemType': SubscriptionForView }, updateTime: 'string', userId: 'string', uuid: 'string', version: 'number', workspace: 'string', }; } 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(); } if(Array.isArray(this.subscriptions)) { $dara.Model.validateArray(this.subscriptions); } super.validate(); } constructor(map?: { [key: string]: any }) { super(map); } }