@@ -1,13 +1,12 @@
1−{-# LANGUAGE DataKinds #-}
1+{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE ExtendedDefaultRules #-}
2+{-# LANGUAGE ExtendedDefaultRules #-}
3−{-# LANGUAGE OverloadedStrings #-}
3+{-# LANGUAGE OverloadedStrings #-}
4−{-# LANGUAGE TemplateHaskell #-}
4+{-# LANGUAGE TemplateHaskell #-}
5−{-# LANGUAGE TypeFamilies #-}
7{-# OPTIONS_GHC -fno-warn-type-defaults #-}
6{-# OPTIONS_GHC -fno-warn-type-defaults #-}
9-- Module : Network.PagerDuty.REST.Services
8-- Module : Network.PagerDuty.REST.Services
10−-- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com>
9+-- Copyright : (c) 2013-2014 Brendan Hay <brendan.g.hay@gmail.com>
11-- License : This Source Code Form is subject to the terms of
10-- License : This Source Code Form is subject to the terms of
12-- the Mozilla Public License, v. 2.0.
11-- the Mozilla Public License, v. 2.0.
13-- A copy of the MPL can be found in the LICENSE file or
12-- A copy of the MPL can be found in the LICENSE file or
@@ -24,16 +23,14 @@
24-- When a service is shown inlined in other resources, a deleted service will
23-- When a service is shown inlined in other resources, a deleted service will
25-- have its @html_url@ attribute set to 'Nothing'.
24-- have its @html_url@ attribute set to 'Nothing'.
27−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services>
26+-- See: <http://developer.pagerduty.com/documentation/rest/services>
28module Network.PagerDuty.REST.Services
27module Network.PagerDuty.REST.Services
30 -- * List Services
29 -- * List Services
32− , listServices
30+ listServices
33 , lsTimeZone
31 , lsTimeZone
35 -- * Create Service
33 -- * Create Service
37 , createService
34 , createService
39 , csDescription
36 , csDescription
@@ -48,7 +45,6 @@ module Network.PagerDuty.REST.Services
48 , getService
45 , getService
50 -- * Update Service
47 -- * Update Service
52 , updateService
48 , updateService
54 , usEscalationPolicyId
50 , usEscalationPolicyId
@@ -72,6 +68,7 @@ module Network.PagerDuty.REST.Services
72 -- * Types
68 -- * Types
73 , EmailFilterMode (..)
69 , EmailFilterMode (..)
74 , EmailIncidentCreation (..)
70 , EmailIncidentCreation (..)
75 , ServiceStatus (..)
72 , ServiceStatus (..)
76 , ServiceType (..)
73 , ServiceType (..)
77 , SeverityFilter (..)
74 , SeverityFilter (..)
@@ -82,6 +79,15 @@ module Network.PagerDuty.REST.Services
82 , cntResolved
79 , cntResolved
83 , cntTotal
80 , cntTotal
85 , PolicyInfo
91 , PolicyInfo
87 , pinfoName
93 , pinfoName
@@ -106,16 +112,16 @@ module Network.PagerDuty.REST.Services
106 , svcSeverityFilter
112 , svcSeverityFilter
109−import Control.Lens hiding (Empty)
115+import Control.Lens
110−import Data.Aeson.Lens
116+import Data.Aeson.Lens
117+import Data.ByteString.Builder (Builder)
111−import Data.Text (Text)
118+import Data.Text (Text)
112−import Data.Time
119+import Data.Time
113−import Network.HTTP.Types
120+import Network.HTTP.Types
114−import Network.PagerDuty.Internal.TH
121+import Network.PagerDuty.TH
115−import Network.PagerDuty.Internal.Types
122+import Network.PagerDuty.Types
116−import Network.PagerDuty.REST.Services.EmailFilters
118−default (Path)
124+default (Builder)
120services :: Path
126services :: Path
121services = "services"
127services = "services"
@@ -133,7 +139,8 @@ data IncidentCounts = IncidentCounts
133 , _cntTotal :: !Int
139 , _cntTotal :: !Int
134 } deriving (Eq, Show)
140 } deriving (Eq, Show)
142+deriveJSON ''IncidentCounts
136−deriveRecord ''IncidentCounts
143+makeLenses ''IncidentCounts
138data EmailIncidentCreation
145data EmailIncidentCreation
139 = OnNewEmail
146 = OnNewEmail
@@ -144,7 +151,7 @@ data EmailIncidentCreation
144 -- ^ Open a new incident only if an open incident does not already exist.
151 -- ^ Open a new incident only if an open incident does not already exist.
145 deriving (Eq, Show)
152 deriving (Eq, Show)
147−deriveNullary ''EmailIncidentCreation
154+deriveJSON ''EmailIncidentCreation
149data EmailFilterMode
156data EmailFilterMode
150 = AllEmail
157 = AllEmail
@@ -155,7 +162,7 @@ data EmailFilterMode
155 -- ^ Accept email only if it matches ALL of the rules below
162 -- ^ Accept email only if it matches ALL of the rules below
156 deriving (Eq, Show)
163 deriving (Eq, Show)
158−deriveNullaryWith hyphenated ''EmailFilterMode
165+deriveJSONWith hyphenated ''EmailFilterMode
160data ServiceStatus
167data ServiceStatus
@@ -171,7 +178,7 @@ data ServiceStatus
171 -- ^ The service is disabled and will not have any new triggered incidents.
178 -- ^ The service is disabled and will not have any new triggered incidents.
172 deriving (Eq, Show)
179 deriving (Eq, Show)
174−deriveNullary ''ServiceStatus
181+deriveJSON ''ServiceStatus
176data ServiceType
183data ServiceType
177 = CloudKick
184 = CloudKick
@@ -184,14 +191,72 @@ data ServiceType
184 | SqlMonitor
191 | SqlMonitor
185 deriving (Eq, Show)
192 deriving (Eq, Show)
187−deriveNullary ''ServiceType
194+deriveJSON ''ServiceType
189data PolicyInfo = PolicyInfo
196data PolicyInfo = PolicyInfo
190− { _pinfoId :: EscalationPolicyId
197+ { _pinfoId :: PolicyId
191 , _pinfoName :: Text
198 , _pinfoName :: Text
192 } deriving (Eq, Show)
199 } deriving (Eq, Show)
194−deriveRecord ''PolicyInfo
201+makeLenses ''PolicyInfo
202+deriveJSON ''PolicyInfo
210+deriveJSONWith hyphenated ''MatchMode
212+-- FIXME: Tighten up this type! Make the regex required for match/no-match.
213+data EmailFilters = EmailFilters
214+ { _efsId :: EmailFilterId
215+ , _efsSubjectMode :: Maybe MatchMode
216+ , _efsSubjectRegex :: Maybe Text
217+ , _efsBodyMode :: Maybe MatchMode
218+ , _efsBodyRegex :: Maybe Text
219+ , _efsFromEmailMode :: Maybe MatchMode
220+ , _efsFromEmailRegex :: Maybe Text
221+ } deriving (Eq, Show)
223+deriveJSON ''EmailFilters
225+-- | The email filter ID.
226+makeLens "_efsId" ''EmailFilters
228+-- | One of always, match, no-match, which, respectively, means to not filter
229+-- the email trigger by subject, filter it if the email subject matches the
230+-- given regex, or filter if it doesn't match the given regex.
232+-- Defaults to always.
233+makeLens "_efsSubjectMode" ''EmailFilters
235+-- | The regex to be used when subject_mode is match or no-match.
236+-- It is a required parameter on such cases.
237+makeLens "_efsSubjectRegex" ''EmailFilters
239+-- | One of always, match, no-match, which, respectively, means to not filter
240+-- the email trigger by body, filter it if the body email matches the given regex,
241+-- or filter if it doesn't match the given regex.
243+-- Defaults to always.
244+makeLens "_efsBodyMode" ''EmailFilters
246+-- | The regex to be used when body_mode is match or no-match.
247+-- It is a required parameter on such cases.
248+makeLens "_efsBodyRegex" ''EmailFilters
250+-- | One of always, match, no-match, which, respectively, means to not filter
251+-- the email trigger by its from address, filter it if the email from address
252+-- matches the given regex, or filter if it doesn't match the given regex.
254+-- Defaults to always.
255+makeLens "_efsFromEmailMode" ''EmailFilters
257+-- | The regex to be used when from_email_mode is match or no-match.
258+-- It is a required parameter on such cases.
259+makeLens "_efsFromEmailRegex" ''EmailFilters
196data SeverityFilter
261data SeverityFilter
197 = SevCritical
262 = SevCritical
@@ -206,7 +271,7 @@ data SeverityFilter
206 -- ^ SQL Monitor: Incidents are created for with high or medium severity
271 -- ^ SQL Monitor: Incidents are created for with high or medium severity
207 deriving (Eq, Show)
272 deriving (Eq, Show)
209−deriveNullaryWith (dropped 3 underscored) ''SeverityFilter
274+deriveJSONWith (dropped 3 underscored) ''SeverityFilter
211data Service = Service
276data Service = Service
212 { _svcId :: ServiceId
277 { _svcId :: ServiceId
@@ -223,8 +288,8 @@ data Service = Service
223 , _svcIncidentCounts :: IncidentCounts
288 , _svcIncidentCounts :: IncidentCounts
224 , _svcEmailFilterMode :: EmailFilterMode
289 , _svcEmailFilterMode :: EmailFilterMode
225 , _svcType :: ServiceType
290 , _svcType :: ServiceType
226− , _svcEscalationPolicy :: Maybe PolicyInfo -- FIXME: extract from inline.
291+ , _svcEscalationPolicy :: Maybe PolicyInfo -- FIXME: extract from inline.
227− , _svcEmailFilters :: Maybe [EmailFilterInfo] -- FIXME: extract from inline.
292+ , _svcEmailFilters :: Maybe EmailFilters -- FIXME: extract from inline.
228 , _svcSeverityFilter :: Maybe SeverityFilter
293 , _svcSeverityFilter :: Maybe SeverityFilter
229 } deriving (Eq, Show)
294 } deriving (Eq, Show)
@@ -256,17 +321,13 @@ makeLens "_svcAutoResolveTimeout" ''Service
256makeLens "_svcAcknowledgementTimeout" ''Service
321makeLens "_svcAcknowledgementTimeout" ''Service
258-- | The date/time when this service was created.
323-- | The date/time when this service was created.
259−svcCreatedAt :: Lens' Service UTCTime
324+makeLens "_svcCreatedAt" ''Service
260−svcCreatedAt = lens _svcCreatedAt (\s x -> s { _svcCreatedAt = x }) . _D
262-- | The current state of the Service.
326-- | The current state of the Service.
263makeLens "_svcStatus" ''Service
327makeLens "_svcStatus" ''Service
265-- | The date/time when the most recent incident was created for this service.
329-- | The date/time when the most recent incident was created for this service.
266−svcLastIncidentTimestamp :: Lens' Service (Maybe UTCTime)
330+makeLens "_svcLastIncidentTimestamp" ''Service
267−svcLastIncidentTimestamp =
268− lens _svcLastIncidentTimestamp
269− (\s x -> s { _svcLastIncidentTimestamp = x }) . mapping _D
271-- | If the service is a Generic Email service, this describes what kind of
332-- | If the service is a Generic Email service, this describes what kind of
272-- emails create an incident.
333-- emails create an incident.
@@ -299,19 +360,14 @@ newtype ListServices = ListServices
300instance Paginate ListServices
361instance Paginate ListServices
302−queryRequest ''ListServices
363+deriveJSON ''ListServices
303−
364+makeLenses ''ListServices
304−-- | Time zone in which dates in the result will be rendered.
306−-- /Default:/ account default time zone.
307−lsTimeZone :: Lens' (Request ListServices s r) (Maybe TimeZone)
308−lsTimeZone = upd.lsTimeZone'.mapping _TZ
310-- | List existing services.
366-- | List existing services.
312-- @GET \/services@
368-- @GET \/services@
314−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/list>
370+-- See: <http://developer.pagerduty.com/documentation/rest/services/list>
315listServices :: Request ListServices s [Service]
371listServices :: Request ListServices s [Service]
316listServices =
372listServices =
317 mk ListServices
373 mk ListServices
@@ -320,9 +376,15 @@ listServices =
320 & query .~ includes
376 & query .~ includes
321 & unwrap .~ key "escalation_policies"
377 & unwrap .~ key "escalation_policies"
379+-- | Time zone in which dates in the result will be rendered.
381+-- Defaults to account default time zone.
382+lsTimeZone :: Lens' (Request ListServices s r) (Maybe TimeZone)
383+lsTimeZone = upd.lsTimeZone'._TZ
323data CreateService = CreateService
385data CreateService = CreateService
324 { _csName' :: Text
386 { _csName' :: Text
325− , _csEscalationPolicyId' :: EscalationPolicyId
387+ , _csEscalationPolicyId' :: PolicyId
326 , _csType' :: !ServiceType
388 , _csType' :: !ServiceType
327 , _csVendorId' :: Maybe VendorId
389 , _csVendorId' :: Maybe VendorId
328 , _csDescription' :: Maybe Text
390 , _csDescription' :: Maybe Text
@@ -331,7 +393,30 @@ data CreateService = CreateService
331 , _csSeverityFilter' :: Maybe SeverityFilter
393 , _csSeverityFilter' :: Maybe SeverityFilter
332 } deriving (Eq, Show)
394 } deriving (Eq, Show)
334−jsonRequest ''CreateService
396+deriveJSON ''CreateService
397+makeLenses ''CreateService
399+-- | Creates a new service.
403+-- See: <http://developer.pagerduty.com/documentation/rest/services/create>
404+createService :: Text
407+ -> Request CreateService s Service
408+createService n p t =
411+ , _csEscalationPolicyId' = p
413+ , _csVendorId' = Nothing
414+ , _csDescription' = Nothing
415+ , _csAcknowledgementTimeout' = Nothing
416+ , _csAutoResolveTimeout' = Nothing
417+ , _csSeverityFilter' = Nothing
418+ } & path .~ services
419+ & unwrap .~ key "service"
336-- | The name of the service.
421-- | The name of the service.
337csName :: Lens' (Request CreateService s r) Text
422csName :: Lens' (Request CreateService s r) Text
@@ -351,19 +436,19 @@ csVendorId :: Lens' (Request CreateService s r) (Maybe VendorId)
351csVendorId = upd.csVendorId'
436csVendorId = upd.csVendorId'
353-- | The id of the escalation policy to be used by this service.
438-- | The id of the escalation policy to be used by this service.
354−csEscalationPolicyId :: Lens' (Request CreateService s r) EscalationPolicyId
439+csEscalationPolicyId :: Lens' (Request CreateService s r) PolicyId
355csEscalationPolicyId = upd.csEscalationPolicyId'
440csEscalationPolicyId = upd.csEscalationPolicyId'
357-- | The duration in seconds before an incidents acknowledged in this service
442-- | The duration in seconds before an incidents acknowledged in this service
358-- become triggered again.
443-- become triggered again.
360−-- /Default:/ 30 minutes.
445+-- Defaults to 30 minutes.
361csAcknowledgementTimeout :: Lens' (Request CreateService s r) (Maybe Int)
446csAcknowledgementTimeout :: Lens' (Request CreateService s r) (Maybe Int)
362csAcknowledgementTimeout = upd.csAcknowledgementTimeout'
447csAcknowledgementTimeout = upd.csAcknowledgementTimeout'
364-- | The duration in seconds before a triggered incident auto-resolves itself.
449-- | The duration in seconds before a triggered incident auto-resolves itself.
366−-- /Default:/ 4 hours.
451+-- Defaults to 4 hours.
367csAutoResolveTimeout :: Lens' (Request CreateService s r) (Maybe Int)
452csAutoResolveTimeout :: Lens' (Request CreateService s r) (Maybe Int)
368csAutoResolveTimeout = upd.csAutoResolveTimeout'
453csAutoResolveTimeout = upd.csAutoResolveTimeout'
@@ -371,33 +456,11 @@ csAutoResolveTimeout = upd.csAutoResolveTimeout'
371csSeverityFilter :: Lens' (Request CreateService s r) (Maybe SeverityFilter)
456csSeverityFilter :: Lens' (Request CreateService s r) (Maybe SeverityFilter)
372csSeverityFilter = upd.csSeverityFilter'
457csSeverityFilter = upd.csSeverityFilter'
374−-- | Creates a new service.
378−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/create>
379−createService :: Text
380− -> EscalationPolicyId
382− -> Request CreateService s Service
383−createService n p t =
386− , _csEscalationPolicyId' = p
388− , _csVendorId' = Nothing
389− , _csDescription' = Nothing
390− , _csAcknowledgementTimeout' = Nothing
391− , _csAutoResolveTimeout' = Nothing
392− , _csSeverityFilter' = Nothing
393− } & path .~ services
394− & unwrap .~ key "service"
396-- | Get details about an existing service.
459-- | Get details about an existing service.
398-- @GET services\/\:id@
461-- @GET services\/\:id@
400−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/show>
463+-- See: <http://developer.pagerduty.com/documentation/rest/services/show>
401getService :: ServiceId -> Request Empty s Service
464getService :: ServiceId -> Request Empty s Service
402getService i = empty
465getService i = empty
403 & path .~ services % i
466 & path .~ services % i
@@ -407,13 +470,32 @@ getService i = empty
407data UpdateService = UpdateService
470data UpdateService = UpdateService
408 { _usName' :: Maybe Text
471 { _usName' :: Maybe Text
409 , _usDescription' :: Maybe Text
472 , _usDescription' :: Maybe Text
410− , _usEscalationPolicyId' :: Maybe EscalationPolicyId
473+ , _usEscalationPolicyId' :: Maybe PolicyId
411 , _usAcknowledgementTimeout' :: Maybe Int
474 , _usAcknowledgementTimeout' :: Maybe Int
412 , _usAutoResolveTimeout' :: Maybe Int
475 , _usAutoResolveTimeout' :: Maybe Int
413 , _usSeverityFilter' :: Maybe SeverityFilter
476 , _usSeverityFilter' :: Maybe SeverityFilter
414 } deriving (Eq, Show)
477 } deriving (Eq, Show)
479+deriveJSON ''UpdateService
416−jsonRequest ''UpdateService
480+makeLenses ''UpdateService
482+-- | Update an existing service.
484+-- @PUT services\/\:id@
486+-- See: <http://developer.pagerduty.com/documentation/rest/services/update>
487+updateService :: ServiceId -> Request UpdateService s Service
490+ { _usName' = Nothing
491+ , _usEscalationPolicyId' = Nothing
492+ , _usDescription' = Nothing
493+ , _usAcknowledgementTimeout' = Nothing
494+ , _usAutoResolveTimeout' = Nothing
495+ , _usSeverityFilter' = Nothing
497+ & path .~ services % i
498+ & unwrap .~ key "service"
418-- | The name of the service.
500-- | The name of the service.
419usName :: Lens' (Request UpdateService s r) (Maybe Text)
501usName :: Lens' (Request UpdateService s r) (Maybe Text)
@@ -424,19 +506,19 @@ usDescription :: Lens' (Request UpdateService s r) (Maybe Text)
424usDescription = upd.usDescription'
506usDescription = upd.usDescription'
426-- | The id of the escalation policy to be used by this service.
508-- | The id of the escalation policy to be used by this service.
427−usEscalationPolicyId :: Lens' (Request UpdateService s r) (Maybe EscalationPolicyId)
509+usEscalationPolicyId :: Lens' (Request UpdateService s r) (Maybe PolicyId)
428usEscalationPolicyId = upd.usEscalationPolicyId'
510usEscalationPolicyId = upd.usEscalationPolicyId'
430-- | The duration in seconds before an incidents acknowledged in this service
512-- | The duration in seconds before an incidents acknowledged in this service
431-- become triggered again.
513-- become triggered again.
433−-- /Default:/ 30 minutes.
515+-- Defaults to 30 minutes.
434usAcknowledgementTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
516usAcknowledgementTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
435usAcknowledgementTimeout = upd.usAcknowledgementTimeout'
517usAcknowledgementTimeout = upd.usAcknowledgementTimeout'
437-- | The duration in seconds before a triggered incident auto-resolves itself.
519-- | The duration in seconds before a triggered incident auto-resolves itself.
439−-- /Default:/ 4 hours.
521+-- Defaults to 4 hours.
440usAutoResolveTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
522usAutoResolveTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
441usAutoResolveTimeout = upd.usAutoResolveTimeout'
523usAutoResolveTimeout = upd.usAutoResolveTimeout'
@@ -444,31 +526,13 @@ usAutoResolveTimeout = upd.usAutoResolveTimeout'
444usSeverityFilter :: Lens' (Request UpdateService s r) (Maybe SeverityFilter)
526usSeverityFilter :: Lens' (Request UpdateService s r) (Maybe SeverityFilter)
445usSeverityFilter = upd.usSeverityFilter'
527usSeverityFilter = upd.usSeverityFilter'
447−-- | Update an existing service.
449−-- @PUT services\/\:id@
451−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/update>
452−updateService :: ServiceId -> Request UpdateService s Service
455− { _usName' = Nothing
456− , _usEscalationPolicyId' = Nothing
457− , _usDescription' = Nothing
458− , _usAcknowledgementTimeout' = Nothing
459− , _usAutoResolveTimeout' = Nothing
460− , _usSeverityFilter' = Nothing
462− & path .~ services % i
463− & unwrap .~ key "service"
465-- | Delete an existing service. Once the service is deleted, it will not be
529-- | Delete an existing service. Once the service is deleted, it will not be
466-- accessible from the web UI and new incidents won't be able to be created
530-- accessible from the web UI and new incidents won't be able to be created
467-- for this service.
531-- for this service.
469-- @DELETE \/services/:id@
533-- @DELETE \/services/:id@
471−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/delete>
535+-- See: <http://developer.pagerduty.com/documentation/rest/services/delete>
472deleteService :: ServiceId -> Request Empty s Empty
536deleteService :: ServiceId -> Request Empty s Empty
473deleteService i = empty & meth .~ DELETE & path .~ services % i
537deleteService i = empty & meth .~ DELETE & path .~ services % i
@@ -476,14 +540,13 @@ deleteService i = empty & meth .~ DELETE & path .~ services % i
477-- @PUT services\/\:id\/enable@
541-- @PUT services\/\:id\/enable@
479−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/enable>
543+-- See: <http://developer.pagerduty.com/documentation/rest/services/enable>
480enableService :: RequesterId -> ServiceId -> Request Empty s Empty
544enableService :: RequesterId -> ServiceId -> Request Empty s Empty
482− auth (enableServiceBasic i) & query .~ [("requester_id", r)]
545+enableService r i = auth (enableServiceBasic i) & query .~ [("requester_id", r)]
484-- | A version of 'enableService' which uses HTTP Basic authentication and
547-- | A version of 'enableService' which uses HTTP Basic authentication and
485-- doesn't require a 'RequesterId'.
548-- doesn't require a 'RequesterId'.
486−enableServiceBasic :: ServiceId -> Request Empty 'Basic Empty
549+enableServiceBasic :: ServiceId -> Request Empty Basic Empty
487enableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "enable"
550enableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "enable"
489-- | Disable a service. Once a service is disabled, it will not be able to
552-- | Disable a service. Once a service is disabled, it will not be able to
@@ -491,14 +554,13 @@ enableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "enable"
492-- @PUT services\/\:id\/disable@
555-- @PUT services\/\:id\/disable@
494−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/disable>
557+-- See: <http://developer.pagerduty.com/documentation/rest/services/disable>
495disableService :: RequesterId -> ServiceId -> Request Empty s Empty
558disableService :: RequesterId -> ServiceId -> Request Empty s Empty
497− auth (disableServiceBasic i) & query .~ [("requester_id", r)]
559+disableService r i = auth (disableServiceBasic i) & query .~ [("requester_id", r)]
499-- | A version of 'disableService' which uses HTTP Basic authentication and
561-- | A version of 'disableService' which uses HTTP Basic authentication and
500-- doesn't require a 'RequesterId'.
562-- doesn't require a 'RequesterId'.
501−disableServiceBasic :: ServiceId -> Request Empty 'Basic Empty
563+disableServiceBasic :: ServiceId -> Request Empty Basic Empty
502disableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "disable"
564disableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "disable"
504-- | Regenerate a new service key for an existing service.
566-- | Regenerate a new service key for an existing service.
@@ -508,6 +570,6 @@ disableServiceBasic i = empty & meth .~ PUT & path .~ services % i % "disable"
509-- @POST services\/\:id\/regenerate_key@
571-- @POST services\/\:id\/regenerate_key@
511−-- /See:/ <http://developer.pagerduty.com/documentation/rest/services/regenerate_key>
573+-- See: <http://developer.pagerduty.com/documentation/rest/services/regenerate_key>
512regenerateKey :: ServiceId -> Request Empty s Service
574regenerateKey :: ServiceId -> Request Empty s Service
513regenerateKey i = empty & meth .~ POST & path .~ services % i % "regenerate_key"
575regenerateKey i = empty & meth .~ POST & path .~ services % i % "regenerate_key"