/* Options: Date: 2026-01-25 12:24:52 Version: 8.71 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://evovoice.io //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: NewAlert.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum AlertTriggers { CallSpend, } abstract class EntityInfo { /** * The ID of the object */ // @ApiMember(Description="The ID of the object") String? id; /** * The date the object was created */ // @ApiMember(Description="The date the object was created") String? dateCreated; /** * The date the object was last modified */ // @ApiMember(Description="The date the object was last modified") String? dateLastModified; /** * The user that created this object */ // @ApiMember(Description="The user that created this object") String? createdBy; /** * The user that last modified this object */ // @ApiMember(Description="The user that last modified this object") String? lastModifiedBy; EntityInfo({this.id,this.dateCreated,this.dateLastModified,this.createdBy,this.lastModifiedBy}); EntityInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; dateCreated = json['dateCreated']; dateLastModified = json['dateLastModified']; createdBy = json['createdBy']; lastModifiedBy = json['lastModifiedBy']; return this; } Map toJson() => { 'id': id, 'dateCreated': dateCreated, 'dateLastModified': dateLastModified, 'createdBy': createdBy, 'lastModifiedBy': lastModifiedBy }; getTypeName() => "EntityInfo"; TypeContext? context = _ctx; } class AlertInfo extends EntityInfo implements IConvertible { /** * The ID of the account associated with this alert */ // @ApiMember(Description="The ID of the account associated with this alert") String? accountId; /** * The name of the alert */ // @ApiMember(Description="The name of the alert") String? name; /** * The trigger alert */ // @ApiMember(Description="The trigger alert") AlertTriggers? trigger; /** * The number of hours for the window over which the alert will trigger */ // @ApiMember(Description="The number of hours for the window over which the alert will trigger") double? windowHours; /** * The value at which the alert will trigger */ // @ApiMember(Description="The value at which the alert will trigger") double? threshold; /** * The email addresses (one per line) to notify */ // @ApiMember(Description="The email addresses (one per line) to notify") String? notificationEmailAddresses; AlertInfo({this.accountId,this.name,this.trigger,this.windowHours,this.threshold,this.notificationEmailAddresses}); AlertInfo.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); accountId = json['accountId']; name = json['name']; trigger = JsonConverters.fromJson(json['trigger'],'AlertTriggers',context!); windowHours = JsonConverters.toDouble(json['windowHours']); threshold = JsonConverters.toDouble(json['threshold']); notificationEmailAddresses = json['notificationEmailAddresses']; return this; } Map toJson() => super.toJson()..addAll({ 'accountId': accountId, 'name': name, 'trigger': JsonConverters.toJson(trigger,'AlertTriggers',context!), 'windowHours': windowHours, 'threshold': threshold, 'notificationEmailAddresses': notificationEmailAddresses }); getTypeName() => "AlertInfo"; TypeContext? context = _ctx; } /** * Creates a new alert */ // @Route("/alerts", "POST") // @Api(Description="Creates a new alert") class NewAlert implements IReturn, IPost, IConvertible { /** * The account ID to associate this alert with */ // @ApiMember(Description="The account ID to associate this alert with") String? accountId; /** * The name of the alert */ // @ApiMember(Description="The name of the alert") String? name; /** * The trigger alert */ // @ApiMember(Description="The trigger alert") AlertTriggers? trigger; /** * The number of hours for the window over which the alert will trigger */ // @ApiMember(Description="The number of hours for the window over which the alert will trigger") double? windowHours; /** * The value at which the alert will trigger */ // @ApiMember(Description="The value at which the alert will trigger") double? threshold; /** * The email addresses (one per line) to notify */ // @ApiMember(Description="The email addresses (one per line) to notify") String? notificationEmailAddresses; NewAlert({this.accountId,this.name,this.trigger,this.windowHours,this.threshold,this.notificationEmailAddresses}); NewAlert.fromJson(Map json) { fromMap(json); } fromMap(Map json) { accountId = json['accountId']; name = json['name']; trigger = JsonConverters.fromJson(json['trigger'],'AlertTriggers',context!); windowHours = JsonConverters.toDouble(json['windowHours']); threshold = JsonConverters.toDouble(json['threshold']); notificationEmailAddresses = json['notificationEmailAddresses']; return this; } Map toJson() => { 'accountId': accountId, 'name': name, 'trigger': JsonConverters.toJson(trigger,'AlertTriggers',context!), 'windowHours': windowHours, 'threshold': threshold, 'notificationEmailAddresses': notificationEmailAddresses }; createResponse() => AlertInfo(); getResponseTypeName() => "AlertInfo"; getTypeName() => "NewAlert"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'evovoice.io', types: { 'AlertTriggers': TypeInfo(TypeOf.Enum, enumValues:AlertTriggers.values), 'EntityInfo': TypeInfo(TypeOf.AbstractClass), 'AlertInfo': TypeInfo(TypeOf.Class, create:() => AlertInfo()), 'NewAlert': TypeInfo(TypeOf.Class, create:() => NewAlert()), });