mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
* Initial non-refactored SQL Agent alert classes (WIP) * Move agent classes into subdirectories * Refactor the agent config code a bit more * Add more implementation for handlers * Add more code to the create alert handler * Clean up agent alert class * Clean up alert methods a bit * Initial Operator contracts * Additonal SQL Agent config changes * More Proxy config cleanup * Cleanup AgentProxy class * Additional cleanups * Run SRGen * Add security service to create credential objects
51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.SqlTools.ServiceLayer.Agent;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
|
|
{
|
|
[Flags]
|
|
public enum WeekDays
|
|
{
|
|
Sunday = 1,
|
|
Monday = 2,
|
|
Tuesday = 4,
|
|
Wednesday = 8,
|
|
Thursday = 16,
|
|
Friday = 32,
|
|
WeekDays = 62,
|
|
Saturday = 64,
|
|
WeekEnds = 65,
|
|
EveryDay = 127
|
|
}
|
|
|
|
/// <summary>
|
|
/// a class for storing various properties of agent operators
|
|
/// </summary>
|
|
public class AgentOperatorInfo
|
|
{
|
|
public string Name { get; set; }
|
|
public int Id { get; set; }
|
|
public string EmailAddress { get; set; }
|
|
public bool Enabled { get; set; }
|
|
public DateTime LastEmailDate { get; set; }
|
|
public DateTime LastNetSendDate { get; set; }
|
|
public DateTime LastPagerDate { get; set; }
|
|
public string PagerAddress { get; set; }
|
|
public string CategoryName { get; set; }
|
|
public WeekDays PagerDays { get; set; }
|
|
public TimeSpan SaturdayPagerEndTime { get; set; }
|
|
public TimeSpan SaturdayPagerStartTime { get; set; }
|
|
public TimeSpan SundayPagerEndTime { get; set; }
|
|
public TimeSpan SundayPagerStartTime { get; set; }
|
|
public string NetSendAddress { get; set; }
|
|
public TimeSpan WeekdayPagerStartTime { get; set; }
|
|
public TimeSpan WeekdayPagerEndTime { get; set; }
|
|
}
|
|
}
|