mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-12 19:18:33 -05:00
SQL Agent configuration for Operators, Alerts and Proxies (WIP) (#621)
* 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
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user