git.iko.soy/typeable/pagerduty
on develop help sign in
Adding EmailFilters REST API
c346e35Brendan Hay
pagerduty.cabal+3−3
@@ -36,15 +36,15 @@ library
36 -- , Network.PagerDuty.REST
36 -- , Network.PagerDuty.REST
37 -- , Network.PagerDuty.REST.Alerts
37 -- , Network.PagerDuty.REST.Alerts
38 -- , Network.PagerDuty.REST.EscalationPolicies
38 -- , Network.PagerDuty.REST.EscalationPolicies
39− , Network.PagerDuty.REST.EscalationPolicies.EscalationRules
39+-- , Network.PagerDuty.REST.EscalationPolicies.EscalationRules
40− , Network.PagerDuty.REST.EscalationPolicies.OnCall
40+-- , Network.PagerDuty.REST.EscalationPolicies.OnCall
41 , Network.PagerDuty.REST.Incidents
41 , Network.PagerDuty.REST.Incidents
42 , Network.PagerDuty.REST.Incidents.Notes
42 , Network.PagerDuty.REST.Incidents.Notes
43 -- , Network.PagerDuty.REST.LogEntries
43 -- , Network.PagerDuty.REST.LogEntries
44 -- , Network.PagerDuty.REST.MaintenanceWindows
44 -- , Network.PagerDuty.REST.MaintenanceWindows
45 -- , Network.PagerDuty.REST.Reports
45 -- , Network.PagerDuty.REST.Reports
46 -- , Network.PagerDuty.REST.Schedules
46 -- , Network.PagerDuty.REST.Schedules
47− , Network.PagerDuty.REST.Schedules.Overrides
47+-- , Network.PagerDuty.REST.Schedules.Overrides
48 -- , Network.PagerDuty.REST.Services
48 -- , Network.PagerDuty.REST.Services
49 , Network.PagerDuty.REST.Services.EmailFilters
49 , Network.PagerDuty.REST.Services.EmailFilters
50 , Network.PagerDuty.REST.Users
50 , Network.PagerDuty.REST.Users
src/Network/PagerDuty/REST/EscalationPolicies/EscalationRules.hs+2
@@ -17,6 +17,8 @@
17
17
18-- | This API lets you access and manipulate escalation rules of an existing
18-- | This API lets you access and manipulate escalation rules of an existing
19-- escalation policy.
19-- escalation policy.
20+--
21+-- /See:/ <http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules>
20module Network.PagerDuty.REST.EscalationPolicies.EscalationRules
22module Network.PagerDuty.REST.EscalationPolicies.EscalationRules
21 (
23 (
22 -- * List Rules
24 -- * List Rules
src/Network/PagerDuty/REST/EscalationPolicies/OnCall.hs+30−5
@@ -11,12 +11,11 @@
11-- Stability : experimental
11-- Stability : experimental
12-- Portability : non-portable (GHC extensions)
12-- Portability : non-portable (GHC extensions)
13
13
14−-- | List all the existing escalation policies with currently on-call users.
14+-- | List escalation policies for currently on-call users.
15−--
16−-- If the start and end of an on-call object are null, then the user is always
17−-- on-call for an escalation policy level.
18module Network.PagerDuty.REST.EscalationPolicies.OnCall
15module Network.PagerDuty.REST.EscalationPolicies.OnCall
19− (
16+ ( ListOnCallPolicies
17+ , listOnCallPolicies
18+ , locpQuery
20 ) where
19 ) where
21
20
22import Control.Lens
21import Control.Lens
@@ -26,3 +25,29 @@ import Data.Time
26import Network.HTTP.Types
25import Network.HTTP.Types
27import Network.PagerDuty.TH
26import Network.PagerDuty.TH
28import Network.PagerDuty.Types
27import Network.PagerDuty.Types
28+
29+newtype ListOnCallPolicies = ListOnCallPolicies
30+ { _locpQuery :: Maybe Text
31+ } deriving (Eq, Show)
32+
33+queryRequest ''ListOnCallPolicies
34+
35+instance Paginate ListOnCallPolicies
36+
37+-- | Filters the result, showing only the escalation policies whose names match
38+-- the query.
39+makeLens "_locpQuery" ''ListOnCallPolicies
40+
41+-- | List all the existing escalation policies with currently on-call users.
42+--
43+-- If the start and end of an on-call object are null, then the user is always
44+-- on-call for an escalation policy level.
45+--
46+-- @GET \/escalation_policies\/on_call@
47+--
48+-- /See:/ <http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call>
49+listOnCallPolicies :: Request ListOnCallPolicies s [Policy]
50+listOnCallPolicies =
51+ mk ListOnCallPolicies
52+ { _locpQuery = Nothing
53+ } & path .~ "policies"
src/Network/PagerDuty/REST/Incidents.hs+2
@@ -37,6 +37,8 @@
37--
37--
38-- Note: that to create an incident you need to trigger it through the
38-- Note: that to create an incident you need to trigger it through the
39-- "Network.PagerDuty.Integration" API.
39-- "Network.PagerDuty.Integration" API.
40+--
41+-- /See:/ <http://developer.pagerduty.com/documentation/rest/incidents>
40module Network.PagerDuty.REST.Incidents
42module Network.PagerDuty.REST.Incidents
41 (
43 (
42
44
src/Network/PagerDuty/REST/Incidents/Notes.hs+2
@@ -12,6 +12,8 @@
12-- Portability : non-portable (GHC extensions)
12-- Portability : non-portable (GHC extensions)
13
13
14-- | The Incident Notes API allows you to add notes to a specified incident.
14-- | The Incident Notes API allows you to add notes to a specified incident.
15+--
16+-- /See:/ <http://developer.pagerduty.com/documentation/rest/incidents/notes>
15module Network.PagerDuty.REST.Incidents.Notes
17module Network.PagerDuty.REST.Incidents.Notes
16 (
18 (
17 ) where
19 ) where
src/Network/PagerDuty/REST/LogEntries.hs+2
@@ -20,6 +20,8 @@
20-- incidents. Log entry data includes details about the event(s) that triggered
20-- incidents. Log entry data includes details about the event(s) that triggered
21-- the incident, who was notified and when, how they were notified, and who
21-- the incident, who was notified and when, how they were notified, and who
22-- acknowledged or resolved it, amongst a few other things.
22-- acknowledged or resolved it, amongst a few other things.
23+--
24+-- /See:/ <http://developer.pagerduty.com/documentation/rest/log_entries>
23module Network.PagerDuty.REST.LogEntries
25module Network.PagerDuty.REST.LogEntries
24 (
26 (
25 -- * List Logs
27 -- * List Logs
src/Network/PagerDuty/REST/MaintenanceWindows.hs+2
@@ -15,6 +15,8 @@
15
15
16-- | Maintenance windows allow you to schedule service maintenance periods,
16-- | Maintenance windows allow you to schedule service maintenance periods,
17-- during which no incidents will be created.
17-- during which no incidents will be created.
18+--
19+-- /See:/ <http://developer.pagerduty.com/documentation/rest/maintenance_windows>
18module Network.PagerDuty.REST.MaintenanceWindows
20module Network.PagerDuty.REST.MaintenanceWindows
19 (
21 (
20 -- * List Windows
22 -- * List Windows
src/Network/PagerDuty/REST/Reports.hs+2
@@ -18,6 +18,8 @@
18
18
19-- | Access high level reports about alerts and incidents.
19-- | Access high level reports about alerts and incidents.
20-- Useful for creating graphs.
20-- Useful for creating graphs.
21+--
22+-- /See:/ <http://developer.pagerduty.com/documentation/rest/reports>
21module Network.PagerDuty.REST.Reports
23module Network.PagerDuty.REST.Reports
22 (
24 (
23 -- * Alerts Per Time
25 -- * Alerts Per Time
src/Network/PagerDuty/REST/Schedules.hs+2
@@ -20,6 +20,8 @@
20-- a user is on-call he is eligible to receive alerts from incidents.
20-- a user is on-call he is eligible to receive alerts from incidents.
21--
21--
22-- This API allows users to manipulate on-call schedules.
22-- This API allows users to manipulate on-call schedules.
23+--
24+-- /See:/ <http://developer.pagerduty.com/documentation/rest/schedules/overrides>
23module Network.PagerDuty.REST.Schedules
25module Network.PagerDuty.REST.Schedules
24 (
26 (
25 -- * List Schedules
27 -- * List Schedules
src/Network/PagerDuty/REST/Schedules/Overrides.hs+2
@@ -19,6 +19,8 @@
19-- | Schedule overrides are custom, non-recurring exceptions to your regular
19-- | Schedule overrides are custom, non-recurring exceptions to your regular
20-- on-call schedules. Use them when your team members go on vacation, swap shifts,
20-- on-call schedules. Use them when your team members go on vacation, swap shifts,
21-- or when you simply cannot achieve your normal scheduling with recurring layers.
21-- or when you simply cannot achieve your normal scheduling with recurring layers.
22+--
23+-- /See:/ <http://developer.pagerduty.com/documentation/rest/schedules>
22module Network.PagerDuty.REST.Schedules.Overrides
24module Network.PagerDuty.REST.Schedules.Overrides
23 (
25 (
24 -- * List Overrides
26 -- * List Overrides
src/Network/PagerDuty/REST/Services.hs−67
@@ -72,7 +72,6 @@ module Network.PagerDuty.REST.Services
72 -- * Types
72 -- * Types
73 , EmailFilterMode (..)
73 , EmailFilterMode (..)
74 , EmailIncidentCreation (..)
74 , EmailIncidentCreation (..)
75− , MatchMode (..)
76 , ServiceStatus (..)
75 , ServiceStatus (..)
77 , ServiceType (..)
76 , ServiceType (..)
78 , SeverityFilter (..)
77 , SeverityFilter (..)
@@ -83,15 +82,6 @@ module Network.PagerDuty.REST.Services
83 , cntResolved
82 , cntResolved
84 , cntTotal
83 , cntTotal
85
84
86− , EmailFilters (..)
87− , efsId
88− , efsSubjectMode
89− , efsSubjectRegex
90− , efsBodyMode
91− , efsBodyRegex
92− , efsFromEmailMode
93− , efsFromEmailRegex
94−
95 , PolicyInfo
85 , PolicyInfo
96 , pinfoId
86 , pinfoId
97 , pinfoName
87 , pinfoName
@@ -203,63 +193,6 @@ data PolicyInfo = PolicyInfo
203
193
204deriveRecord ''PolicyInfo
194deriveRecord ''PolicyInfo
205
195
206−data MatchMode
207− = Always
208− | Match
209− | NoMatch
210− deriving (Eq, Show)
211−
212−deriveNullaryWith hyphenated ''MatchMode
213−
214−-- FIXME: Tighten up this type! Make the regex required for match/no-match.
215−data EmailFilters = EmailFilters
216− { _efsId :: EmailFilterId
217− , _efsSubjectMode :: Maybe MatchMode
218− , _efsSubjectRegex :: Maybe Text
219− , _efsBodyMode :: Maybe MatchMode
220− , _efsBodyRegex :: Maybe Text
221− , _efsFromEmailMode :: Maybe MatchMode
222− , _efsFromEmailRegex :: Maybe Text
223− } deriving (Eq, Show)
224−
225−deriveJSON ''EmailFilters
226−
227−-- | The email filter ID.
228−makeLens "_efsId" ''EmailFilters
229−
230−-- | One of always, match, no-match, which, respectively, means to not filter
231−-- the email trigger by subject, filter it if the email subject matches the
232−-- given regex, or filter if it doesn't match the given regex.
233−--
234−-- /Default:/ always.
235−makeLens "_efsSubjectMode" ''EmailFilters
236−
237−-- | The regex to be used when subject_mode is match or no-match.
238−-- It is a required parameter on such cases.
239−makeLens "_efsSubjectRegex" ''EmailFilters
240−
241−-- | One of always, match, no-match, which, respectively, means to not filter
242−-- the email trigger by body, filter it if the body email matches the given regex,
243−-- or filter if it doesn't match the given regex.
244−--
245−-- /Default:/ always.
246−makeLens "_efsBodyMode" ''EmailFilters
247−
248−-- | The regex to be used when body_mode is match or no-match.
249−-- It is a required parameter on such cases.
250−makeLens "_efsBodyRegex" ''EmailFilters
251−
252−-- | One of always, match, no-match, which, respectively, means to not filter
253−-- the email trigger by its from address, filter it if the email from address
254−-- matches the given regex, or filter if it doesn't match the given regex.
255−--
256−-- /Default:/ always.
257−makeLens "_efsFromEmailMode" ''EmailFilters
258−
259−-- | The regex to be used when from_email_mode is match or no-match.
260−-- It is a required parameter on such cases.
261−makeLens "_efsFromEmailRegex" ''EmailFilters
262−
263data SeverityFilter
196data SeverityFilter
264 = SevCritical
197 = SevCritical
265 -- ^ Incidents are created when an alarm enters the Critical state.
198 -- ^ Incidents are created when an alarm enters the Critical state.
src/Network/PagerDuty/REST/Services/EmailFilters.hs+157−5
@@ -1,5 +1,8 @@
1+{-# LANGUAGE ExtendedDefaultRules #-}
1−{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE OverloadedStrings #-}
2−{-# LANGUAGE TemplateHaskell #-}
3+{-# LANGUAGE TemplateHaskell #-}
4+
5+{-# OPTIONS_GHC -fno-warn-type-defaults #-}
3
6
4-- Module : Network.PagerDuty.REST.Services.EmailFilters
7-- Module : Network.PagerDuty.REST.Services.EmailFilters
5-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
8-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
@@ -15,15 +18,164 @@
15-- subject and from address. It only applies to generic_email kind of
18-- subject and from address. It only applies to generic_email kind of
16-- Services. The way multiple filters are combined depends on the
19-- Services. The way multiple filters are combined depends on the
17-- email_filter_mode attribute of the service.
20-- email_filter_mode attribute of the service.
21+--
22+-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/email_filters>
18module Network.PagerDuty.REST.Services.EmailFilters
23module Network.PagerDuty.REST.Services.EmailFilters
19 (
24 (
25+ -- * Create Email Filter
26+ createEmailFilter
27+
28+ -- * Update Email Filter
29+ , updateEmailFilter
30+
31+ -- * Delete Email Filter
32+ , deleteEmailFilter
33+
34+ -- * Types
35+ , MatchMode (..)
36+ , HasEmailFilterInfo (..)
37+ , EmailFilterInfo
38+ , EmailFilter
39+ , efId
20 ) where
40 ) where
21
41
22−import Control.Lens
42+import Control.Applicative hiding (empty)
43+import Control.Lens hiding ((.=))
44+import Data.Aeson
45+import Data.ByteString.Builder (Builder)
46+import Data.Default
23import Data.Monoid
47import Data.Monoid
24−import Data.Text (Text)
48+import Data.Text (Text)
25−import Data.Time
26import Network.HTTP.Types
49import Network.HTTP.Types
27import Network.PagerDuty.TH
50import Network.PagerDuty.TH
28import Network.PagerDuty.Types
51import Network.PagerDuty.Types
29
52
53+default (Builder)
54+
55+filters :: ServiceId -> Path
56+filters s = "services" % s % "email_filters"
57+
58+data MatchMode
59+ = Always
60+ | Match
61+ | NoMatch
62+ deriving (Eq, Show)
63+
64+deriveNullaryWith hyphenated ''MatchMode
65+
66+-- FIXME: Tighten up this type! Make the regex required for match/no-match and
67+-- encode the conditional invariants.
68+data EmailFilterInfo = EmailFilterInfo
69+ { _efSubjectMode' :: Maybe MatchMode
70+ , _efSubjectRegex' :: Maybe Text
71+ , _efBodyMode' :: Maybe MatchMode
72+ , _efBodyRegex' :: Maybe Text
73+ , _efFromEmailMode' :: Maybe MatchMode
74+ , _efFromEmailRegex' :: Maybe Text
75+ } deriving (Eq, Show)
76+
77+deriveRecord ''EmailFilterInfo
78+
79+instance Default EmailFilterInfo where
80+ def = EmailFilterInfo Nothing Nothing Nothing Nothing Nothing Nothing
81+
82+instance QueryLike EmailFilterInfo where
83+ toQuery = const []
84+
85+class HasEmailFilterInfo a where
86+ emailFilterInfo :: Lens' a EmailFilterInfo
87+
88+ -- | One of always, match, no-match, which, respectively, means to not
89+ -- filter the email trigger by subject, filter it if the email subject
90+ -- matches the given regex, or filter if it doesn't match the given regex.
91+ --
92+ -- /Default:/ always.
93+ efSubjectMode :: Lens' a (Maybe MatchMode)
94+
95+ -- | The regex to be used when subject_mode is match or no-match.
96+ -- It is a required parameter on such cases.
97+ efSubjectRegex :: Lens' a (Maybe Text)
98+
99+ -- | One of always, match, no-match, which, respectively, means to not filter
100+ -- the email trigger by body, filter it if the body email matches the given
101+ -- regex, or filter if it doesn't match the given regex.
102+ --
103+ -- /Default:/ always.
104+ efBodyMode :: Lens' a (Maybe MatchMode)
105+
106+ -- | The regex to be used when body_mode is match or no-match.
107+ -- It is a required parameter on such cases.
108+ efBodyRegex :: Lens' a (Maybe Text)
109+
110+ -- | One of always, match, no-match, which, respectively, means to not filter
111+ -- the email trigger by its from address, filter it if the email from address
112+ -- matches the given regex, or filter if it doesn't match the given regex.
113+ --
114+ -- /Default:/ always.
115+ efFromEmailMode :: Lens' a (Maybe MatchMode)
116+
117+ -- | The regex to be used when from_email_mode is match or no-match.
118+ -- It is a required parameter on such cases.
119+ efFromEmailRegex :: Lens' a (Maybe Text)
120+
121+ efSubjectMode = emailFilterInfo.efSubjectMode'
122+ efSubjectRegex = emailFilterInfo.efSubjectRegex'
123+ efBodyMode = emailFilterInfo.efBodyMode'
124+ efBodyRegex = emailFilterInfo.efBodyRegex'
125+ efFromEmailMode = emailFilterInfo.efFromEmailMode'
126+ efFromEmailRegex = emailFilterInfo.efFromEmailRegex'
127+
128+instance (QueryLike a, ToJSON a, HasEmailFilterInfo a)
129+ => HasEmailFilterInfo (Request a s b) where
130+ emailFilterInfo = upd.emailFilterInfo
131+
132+instance HasEmailFilterInfo EmailFilterInfo where
133+ emailFilterInfo = id
134+
135+data EmailFilter = EmailFilter
136+ { _efId :: EmailFilterId
137+ , _efInfo :: EmailFilterInfo
138+ } deriving (Eq, Show)
139+
140+instance FromJSON EmailFilter where
141+ parseJSON = withObject "email_filter" $ \o ->
142+ EmailFilter <$> parseJSON (Object o)
143+ <*> o .: "id"
144+
145+instance ToJSON EmailFilter where
146+ toJSON e = Object (x <> y)
147+ where
148+ Object x = toJSON (_efInfo e)
149+ Object y = object ["id" .= _efId e]
150+
151+instance HasEmailFilterInfo EmailFilter where
152+ emailFilterInfo = lens _efInfo (\e x -> e { _efInfo = x })
153+
154+-- | The email filter ID.
155+makeLens "_efId" ''EmailFilter
156+
157+-- | Create a new Email Filter for the specified service.
158+--
159+-- @POST \/services\/\:service_id\/email_filters@
160+--
161+-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/email_filters/create>
162+createEmailFilter :: ServiceId -> Request EmailFilterInfo s EmailFilter
163+createEmailFilter s = mk def & meth .~ POST & path .~ filters s
164+
165+-- | Update an existing Email Filter.
166+--
167+-- @PUT \/services\/\:service_id\/email_filters\/\:id@
168+--
169+-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/email_filters/update>
170+updateEmailFilter :: ServiceId
171+ -> EmailFilterId
172+ -> Request EmailFilterInfo s Empty
173+updateEmailFilter s e = mk def & meth .~ PUT & path .~ filters s % e
174+
175+-- | Delete an existing Email Filter.
176+--
177+-- @DELETE \/services\/\:service_id\/email_filters\/\:id@
178+--
179+-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/email_filters/delete>
180+deleteEmailFilter :: ServiceId -> EmailFilterId -> Request Empty s Empty
181+deleteEmailFilter s e = empty & meth .~ DELETE & path .~ filters s % e
src/Network/PagerDuty/REST/Users.hs+36−5
@@ -14,6 +14,8 @@
14-- | Access and manipulate user data for your PagerDuty account. When a user is
14-- | Access and manipulate user data for your PagerDuty account. When a user is
15-- shown inlined in other resources, a deleted user will have its @html_url@ attribute
15-- shown inlined in other resources, a deleted user will have its @html_url@ attribute
16-- set to null.
16-- set to null.
17+--
18+-- /See:/ <http://developer.pagerduty.com/documentation/rest/users>
17module Network.PagerDuty.REST.Users
19module Network.PagerDuty.REST.Users
18 (
20 (
19
21
@@ -27,9 +29,11 @@ module Network.PagerDuty.REST.Users
27 , uInvitationSent
29 , uInvitationSent
28 ) where
30 ) where
29
31
30−import Control.Lens
32+import Control.Applicative hiding (empty)
33+import Control.Lens hiding ((.=))
34+import Data.Aeson
31import Data.Monoid
35import Data.Monoid
32−import Data.Text (Text)
36+import Data.Text (Text)
33import Data.Time
37import Data.Time
34import Network.HTTP.Types
38import Network.HTTP.Types
35import Network.PagerDuty.TH
39import Network.PagerDuty.TH
@@ -53,12 +57,16 @@ class HasUserInfo a where
53
57
54 -- | The id of the user.
58 -- | The id of the user.
55 uId :: Lens' a UserId
59 uId :: Lens' a UserId
60+
56 -- | The name of the user.
61 -- | The name of the user.
57 uName :: Lens' a Text
62 uName :: Lens' a Text
63+
58 -- | The user's email address.
64 -- | The user's email address.
59 uEmail :: Lens' a Address
65 uEmail :: Lens' a Address
66+
60 -- | The color used to represent the user in schedules.
67 -- | The color used to represent the user in schedules.
61 uColor :: Lens' a Text
68 uColor :: Lens' a Text
69+
62 -- | The user's personal time zone.
70 -- | The user's personal time zone.
63 uTimeZone :: Lens' a (Maybe TimeZone)
71 uTimeZone :: Lens' a (Maybe TimeZone)
64
72
@@ -68,21 +76,44 @@ class HasUserInfo a where
68 uColor = userInfo.uColor'
76 uColor = userInfo.uColor'
69 uTimeZone = userInfo.uTimeZone'.mapping _TZ
77 uTimeZone = userInfo.uTimeZone'.mapping _TZ
70
78
79+instance (QueryLike a, ToJSON a, HasUserInfo a)
80+ => HasUserInfo (Request a s b) where
81+ userInfo = upd.userInfo
82+
71instance HasUserInfo UserInfo where
83instance HasUserInfo UserInfo where
72 userInfo = id
84 userInfo = id
73
85
74data User = User
86data User = User
75− { _uInfo' :: UserInfo
87+ { _uInfo :: UserInfo
76 , _uRole :: Text
88 , _uRole :: Text
77 , _uAvatarUrl :: Text
89 , _uAvatarUrl :: Text
78 , _uUrl :: Text
90 , _uUrl :: Text
79 , _uInvitationSent' :: !Bool'
91 , _uInvitationSent' :: !Bool'
80 } deriving (Eq, Show)
92 } deriving (Eq, Show)
81
93
82−deriveRecord ''User
94+makeLenses ''User
95+
96+instance FromJSON User where
97+ parseJSON = withObject "user" $ \o ->
98+ User <$> parseJSON (Object o)
99+ <*> o .: "role"
100+ <*> o .: "avatar_url"
101+ <*> o .: "url"
102+ <*> o .: "invitation_sent"
103+
104+instance ToJSON User where
105+ toJSON u = Object (x <> y)
106+ where
107+ Object x = toJSON (_uInfo u)
108+ Object y = object
109+ [ "role" .= _uRole u
110+ , "avatar_url" .= _uAvatarUrl u
111+ , "url" .= _uUrl u
112+ , "invitation_sent" .= _uInvitationSent' u
113+ ]
83
114
84instance HasUserInfo User where
115instance HasUserInfo User where
85− userInfo = uInfo'
116+ userInfo = uInfo
86
117
87uInvitationSent :: Lens' User Bool
118uInvitationSent :: Lens' User Bool
88uInvitationSent = uInvitationSent'._B
119uInvitationSent = uInvitationSent'._B
src/Network/PagerDuty/REST/Users/ContactMethods.hs+2
@@ -16,6 +16,8 @@
16-- the user.
16-- the user.
17--
17--
18-- Access and manipulate the contact methods for a user.
18-- Access and manipulate the contact methods for a user.
19+--
20+-- /See:/ <http://developer.pagerduty.com/documentation/rest/users/contact_methods>
19module Network.PagerDuty.REST.Users.ContactMethods
21module Network.PagerDuty.REST.Users.ContactMethods
20 (
22 (
21 ) where
23 ) where
src/Network/PagerDuty/REST/Users/NotificationRules.hs+2
@@ -16,6 +16,8 @@
16-- long after the incident to do so.
16-- long after the incident to do so.
17--
17--
18-- Access and manipulate the notification rules for a user.
18-- Access and manipulate the notification rules for a user.
19+--
20+-- /See:/ <http://developer.pagerduty.com/documentation/rest/users/notification_rules>
19module Network.PagerDuty.REST.Users.NotificationRules
21module Network.PagerDuty.REST.Users.NotificationRules
20 (
22 (
21 ) where
23 ) where
src/Network/PagerDuty/REST/Users/OnCall.hs+2
@@ -16,6 +16,8 @@
16--
16--
17-- If the start and end of an on-call object are null, then the user is always
17-- If the start and end of an on-call object are null, then the user is always
18-- on-call for an escalation policy level.
18-- on-call for an escalation policy level.
19+--
20+-- /See:/ <http://developer.pagerduty.com/documentation/rest/users/on_call>
19module Network.PagerDuty.REST.Users.OnCall
21module Network.PagerDuty.REST.Users.OnCall
20 (
22 (
21 ) where
23 ) where
src/Network/PagerDuty/REST/Webhooks.hs+2
@@ -21,6 +21,8 @@
21-- certain interesting changes to an incident's state will cause other types of
21-- certain interesting changes to an incident's state will cause other types of
22-- incident webhook messages to be sent: Generally, any change to the @status@ or
22-- incident webhook messages to be sent: Generally, any change to the @status@ or
23-- @assigned_to_user@ of an incident will cause an outgoing message to be sent.
23-- @assigned_to_user@ of an incident will cause an outgoing message to be sent.
24+--
25+-- /See:/ <http://developer.pagerduty.com/documentation/rest/webhooks>
24module Network.PagerDuty.REST.Webhooks
26module Network.PagerDuty.REST.Webhooks
25 (
27 (
26
28