-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Client library for PagerDuty Integration and REST APIs.
--   
--   PagerDuty is an alerting system for IT professionals. PagerDuty
--   connects with a variety of systems (including monitoring tools and
--   ticketing systems) and dispatches alerts via automated phone call, SMS
--   and email. This library implements the full PagerDuty Integration and
--   REST APIs which are documented here:
--   
--   <ul>
--   <li>Integration API -
--   <a>http://developer.pagerduty.com/documentation/integration</a></li>
--   <li>REST API -
--   <a>http://developer.pagerduty.com/documentation/rest</a></li>
--   </ul>
--   
--   <i>Warning:</i> This is an experimental preview release which is still
--   under heavy development and not intended for public consumption,
--   caveat emptor!
--   
--   <i>Note:</i> An alternative source for Haddock documentation can be
--   found <a>here</a>.
@package pagerduty
@version 0.0.8


-- | PagerDuty receives updates (called events) from monitoring systems
--   through services (like Nagios, email or generic API calls). Upon
--   receiving an event, active services will create a new incident and
--   begin escalating it as defined by the service's escalation policy.
--   Events can be de-duplicated into existing incidents based on service
--   de-duplication rules to prevent you from being overwhelmed by event
--   storms.
--   
--   An incident can be open, acknowledged or resolved. Whenever an
--   incident is created, it is assigned to a user (according to the
--   escalation process, as described by escalation rules and schedules).
--   The assigned user has a chance to either acknowledge that he is
--   working on it, or to resolve it.
--   
--   Resolving an incident closes it, whereas acknowledging it halts the
--   escalation process. If the incident is not resolved by the service's
--   incident ack timeout it continues up the escalation chain.
--   
--   When an incident is triggered or when it is escalated it creates
--   alerts (also known as notifications). Alerts are messages containing
--   the details of the incident, and can be sent through SMS, email and
--   phone calls.
--   
--   Incidents and Incident Counts from the last 30 days are returned by
--   default. To change this default date range, see the documentation for
--   the since, until or dateRange parameters.
--   
--   Note: that to create an incident you need to trigger it through the
--   <a>Network.PagerDuty.Integration</a> API.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents</a>
module Network.PagerDuty.REST.Incidents
data ListIncidents

-- | The PagerDuty incidents query API can be used to query current and
--   historical PagerDuty incidents over a date range, letting you build
--   custom dashboards or incident reports. The API allows for searching
--   for incidents with multiple filters or query parameters, various
--   sorts, and also supports the pagination of results.
--   
--   <pre>
--   GET /incidents
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/list</a>
listIncidents :: Request ListIncidents s [Incident]

-- | The start of the date range over which you want to search.
lsSince :: Lens' (Request ListIncidents s b) (Maybe UTCTime)

-- | The end of the date range over which you want to search.
--   
--   /Note: If you leave off either since or until, a 30 day default range
--   is applied to your open ended range. Not including the since parameter
--   will set the date range to until - 30 days. Likewise, if you leave off
--   until, it is set to since + 30 days.
--   
--   Defaults to the last 30 days if you leave off both. The size of the
--   date range must be less than 180 days.
lsUntil :: Lens' (Request ListIncidents s b) (Maybe UTCTime)

-- | When set, the since and until parameters and defaults are ignored. Use
--   this to get all incidents since the account was created.
lsDateRange :: Lens' (Request ListIncidents s b) Bool

-- | Returns only the incidents currently in the passed status(es).
lsStatus :: Lens' (Request ListIncidents s b) (Maybe [IncidentStatus])

-- | Returns only the incidents with the passed de-duplication key.
--   
--   <i>See:</i> <a>Network.PagerDuty.Integration</a>
lsIncidentKey :: Lens' (Request ListIncidents s b) (Maybe IncidentKey)

-- | Returns only the incidents associated with the passed service(s). This
--   expects one or more service IDs.
lsService :: Lens' (Request ListIncidents s b) (Maybe [ServiceId])

-- | Returns only the incidents currently assigned to the passed user(s).
--   This expects one or more user IDs.
--   
--   <i>Note:</i> When using the assignedToUser filter, you will only
--   receive incidents with statuses of triggered or acknowledged. This is
--   because resolved incidents are not assigned to any user.
lsAssignedToUser :: Lens' (Request ListIncidents s b) (Maybe [UserId])

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> <tt>UTC</tt>.
lsTimeZone :: Lens' (Request ListIncidents s b) TimeZone

-- | Used to specify both the field you wish to sort the results on, as
--   well as the direction (ascending/descending) of the results.
lsSortBy :: Lens' (Request ListIncidents s b) (Maybe (Sort Field))
data CountIncidents

-- | Use this query if you are simply looking for the count of incidents
--   that match a given query. This should be used if you don't need access
--   to the actual incident details.
--   
--   <pre>
--   GET /incidents/count
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/count</a>
countIncidents :: Request CountIncidents s Count

-- | The start of the date range over which you want to search.
cSince :: Lens' (Request CountIncidents s b) (Maybe UTCTime)

-- | The end of the date range over which you want to search.
--   
--   <i>Note:</i> If you leave off either since or until, a 30 day default
--   range is applied to your open ended range. Not including the since
--   parameter will set the date range to until <tt>-30</tt> days.
--   Likewise, if you leave off until, it is set to since <tt>+30</tt>
--   days.
--   
--   <i>Default:</i> The last 30 days if you leave off both. The size of
--   the date range must be less than 180 days.
cUntil :: Lens' (Request CountIncidents s b) (Maybe UTCTime)

-- | When set, the since and until parameters and defaults are ignored. Use
--   this to get all counts since the account was created.
cDateRange :: Lens' (Request CountIncidents s b) Bool

-- | Only counts the incidents currently in the passed status(es).
cStatus :: Lens' (Request CountIncidents s b) (Maybe [IncidentStatus])

-- | Returns only the incidents with the passed de-duplication key.
--   
--   <i>See:</i> <a>Network.PagerDuty.Integration</a>
cIncidentKey :: Lens' (Request CountIncidents s b) (Maybe IncidentKey)

-- | Only counts the incidents associated with the passed service(s). This
--   is expecting one or more service IDs.
cService :: Lens' (Request CountIncidents s b) (Maybe [ServiceId])

-- | Only counts the incidents currently assigned to the passed user(s).
--   This is expecting one or more user IDs.
--   
--   <i>Note:</i> When using the assigned_to_user filter, you will only
--   count incidents with statuses of triggered or acknowledged. This is
--   because resolved incidents are not assigned to any user.
cAssignedToUser :: Lens' (Request CountIncidents s b) (Maybe [UserId])

-- | Get detailed information about an incident. Accepts either an incident
--   id, or an incident number.
--   
--   <pre>
--   GET /incidents/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/show</a>
getIncident :: IncidentId -> Request Empty s Incident
data UpdateIncidents

-- | Acknowledge, resolve, escalate or reassign one or more incidents.
--   
--   <pre>
--   PUT /incidents
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/update</a>
updateIncidents :: RequesterId -> Request UpdateIncidents s [UpdatedIncidents]

-- | A version of <a>updateIncidents</a> which uses HTTP Basic
--   authentication and doesn't require a <a>RequesterId</a>.
updateIncidentsBasic :: Request UpdateIncidents  'Basic [UpdatedIncidents]
uiIncidents :: Lens' (Request UpdateIncidents s b) [UpdateIncident]

-- | Resolve an incident.
--   
--   <pre>
--   PUT /incidents/:id/resolve
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/resolve</a>
resolveIncident :: IncidentId -> RequesterId -> Request Empty s Empty

-- | A version of <a>resolveIncident</a> which uses HTTP Basic
--   authentication and doesn't require a <a>RequesterId</a>.
resolveIncidentBasic :: IncidentId -> Request Empty s Empty

-- | Acknowledge an incident.
--   
--   <pre>
--   PUT /incidents/:id/acknowledge
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/acknowledge</a>
acknowledgeIncident :: IncidentId -> RequesterId -> Request Empty s Empty

-- | A version of <a>acknowledgeIncident</a> which uses HTTP Basic
--   authentication and doesn't require a <a>RequesterId</a>.
acknowledgeIncidentBasic :: IncidentId -> Request Empty s Empty
data ReassignIncident

-- | Reassign an incident.
--   
--   <pre>
--   PUT /incidents/:id/reassign
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/reassign</a>
reassignIncident :: IncidentId -> RequesterId -> Request ReassignIncident s Empty

-- | The ID of an escalation policy. Delegate the incident to this
--   escalation policy.
riEscalationPolicy :: Lens' (Request ReassignIncident s b) (Maybe EscalationPolicyId)

-- | Escalate incident to this level in the escalation policy.
riEscalationLevel :: Lens' (Request ReassignIncident s b) (Maybe Int)

-- | Comma separated list of user IDs to assign this incident to.
riAssignedToUser :: Lens' (Request ReassignIncident s b) (Maybe [UserId])
data Sort a
Desc :: a -> Sort a
Asc :: a -> Sort a
_Desc :: forall a_aMJ1. Prism' (Sort a_aMJ1) a_aMJ1
_Asc :: forall a_aMJ1. Prism' (Sort a_aMJ1) a_aMJ1
data Field

-- | The number of your incident.
IncidentNumber :: Field

-- | The date/time the incident was triggered.
CreatedOn :: Field

-- | The date/time the incident was resolved.
ResolvedOn :: Field
data IncidentStatus
ITriggered :: IncidentStatus
IAcknowledged :: IncidentStatus
IResolved :: IncidentStatus
IOther :: Text -> IncidentStatus
data UpdateStatus
UAcknowledged :: UpdateStatus
UResolved :: UpdateStatus
data UpdateIncident

-- | The id of the incident to update.
iiId :: Lens' UpdateIncident IncidentId

-- | The new status of the incident.
iiStatus :: Lens' UpdateIncident (Maybe UpdateStatus)

-- | Escalate incident to this level in the escalation policy.
iiEscalationLevel :: Lens' UpdateIncident (Maybe Int)

-- | Delegate this incident to the specified escalation policy id. This
--   restarts the incident's escalation following the new policy.
iiEscalationPolicy :: Lens' UpdateIncident (Maybe EscalationPolicyId)

-- | List of user IDs to assign this incident to.
iiAssignedToUser :: Lens' UpdateIncident (Maybe (CSV UserId))
data UpdatedIncidents
uiId :: Lens' UpdatedIncidents IncidentId
uiStatus :: Lens' UpdatedIncidents IncidentStatus
uiIncidentNumber :: Lens' UpdatedIncidents Int
uiUrl :: Lens' UpdatedIncidents Text
uiError :: Lens' UpdatedIncidents (Maybe Object)
data Assignee
aAt :: Lens' Assignee Date
aObject :: Lens' Assignee Object
class HasIncident a
incident :: HasIncident a => Lens' a Incident

-- | The number of the incident. This is unique across your account.
iIncidentNumber :: HasIncident a => Lens' a Int

-- | The current status of the incident. Valid statuses are:
iStatus :: HasIncident a => Lens' a IncidentStatus

-- | The date/time the incident was triggered.
iCreatedOn :: HasIncident a => Lens' a UTCTime

-- | The PagerDuty website URL where the incident can be viewed and further
--   actions taken. This is not the resource URL.
iHtmlUrl :: HasIncident a => Lens' a Text

-- | The incident's de-duplication key. See the PagerDuty Integration API
--   docs for further details.
iIncidentKey :: HasIncident a => Lens' a (Maybe IncidentKey)

-- | The PagerDuty service that the incident belongs to. The service will
--   contain fields of its own.
iService :: HasIncident a => Lens' a Object

-- | The escalation policy that the incident belongs to. The policy will
--   contain fields of its own.
iEscalationPolicy :: HasIncident a => Lens' a (Maybe Object)

-- | The list of assignments of the incident. An assignment is an object
--   containing the assigned user as well as the date/time the incident was
--   assigned to that user. The user will contain fields of its own. This
--   list is empty if the status of the incident is resolved.
iAssignedTo :: HasIncident a => Lens' a [Assignee]

-- | The list of acknowledgements of the incident. An acknowledgement is an
--   object containing the acknowleding object (either a user or the
--   integration API) as well as the date/time the incident was
--   acknowledged. This field is only present if the status of the incident
--   is acknowledged. This field is sorted in ascending order by
--   acknowledgement time.
iAcknowledgers :: HasIncident a => Lens' a [Assignee]

-- | The user who is responsible for the incident's last status change. If
--   the incident is in the acknowledged or resolved status, this will be
--   the user that took the first acknowledged or resolved action. If the
--   incident was automatically resolved (say through the Event Integration
--   API), or if the incident is in the triggered state, this will be null.
--   User fields are the same as in the assignedToUser field above.
iLastStatusChangeBy :: HasIncident a => Lens' a (Maybe Assignee)

-- | The date/time the incident's status last changed.
iLastStatusChangeOn :: HasIncident a => Lens' a (Maybe UTCTime)

-- | Some condensed information regarding the initial event that triggered
--   this incident. This data will be a set of key/value pairs that vary
--   depending on what sort of event triggered the incident (email, Event
--   API request, etc). For instance, if an email triggered the incident,
--   then the triggerSummaryData will likely contain a subject. There are
--   no guarantees o nthe full presence of this data for every incident.
iTriggerSummaryData :: HasIncident a => Lens' a Object

-- | The PagerDuty website URL where the full details regarding the initial
--   event that triggered this incident can be found. (This is not the
--   resource URL.)
iTriggerDetailsHtmlUrl :: HasIncident a => Lens' a Text
data Incident
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.ReassignIncident
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.ReassignIncident
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Incidents.ReassignIncident
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.ReassignIncident
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.ReassignIncident
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.UpdateIncidents
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.UpdateIncidents
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Incidents.UpdateIncidents
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.UpdateIncidents
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.UpdateIncidents
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.UpdatedIncidents
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.UpdatedIncidents
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.UpdatedIncidents
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.UpdatedIncidents
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.UpdateIncident
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.UpdateIncident
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.UpdateIncident
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.UpdateIncident
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.UpdateStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.UpdateStatus
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Incidents.UpdateStatus
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.UpdateStatus
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.UpdateStatus
instance GHC.Real.Real Network.PagerDuty.REST.Incidents.Count
instance GHC.Real.Integral Network.PagerDuty.REST.Incidents.Count
instance GHC.Num.Num Network.PagerDuty.REST.Incidents.Count
instance GHC.Enum.Enum Network.PagerDuty.REST.Incidents.Count
instance GHC.Enum.Bounded Network.PagerDuty.REST.Incidents.Count
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Count
instance GHC.Classes.Ord Network.PagerDuty.REST.Incidents.Count
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Count
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.Count
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Incidents.CountIncidents
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Incidents.CountIncidents
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.CountIncidents
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Incidents.CountIncidents
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.CountIncidents
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.CountIncidents
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Incidents.ListIncidents
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Incidents.ListIncidents
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.ListIncidents
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Incidents.ListIncidents
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.Incidents.ListIncidents
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.ListIncidents
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.ListIncidents
instance Network.PagerDuty.REST.Incidents.HasIncident Network.PagerDuty.REST.Incidents.Incident
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.Incident
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.Incident
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Incident
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Incident
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.Assignee
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.Assignee
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Assignee
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Assignee
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.IncidentStatus
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.IncidentStatus
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Range
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Range
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Field
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Field
instance Data.ByteString.Conversion.To.ToByteString Network.PagerDuty.REST.Incidents.IncidentStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.IncidentStatus
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.IncidentStatus
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Incidents.Range
instance Network.PagerDuty.Internal.Query.QueryValues (Network.PagerDuty.REST.Incidents.Sort Network.PagerDuty.REST.Incidents.Field)
instance GHC.Show.Show a => GHC.Show.Show (Network.PagerDuty.REST.Incidents.Sort a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Network.PagerDuty.REST.Incidents.Sort a)


-- | Access high level reports about alerts and incidents. Useful for
--   creating graphs.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/reports</a>
module Network.PagerDuty.REST.Reports

-- | Get high level statistics about the number of alerts (SMSes, phone
--   calls and emails) sent for the desired time period, summed daily,
--   weekly or monthly.
--   
--   <pre>
--   GET /reports/alerts_per_time
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/reports/alerts_per_time</a>
alertsPerTime :: UTCTime -> UTCTime -> Request Report s AlertTotals

-- | Get high level statistics about the number of incidents created for
--   the desired time period, summed daily, weekly or monthly.
--   
--   <pre>
--   GET /reports/incidents_per_time
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/reports/incidents_per_time</a>
incidentsPerTime :: UTCTime -> UTCTime -> Request Report s [IncidentReport]
data Report

-- | Start of the date range over which you want to search. The time
--   element is optional.
rSince :: Lens' (Request Report s b) UTCTime

-- | The end of the date range over which you want to search. This should
--   be in the same format as since.
rUntil :: Lens' (Request Report s b) UTCTime

-- | Specifies the bucket duration for each summation.
--   
--   <i>Default:</i> monthly.
--   
--   Example: A time window of two years (based on since and until) with a
--   rollup of monthly will result in 24 sets of data points being returned
--   (one for each month in the span).
rRollup :: Lens' (Request Report s b) Rollup
data Rollup
Daily :: Rollup
Weekly :: Rollup
Monthly :: Rollup
data AlertReport
arStart :: Lens' AlertReport UTCTime
arEnd :: Lens' AlertReport UTCTime
arNumberOfAlerts :: Lens' AlertReport Int
arNumberOfPhoneAlerts :: Lens' AlertReport Int
arNumberOfSmsAlerts :: Lens' AlertReport Int
arNumberOfEmailAlerts :: Lens' AlertReport Int
data AlertTotals
atAlerts :: Lens' AlertTotals [AlertReport]
atTotalNumberOfAlerts :: Lens' AlertTotals Int
atTotalNumberOfPhoneAlerts :: Lens' AlertTotals Int
atTotalNumberOfSmsAlerts :: Lens' AlertTotals Int
atTotalNumberOfEmailAlerts :: Lens' AlertTotals Int
atTotalNumberOfBillableAlerts :: Lens' AlertTotals Int
data IncidentReport
irStart :: Lens' IncidentReport UTCTime
irEnd :: Lens' IncidentReport UTCTime
irNumberOfIncidents :: Lens' IncidentReport Int
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Reports.IncidentReport
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Reports.IncidentReport
instance GHC.Show.Show Network.PagerDuty.REST.Reports.IncidentReport
instance GHC.Classes.Eq Network.PagerDuty.REST.Reports.IncidentReport
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Reports.AlertTotals
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Reports.AlertTotals
instance GHC.Show.Show Network.PagerDuty.REST.Reports.AlertTotals
instance GHC.Classes.Eq Network.PagerDuty.REST.Reports.AlertTotals
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Reports.AlertReport
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Reports.AlertReport
instance GHC.Show.Show Network.PagerDuty.REST.Reports.AlertReport
instance GHC.Classes.Eq Network.PagerDuty.REST.Reports.AlertReport
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Reports.Report
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Reports.Report
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Reports.Report
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Reports.Report
instance GHC.Show.Show Network.PagerDuty.REST.Reports.Report
instance GHC.Classes.Eq Network.PagerDuty.REST.Reports.Report
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Reports.Rollup
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Reports.Rollup
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Reports.Rollup
instance GHC.Show.Show Network.PagerDuty.REST.Reports.Rollup
instance GHC.Classes.Eq Network.PagerDuty.REST.Reports.Rollup


-- | Email Filters are a set of rules that are applied to triggering
--   email's body, subject and from address. It only applies to
--   generic_email kind of Services. The way multiple filters are combined
--   depends on the email_filter_mode attribute of the service.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/email_filters</a>
module Network.PagerDuty.REST.Services.EmailFilters

-- | Create a new Email Filter for the specified service.
--   
--   <pre>
--   POST /services/:service_id/email_filters
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/email_filters/create</a>
createEmailFilter :: ServiceId -> Request EmailFilterInfo s EmailFilter

-- | Update an existing Email Filter.
--   
--   <pre>
--   PUT /services/:service_id/email_filters/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/email_filters/update</a>
updateEmailFilter :: ServiceId -> EmailFilterId -> Request EmailFilterInfo s Empty

-- | Delete an existing Email Filter.
--   
--   <pre>
--   DELETE /services/:service_id/email_filters/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/email_filters/delete</a>
deleteEmailFilter :: ServiceId -> EmailFilterId -> Request Empty s Empty
data MatchMode
Always :: MatchMode
Match :: MatchMode
NoMatch :: MatchMode
class HasEmailFilterInfo a
emailFilterInfo :: HasEmailFilterInfo a => Lens' a EmailFilterInfo

-- | One of always, match, no-match, which, respectively, means to not
--   filter the email trigger by subject, filter it if the email subject
--   matches the given regex, or filter if it doesn't match the given
--   regex.
--   
--   <i>Default:</i> always.
efSubjectMode :: HasEmailFilterInfo a => Lens' a (Maybe MatchMode)

-- | The regex to be used when subject_mode is match or no-match. It is a
--   required parameter on such cases.
efSubjectRegex :: HasEmailFilterInfo a => Lens' a (Maybe Text)

-- | One of always, match, no-match, which, respectively, means to not
--   filter the email trigger by body, filter it if the body email matches
--   the given regex, or filter if it doesn't match the given regex.
--   
--   <i>Default:</i> always.
efBodyMode :: HasEmailFilterInfo a => Lens' a (Maybe MatchMode)

-- | The regex to be used when body_mode is match or no-match. It is a
--   required parameter on such cases.
efBodyRegex :: HasEmailFilterInfo a => Lens' a (Maybe Text)

-- | One of always, match, no-match, which, respectively, means to not
--   filter the email trigger by its from address, filter it if the email
--   from address matches the given regex, or filter if it doesn't match
--   the given regex.
--   
--   <i>Default:</i> always.
efFromEmailMode :: HasEmailFilterInfo a => Lens' a (Maybe MatchMode)

-- | The regex to be used when from_email_mode is match or no-match. It is
--   a required parameter on such cases.
efFromEmailRegex :: HasEmailFilterInfo a => Lens' a (Maybe Text)
data EmailFilterInfo
data EmailFilter

-- | The email filter ID.
efId :: Lens' EmailFilter EmailFilterId
instance GHC.Show.Show Network.PagerDuty.REST.Services.EmailFilters.EmailFilter
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.EmailFilters.EmailFilter
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.EmailFilters.EmailFilter
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.EmailFilters.EmailFilter
instance Network.PagerDuty.REST.Services.EmailFilters.HasEmailFilterInfo Network.PagerDuty.REST.Services.EmailFilters.EmailFilter
instance (Network.HTTP.Types.QueryLike.QueryLike a, Data.Aeson.Types.ToJSON.ToJSON a, Network.PagerDuty.REST.Services.EmailFilters.HasEmailFilterInfo a) => Network.PagerDuty.REST.Services.EmailFilters.HasEmailFilterInfo (Network.PagerDuty.Internal.Types.Request a s b)
instance Network.PagerDuty.REST.Services.EmailFilters.HasEmailFilterInfo Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance Data.Default.Class.Default Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance GHC.Show.Show Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.EmailFilters.EmailFilterInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.EmailFilters.MatchMode
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.EmailFilters.MatchMode
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.EmailFilters.MatchMode
instance GHC.Show.Show Network.PagerDuty.REST.Services.EmailFilters.MatchMode
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.EmailFilters.MatchMode


-- | This API lets you access and manipulate the services across your
--   account.
--   
--   A service is an endpoint (like Nagios, email, or an API call) that
--   generates events, which Pagerduty normalizes and dedupes, creating
--   incidents.
--   
--   When a service is shown inlined in other resources, a deleted service
--   will have its <tt>html_url</tt> attribute set to <a>Nothing</a>.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services</a>
module Network.PagerDuty.REST.Services
data ListServices

-- | List existing services.
--   
--   <pre>
--   GET /services
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/list</a>
listServices :: Request ListServices s [Service]

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> account default time zone.
lsTimeZone :: Lens' (Request ListServices s r) (Maybe TimeZone)
data CreateService

-- | Creates a new service.
--   
--   <pre>
--   POST /services
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/create</a>
createService :: Text -> EscalationPolicyId -> ServiceType -> Request CreateService s Service

-- | The name of the service.
csName :: Lens' (Request CreateService s r) Text

-- | A description for your service. 1024 character maximum.
csDescription :: Lens' (Request CreateService s r) (Maybe Text)

-- | The type of service to create.
csType :: Lens' (Request CreateService s r) ServiceType

-- | PagerDuty's internal vendor identifier for this service. For more
--   information about a specific vendor, please contact PagerDuty Support.
csVendorId :: Lens' (Request CreateService s r) (Maybe VendorId)

-- | The id of the escalation policy to be used by this service.
csEscalationPolicyId :: Lens' (Request CreateService s r) EscalationPolicyId

-- | The duration in seconds before an incidents acknowledged in this
--   service become triggered again.
--   
--   <i>Default:</i> 30 minutes.
csAcknowledgementTimeout :: Lens' (Request CreateService s r) (Maybe Int)

-- | The duration in seconds before a triggered incident auto-resolves
--   itself.
--   
--   <i>Default:</i> 4 hours.
csAutoResolveTimeout :: Lens' (Request CreateService s r) (Maybe Int)

-- | Specifies what severity levels will create a new open incident.
csSeverityFilter :: Lens' (Request CreateService s r) (Maybe SeverityFilter)

-- | Get details about an existing service.
--   
--   <pre>
--   GET services/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/show</a>
getService :: ServiceId -> Request Empty s Service
data UpdateService

-- | Update an existing service.
--   
--   <pre>
--   PUT services/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/update</a>
updateService :: ServiceId -> Request UpdateService s Service

-- | The name of the service.
usName :: Lens' (Request UpdateService s r) (Maybe Text)

-- | The id of the escalation policy to be used by this service.
usEscalationPolicyId :: Lens' (Request UpdateService s r) (Maybe EscalationPolicyId)

-- | A description for your service. 1024 character maximum.
usDescription :: Lens' (Request UpdateService s r) (Maybe Text)

-- | The duration in seconds before an incidents acknowledged in this
--   service become triggered again.
--   
--   <i>Default:</i> 30 minutes.
usAcknowledgementTimeout :: Lens' (Request UpdateService s r) (Maybe Int)

-- | The duration in seconds before a triggered incident auto-resolves
--   itself.
--   
--   <i>Default:</i> 4 hours.
usAutoResolveTimeout :: Lens' (Request UpdateService s r) (Maybe Int)

-- | Specifies what severity levels will create a new open incident.
usSeverityFilter :: Lens' (Request UpdateService s r) (Maybe SeverityFilter)

-- | Delete an existing service. Once the service is deleted, it will not
--   be accessible from the web UI and new incidents won't be able to be
--   created for this service.
--   
--   <pre>
--   DELETE /services/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/delete</a>
deleteService :: ServiceId -> Request Empty s Empty

-- | Enable a previously disabled service.
--   
--   <pre>
--   PUT services/:id/enable
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/enable</a>
enableService :: RequesterId -> ServiceId -> Request Empty s Empty

-- | Disable a service. Once a service is disabled, it will not be able to
--   create incidents until it is enabled again.
--   
--   <pre>
--   PUT services/:id/disable
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/disable</a>
disableService :: RequesterId -> ServiceId -> Request Empty s Empty

-- | Regenerate a new service key for an existing service.
--   
--   _Warning! The service's previous key will be invalidated, and existing
--   monitoring integrations will need to be modified to use the new key!_
--   
--   <pre>
--   POST services/:id/regenerate_key
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/services/regenerate_key</a>
regenerateKey :: ServiceId -> Request Empty s Service
data EmailFilterMode

-- | Accept all incoming email
AllEmail :: EmailFilterMode

-- | Accept email only if it matches ONE OR MORE rules below
OrRulesEmail :: EmailFilterMode

-- | Accept email only if it matches ALL of the rules below
AndRulesEmail :: EmailFilterMode
data EmailIncidentCreation

-- | Open a new incident for each trigger email.
OnNewEmail :: EmailIncidentCreation

-- | Open a new incident for each new trigger email subject.
OnNewEmailSubject :: EmailIncidentCreation

-- | Open a new incident only if an open incident does not already exist.
OnlyIfNoOpenIncidents :: EmailIncidentCreation
data ServiceStatus

-- | The service is enabled and has no open incidents.
Active :: ServiceStatus

-- | The service is enabled and has one or more acknowledged incidents.
Warning :: ServiceStatus

-- | The service is enabled and has one or more triggered incidents.
Critical :: ServiceStatus

-- | The service is under maintenance, no new incidents will be triggered
--   during maintenance mode.
Maintenance :: ServiceStatus

-- | The service is disabled and will not have any new triggered incidents.
Disabled :: ServiceStatus
data ServiceType
CloudKick :: ServiceType
GenericEmail :: ServiceType
GenericEventsApi :: ServiceType
Keynote :: ServiceType
Nagios :: ServiceType
Pingdom :: ServiceType
ServerDensity :: ServiceType
SqlMonitor :: ServiceType
data SeverityFilter

-- | Incidents are created when an alarm enters the Critical state.
SevCritical :: SeverityFilter

-- | Incidents are created when an alarm enters the Critical OR Warning
--   states
SevCriticalOrWarning :: SeverityFilter

-- | SQL Monitor: Incidents are created for alerts of any severity.
SevOnAny :: SeverityFilter

-- | SQL Monitor: Incidents are created for alerts with high severity.
SevOnHigh :: SeverityFilter

-- | SQL Monitor: Incidents are created for with high or medium severity
SevOnMediumHigh :: SeverityFilter
data IncidentCounts
cntTriggered :: Lens' IncidentCounts Int
cntAcknowledged :: Lens' IncidentCounts Int
cntResolved :: Lens' IncidentCounts Int
cntTotal :: Lens' IncidentCounts Int
data PolicyInfo
pinfoId :: Lens' PolicyInfo EscalationPolicyId
pinfoName :: Lens' PolicyInfo Text
data Service

-- | A unique identifier for this service.
svcId :: Lens' Service ServiceId

-- | The name of the service.
svcName :: Lens' Service Text

-- | The description of the service
svcDescription :: Lens' Service Text

-- | Relative URL that corresponds to this service.
svcServiceUrl :: Lens' Service Text

-- | For Email services, the serviceKey is the associated email address for
--   the service. For all other service types, this is the unique key used
--   for API calls.
svcServiceKey :: Lens' Service ServiceKey

-- | Time in seconds that an incident changes to the Triggered State after
--   being Acknowledged. Value is <a>Nothing</a> if the feature is
--   disabled.
svcAutoResolveTimeout :: Lens' Service (Maybe Int)

-- | Time in seconds that an incident is automatically resolved if left
--   open for that long. Value is <a>Nothing</a> is the feature is
--   disabled.
svcAcknowledgementTimeout :: Lens' Service (Maybe Int)

-- | The date/time when this service was created.
svcCreatedAt :: Lens' Service UTCTime

-- | The current state of the Service.
svcStatus :: Lens' Service ServiceStatus

-- | The date/time when the most recent incident was created for this
--   service.
svcLastIncidentTimestamp :: Lens' Service (Maybe UTCTime)

-- | If the service is a Generic Email service, this describes what kind of
--   emails create an incident.
svcEmailIncidentCreation :: Lens' Service (Maybe EmailIncidentCreation)

-- | An object with the number of incidents corresponding to these states.
svcIncidentCounts :: Lens' Service IncidentCounts

-- | If the service is a Generic Email service, this describes which types
--   of email will generate an incident.
svcEmailFilterMode :: Lens' Service EmailFilterMode

-- | The service type.
svcType :: Lens' Service ServiceType

-- | An object containing the ID and name of the escalation policy used by
--   this service.
svcEscalationPolicy :: Lens' Service (Maybe PolicyInfo)

-- | An object containing inline Email Filters. Note that only genericEmail
--   services have filters.
svcEmailFilters :: Lens' Service (Maybe [EmailFilterInfo])

-- | Specifies what severity levels will create a new open incident.
svcSeverityFilter :: Lens' Service (Maybe SeverityFilter)
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.UpdateService
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.UpdateService
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Services.UpdateService
instance GHC.Show.Show Network.PagerDuty.REST.Services.UpdateService
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.UpdateService
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.CreateService
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.CreateService
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Services.CreateService
instance GHC.Show.Show Network.PagerDuty.REST.Services.CreateService
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.CreateService
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Services.ListServices
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Services.ListServices
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.ListServices
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Services.ListServices
instance GHC.Show.Show Network.PagerDuty.REST.Services.ListServices
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.ListServices
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.Services.ListServices
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.Service
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.Service
instance GHC.Show.Show Network.PagerDuty.REST.Services.Service
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.Service
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.SeverityFilter
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.SeverityFilter
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.SeverityFilter
instance GHC.Show.Show Network.PagerDuty.REST.Services.SeverityFilter
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.SeverityFilter
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.PolicyInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.PolicyInfo
instance GHC.Show.Show Network.PagerDuty.REST.Services.PolicyInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.PolicyInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.ServiceType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.ServiceType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.ServiceType
instance GHC.Show.Show Network.PagerDuty.REST.Services.ServiceType
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.ServiceType
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.ServiceStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.ServiceStatus
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.ServiceStatus
instance GHC.Show.Show Network.PagerDuty.REST.Services.ServiceStatus
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.ServiceStatus
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.EmailFilterMode
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.EmailFilterMode
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.EmailFilterMode
instance GHC.Show.Show Network.PagerDuty.REST.Services.EmailFilterMode
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.EmailFilterMode
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.EmailIncidentCreation
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.EmailIncidentCreation
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Services.EmailIncidentCreation
instance GHC.Show.Show Network.PagerDuty.REST.Services.EmailIncidentCreation
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.EmailIncidentCreation
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Services.IncidentCounts
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Services.IncidentCounts
instance GHC.Show.Show Network.PagerDuty.REST.Services.IncidentCounts
instance GHC.Classes.Eq Network.PagerDuty.REST.Services.IncidentCounts


-- | Access and manipulate user data for your PagerDuty account. When a
--   user is shown inlined in other resources, a deleted user will have its
--   <tt>html_url</tt> attribute set to null.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users</a>
module Network.PagerDuty.REST.Users
data ListUsers

-- | List users of your PagerDuty account, optionally filtered by a search
--   query.
--   
--   <pre>
--   GET /users
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/list</a>
listUsers :: Request ListUsers s [User]

-- | Filters the result, showing only the users whose names or email
--   addresses match the query.
luQuery :: Lens' (Request ListUsers s b) (Maybe Text)

-- | List all the existing escalation policies with currently on-call
--   users.
--   
--   If the start and end of an on-call object are null, then the user is
--   always on-call for an escalation policy level.
--   
--   <pre>
--   GET /escalation_policies/on_call
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call</a>
listOnCallUsers :: Request ListUsers s [User]
data CreateUser

-- | Create a new user for your account. An invite email will be sent
--   asking the user to choose a password.
--   
--   <pre>
--   POST /users
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/create</a>
createUser :: RequesterId -> Text -> Address -> Request CreateUser s User

-- | The name of the user.
cuName :: Lens' (Request CreateUser s b) Text

-- | The email of the user. The newly created user will receive an email
--   asking to confirm the subscription.
cuEmail :: Lens' (Request CreateUser s b) Address

-- | The user's role.
cuRole :: Lens' (Request CreateUser s b) (Maybe Role)

-- | The job title of the user.
cuJobTitle :: Lens' (Request CreateUser s b) (Maybe Text)

-- | The time zone the user is in. If not specified, the time zone of the
--   account making the API call will be used.
cuTimeZone :: Lens' (Request CreateUser s b) (Maybe TimeZone)

-- | Get information about an existing user.
--   
--   <pre>
--   GET /users/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/show</a>
getUser :: UserId -> Request Empty s User

-- | Get a user object with that user's current on-call status. If the
--   on-call object is an empty list, the user is never on-call.
--   
--   If the start and end of an on-call object are null, then the user is
--   always on-call for an escalation policy level.
--   
--   <pre>
--   GET /users/:id/on_call
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/show_on_call</a>
getUserOnCall :: UserId -> Request Empty s User
data UpdateUser

-- | Update an existing user.
--   
--   <pre>
--   PUT /users/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/update</a>
updateUser :: UserId -> Request UpdateUser s User

-- | The name of the user.
uuName :: Lens' (Request UpdateUser s b) (Maybe Text)

-- | The email of the user. The newly created user will receive an email
--   asking to confirm the subscription.
uuEmail :: Lens' (Request UpdateUser s b) (Maybe Address)

-- | The user's role.
uuRole :: Lens' (Request UpdateUser s b) (Maybe Role)

-- | The job title of the user.
uuJobTitle :: Lens' (Request UpdateUser s b) (Maybe Text)

-- | The time zone the user is in. If not specified, the time zone of the
--   account making the API call will be used.
uuTimeZone :: Lens' (Request UpdateUser s b) (Maybe TimeZone)

-- | Remove an existing user.
--   
--   <pre>
--   DELETE /users/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/delete</a>
deleteUser :: UserId -> Request Empty s Empty
data PolicyInfo
piId :: Lens' PolicyInfo EscalationPolicyId
piName :: Lens' PolicyInfo Text
data OnCall
ocLevel :: Lens' OnCall Int
ocStart :: Lens' OnCall (Maybe Date)
ocEnd :: Lens' OnCall (Maybe Date)
ocEscalationPolicy :: Lens' OnCall PolicyInfo
data Role
RoleAdmin :: Role
RoleUser :: Role
RoleLimitedUser :: Role
class HasUserInfo a
userInfo :: HasUserInfo a => Lens' a UserInfo

-- | The id of the user.
uId :: HasUserInfo a => Lens' a UserId

-- | The name of the user.
uName :: HasUserInfo a => Lens' a Text

-- | The user's email address.
uEmail :: HasUserInfo a => Lens' a Address

-- | The color used to represent the user in schedules.
uColor :: HasUserInfo a => Lens' a Text

-- | The user's personal time zone.
uTimeZone :: HasUserInfo a => Lens' a TimeZone
data UserInfo
data User
uRole :: Lens' User Role
uAvatarUrl :: Lens' User Text
uUserUrl :: Lens' User Text
uInvitationSent :: Lens' User Bool
uJobTitle :: Lens' User (Maybe Text)
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.UpdateUser
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.UpdateUser
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.UpdateUser
instance GHC.Show.Show Network.PagerDuty.REST.Users.UpdateUser
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.UpdateUser
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.CreateUser
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.CreateUser
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.CreateUser
instance GHC.Show.Show Network.PagerDuty.REST.Users.CreateUser
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.CreateUser
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Users.ListUsers
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Users.ListUsers
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.ListUsers
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.ListUsers
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.Users.ListUsers
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.User
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.User
instance Network.PagerDuty.REST.Users.HasUserInfo Network.PagerDuty.REST.Users.User
instance GHC.Show.Show Network.PagerDuty.REST.Users.User
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.User
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.Role
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.Role
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Users.Role
instance Data.Default.Class.Default Network.PagerDuty.REST.Users.Role
instance GHC.Show.Show Network.PagerDuty.REST.Users.Role
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.Role
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.OnCall
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.OnCall
instance GHC.Show.Show Network.PagerDuty.REST.Users.OnCall
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.OnCall
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.PolicyInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.PolicyInfo
instance GHC.Show.Show Network.PagerDuty.REST.Users.PolicyInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.PolicyInfo
instance (Network.HTTP.Types.QueryLike.QueryLike a, Data.Aeson.Types.ToJSON.ToJSON a, Network.PagerDuty.REST.Users.HasUserInfo a) => Network.PagerDuty.REST.Users.HasUserInfo (Network.PagerDuty.Internal.Types.Request a s b)
instance Network.PagerDuty.REST.Users.HasUserInfo Network.PagerDuty.REST.Users.UserInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.UserInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.UserInfo
instance GHC.Show.Show Network.PagerDuty.REST.Users.UserInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.UserInfo


-- | Schedule overrides are custom, non-recurring exceptions to your
--   regular on-call schedules. Use them when your team members go on
--   vacation, swap shifts, or when you simply cannot achieve your normal
--   scheduling with recurring layers.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules</a>
module Network.PagerDuty.REST.Schedules.Overrides
data ListOverrides

-- | List overrides for a given time range.
--   
--   <pre>
--   GET /schedules/:schedule_id/overrides
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/overrides/list</a>
listOverrides :: ScheduleId -> Date -> Date -> Request ListOverrides s [Override]

-- | The start time of the date range you want to retrieve override for.
--   
--   The maximum date range queryable is 3 months.
lsSince :: Lens' (Request ListOverrides s b) UTCTime

-- | The end time of the date range you want to retrieve override for.
lsUntil :: Lens' (Request ListOverrides s b) UTCTime

-- | When <a>True</a>, only editable overrides will be returned.
--   
--   The result will onlyinclude the id the override if this parameter is
--   present. Only future overrides are editable.
--   
--   <i>Default:</i> 'False.'
lsEditable :: Lens' (Request ListOverrides s b) Bool

-- | Any on-call schedule entries that pass the date range bounds will be
--   truncated at the bounds, unless <tt>lsEditable .~ True</tt> is
--   specified.
--   
--   <i>Default:</i> 'False.'
lsOverflow :: Lens' (Request ListOverrides s b) Bool
data CreateOverride

-- | Create an override for a specific user covering the specified time
--   range. If you create an override on top of an existing one, the last
--   created override will have priority.
--   
--   If no time zone information is present in the since and until
--   parameters, the schedule's time zone will be used.
--   
--   <i>Note:</i> You cannot create overrides in the past.
--   
--   <pre>
--   POST /schedules/:schedule_id/overrides
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/overrides/create</a>
createOverride :: ScheduleId -> UserId -> Date -> Date -> Request CreateOverride s Override

-- | The ID of the user who will be on call for the duration of the
--   override.
coUserId :: Lens' (Request CreateOverride s b) UserId

-- | The start date and time for the override.
coStart :: Lens' (Request CreateOverride s b) UTCTime

-- | The end date and time for the override.
coEnd :: Lens' (Request CreateOverride s b) UTCTime

-- | Remove an override.
--   
--   You cannot remove a past override. If the override start time is
--   before the current time, but the end time is after the current time,
--   the override will be truncated to the current time. If the override is
--   truncated, the status code will be 200 OK, as opposed to a 204 No
--   Content for a successful delete.
--   
--   <pre>
--   DELETE /schedules/:schedule_id/overrides/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/overrides/delete</a>
deleteOverride :: ScheduleId -> OverrideId -> Request Empty s Empty
class HasUserInfo a
userInfo :: HasUserInfo a => Lens' a UserInfo

-- | The id of the user.
uId :: HasUserInfo a => Lens' a UserId

-- | The name of the user.
uName :: HasUserInfo a => Lens' a Text

-- | The user's email address.
uEmail :: HasUserInfo a => Lens' a Address

-- | The color used to represent the user in schedules.
uColor :: HasUserInfo a => Lens' a Text

-- | The user's personal time zone.
uTimeZone :: HasUserInfo a => Lens' a TimeZone
data Override
oId :: Lens' Override (Maybe OverrideId)
oStart :: Lens' Override Date
oEnd :: Lens' Override Date
oUser :: Lens' Override UserInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Overrides.CreateOverride
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.Overrides.CreateOverride
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.Overrides.CreateOverride
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Overrides.CreateOverride
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Overrides.CreateOverride
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Overrides.ListOverrides
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Overrides.Override
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.Overrides.Override
instance Network.PagerDuty.REST.Users.HasUserInfo Network.PagerDuty.REST.Schedules.Overrides.Override
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Overrides.Override
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Overrides.Override


-- | On call schedules determine the time periods that users are on-call.
--   Only when a user is on-call he is eligible to receive alerts from
--   incidents.
--   
--   This API allows users to manipulate on-call schedules.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/overrides</a>
module Network.PagerDuty.REST.Schedules
data ListSchedules

-- | List existing on-call schedules.
--   
--   <pre>
--   GET /schedules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/list</a>
listSchedules :: RequesterId -> Request ListSchedules s [ScheduleInfo]

-- | Filters the result, showing only the schedules whose name matches the
--   query.
lsQuery :: Lens' (Request ListSchedules s b) (Maybe Text)
data GetSchedule

-- | Show detailed information about a schedule, including entries for each
--   layer and sub-schedule.
--   
--   <pre>
--   GET /schedules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/show</a>
getSchedule :: Request GetSchedule s Schedule

-- | The start of the date range over which you want to return on-call
--   schedule entries and on-call schedule layers.
gsSince :: Lens' (Request GetSchedule s b) (Maybe UTCTime)

-- | The end of the date range over which you want to return schedule
--   entries and on-call schedule layers.
gsUntil :: Lens' (Request GetSchedule s b) (Maybe UTCTime)

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> account time zone.
gsTimeZone :: Lens' (Request GetSchedule s b) (Maybe TimeZone)
data GetScheduleUsers

-- | List all the users on-call in a given schedule for a given time range.
--   
--   <pre>
--   GET /schedules/:id/users
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/users</a>
getScheduleUsers :: UserId -> Request GetScheduleUsers s [User]

-- | The start of the date range over which you want to return on-call
--   users.
gsuSince :: Lens' (Request GetScheduleUsers s b) (Maybe UTCTime)

-- | The end time of the date range over which you want to return on-call
--   users.
gsuUntil :: Lens' (Request GetScheduleUsers s b) (Maybe UTCTime)
data GetScheduleEntries

-- | List schedule entries that are active for a given time range for a
--   specified on-call schedule.
--   
--   <pre>
--   GET /schedules/:id/entries
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/entries</a>
getScheduleEntries :: UserId -> Date -> Date -> Request GetScheduleEntries s b

-- | The start of the date range over which you want to return on-call
--   schedule entries. The maximum range queryable at once is three months.
gseSince :: Lens' (Request GetScheduleEntries s b) UTCTime

-- | The end of the date range over which you want to return schedule
--   entries.
gseUntil :: Lens' (Request GetScheduleEntries s b) UTCTime

-- | Any on-call schedule entries that pass the date range bounds will be
--   truncated at the bounds, unless the parameter overflow=true is passed.
--   
--   Default: false.
--   
--   Example: if your schedule is a rotation that changes daily at midnight
--   UTC, and your date range is from 2011-06-01T10:00:00Z to
--   2011-06-01T14:00:00Z: If you don't pass the overflow=true parameter,
--   you will get one schedule entry returned with a start of
--   2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z. If you do pass
--   the overflow=true parameter, you will get one schedule entry returned
--   with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z.
gseOverflow :: Lens' (Request GetScheduleEntries s b) Bool

-- | Time zone in which dates in the result will be rendered.
--   
--   Default: account time zone.
gseTimeZone :: Lens' (Request GetScheduleEntries s b) (Maybe TimeZone)

-- | To filter the returned on-call schedule entries by a specific user,
--   you can optionally add the user_id parameter to the query.
gseUserId :: Lens' (Request GetScheduleEntries s b) (Maybe UserId)
data CreateSchedule

-- | Create a new on-call schedule.
--   
--   <pre>
--   POST /schedules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/create</a>
createSchedule :: Text -> TimeZone -> [ScheduleLayer] -> Request CreateSchedule s Schedule

-- | The name of the schedule.
csName :: Lens' (Request CreateSchedule s b) Text

-- | Any on-call schedule entries that pass the date range bounds will be
--   truncated at the bounds, unless <a>csOverflow</a> is set to
--   <a>True</a>.
--   
--   Default: <a>False</a>.
csOverflow :: Lens' (Request CreateSchedule s b) Bool

-- | The time zone of the schedule.
--   
--   Default: <tt>UTC</tt>.
csTimeZone :: Lens' (Request CreateSchedule s b) TimeZone

-- | A list of schedule layers.
csScheduleLayers :: Lens' (Request CreateSchedule s b) [ScheduleLayer]
data UpdateSchedule

-- | Update an existing on-call schedule.
--   
--   <i>Note:</i> You cannot delete schedule layers. You must include all
--   layers in your update request. To delete a layer, set the end
--   parameter to schedule its termination.
--   
--   <pre>
--   PUT /schedules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/update</a>
updateSchedule :: ScheduleId -> TimeZone -> [ScheduleLayer] -> Request UpdateSchedule s Schedule

-- | Any on-call schedule entries that pass the date range bounds will be
--   truncated at the bounds, unless <a>usOverflow</a> is set to
--   <a>True</a>.
--   
--   Default: <a>False</a>.
usOverflow :: Lens' (Request UpdateSchedule s b) Bool

-- | The time zone of the schedule.
usTimeZone :: Lens' (Request UpdateSchedule s b) TimeZone

-- | A list of schedule layers.
usScheduleLayers :: Lens' (Request UpdateSchedule s b) [ScheduleLayer]
data PreviewSchedule

-- | Preview what a schedule would look like without saving it. This work
--   the same as the update or create actions, except that the result is
--   not persisted. Preview optionally takes two additional arguments,
--   since and until, deliminating the span of the preview.
--   
--   <pre>
--   POST /schedules/preview
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/preview</a>
previewSchedule :: Text -> TimeZone -> [ScheduleLayer] -> Request PreviewSchedule s Schedule

-- | The start of the date range over which you want to return on-call
--   schedule entries and on-call schedule layers.
psSince :: Lens' (Request PreviewSchedule s b) (Maybe UTCTime)

-- | The end of the date range over which you want to return schedule
--   entries and on-call schedule layers.
psUntil :: Lens' (Request PreviewSchedule s b) (Maybe UTCTime)

-- | Any on-call schedule entries that pass the date range bounds will be
--   truncated at the bounds, unless <a>psOverflow</a> is set to
--   <a>True</a>.
--   
--   Default: <a>False</a>.
psOverflow :: Lens' (Request PreviewSchedule s b) Bool

-- | The name of the schedule.
psName :: Lens' (Request PreviewSchedule s b) Text

-- | The time zone of the schedule.
--   
--   Default: <tt>UTC</tt>.
psTimeZone :: Lens' (Request PreviewSchedule s b) TimeZone

-- | A list of schedule layers.
psScheduleLayers :: Lens' (Request PreviewSchedule s b) [ScheduleLayer]

-- | Delete an on-call schedule.
--   
--   <pre>
--   DELETE /schedules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/schedules/delete</a>
deleteSchedule :: ScheduleId -> Request Empty s Empty
data RestrictionType
Daily :: RestrictionType
Weekly :: RestrictionType
data Restriction
rStartTimeOfDay :: Lens' Restriction UTCTime
rDurationSeconds :: Lens' Restriction Int
data Rotation
rMemberOrder :: Lens' Rotation Int
rUser :: Lens' Rotation User

-- | A schedule is composed of multiple schedule layers.
--   
--   A layer is composed of a group of people who will rotate through the
--   same shift. In a basic weekly schedule, you create a single layer
--   where each member is on-call for one week, with a set day and time for
--   transferring on-call duty.
--   
--   When a schedule has multiple layers, the layer can be ordered using
--   the priority field. The layer with the highest priority has precedence
--   over the layers with lower priority. You can use restrictions to
--   control how layers overlap.
--   
--   The override layer is a special layer where all the override entries
--   are stored.
--   
--   The final layer is a special layer that contains the result of all the
--   previous layers put together. This layer cannot be edited.
data ScheduleLayer
slName :: Lens' ScheduleLayer Text

-- | This is a list of entries to be rendered for the current time range.
slRenderedScheduleEntries :: Lens' ScheduleLayer [ScheduleId]

-- | This specifies the type of restrictions present on this layer.
slRestrictionType :: Lens' ScheduleLayer RestrictionType

-- | A list of time restrictions for this layer.
slRestrictions :: Lens' ScheduleLayer [Restriction]

-- | The priority of the layer. Layers with higher priority will override
--   layers with a lower priority.
slPriority :: Lens' ScheduleLayer Int

-- | The effective start date of the layer
slStart :: Lens' ScheduleLayer Date

-- | The effective end date of the layer. If <a>Nothing</a>, the layer has
--   no end date.
slEnd :: Lens' ScheduleLayer Date

-- | The percentage of the time range covered by this layer.
slRenderedCoveragePercentage :: Lens' ScheduleLayer Double

-- | The duration of each on-call shift in seconds.
slRotationTurnLengthSeconds :: Lens' ScheduleLayer Int

-- | The effective start time of the layer. This can be before the start
--   time of the schedule.
slRotationVirtualStart :: Lens' ScheduleLayer Date

-- | An ordered list of users in this layer. The member_order field
--   controls the order in which the users apear in the rotation.
slUsers :: Lens' ScheduleLayer [Rotation]
class HasScheduleInfo a
scheduleInfo :: HasScheduleInfo a => Lens' a ScheduleInfo

-- | The unique identifier of the schedule.
sId :: HasScheduleInfo a => Lens' a ScheduleId

-- | The name of the schedule.
sName :: HasScheduleInfo a => Lens' a Text

-- | The time zone of the schedule.
sTimeZone :: HasScheduleInfo a => Lens' a TimeZone

-- | The current day in the schedule's time zone.
sToday :: HasScheduleInfo a => Lens' a UTCTime

-- | An list of all the escalation policies that uses this schedule.
sEscalationPolicies :: HasScheduleInfo a => Lens' a [EscalationPolicyId]
data ScheduleInfo
data Schedule

-- | A list of schedule layers. See the schedule layers parameters for
--   details.
sScheduleLayers :: Lens' Schedule [ScheduleLayer]

-- | The schedule layer object where all the overrides are stored.
sOverridesSubschedule :: Lens' Schedule ScheduleLayer

-- | The final schedule layer object.
sFinalSchedule :: Lens' Schedule ScheduleLayer
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.PreviewSchedule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.PreviewSchedule
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.PreviewSchedule
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.PreviewSchedule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.UpdateSchedule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.UpdateSchedule
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.UpdateSchedule
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.UpdateSchedule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.CreateSchedule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.CreateSchedule
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.CreateSchedule
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.CreateSchedule
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.GetScheduleEntries
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.GetScheduleUsers
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Schedules.GetSchedule
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Schedules.GetSchedule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.GetSchedule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.GetSchedule
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.GetSchedule
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.GetSchedule
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Schedules.ListSchedules
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Schedules.ListSchedules
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.ListSchedules
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Schedules.ListSchedules
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.Schedules.ListSchedules
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.ListSchedules
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.ListSchedules
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Schedule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.Schedule
instance Network.PagerDuty.REST.Schedules.HasScheduleInfo Network.PagerDuty.REST.Schedules.Schedule
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Schedule
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Schedule
instance Network.PagerDuty.REST.Schedules.HasScheduleInfo Network.PagerDuty.REST.Schedules.ScheduleInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.ScheduleInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.ScheduleInfo
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.ScheduleInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.ScheduleInfo
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.ScheduleLayer
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.ScheduleLayer
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.ScheduleLayer
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.ScheduleLayer
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Rotation
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.Rotation
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Rotation
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Rotation
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.Restriction
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.Restriction
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.Restriction
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.Restriction
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Schedules.RestrictionType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Schedules.RestrictionType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Schedules.RestrictionType
instance GHC.Show.Show Network.PagerDuty.REST.Schedules.RestrictionType
instance GHC.Classes.Eq Network.PagerDuty.REST.Schedules.RestrictionType


-- | Maintenance windows allow you to schedule service maintenance periods,
--   during which no incidents will be created.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows</a>
module Network.PagerDuty.REST.MaintenanceWindows
data ListWindows

-- | List existing maintenance windows, optionally filtered by service, or
--   whether they are from the past, present or future.
--   
--   <pre>
--   GET /maintenance_windows
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows/list</a>
listWindows :: Request ListWindows s ListWindowsResponse

-- | Filters the results, showing only the maintenance windows whose
--   descriptions contain the query.
lwQuery :: Lens' (Request ListWindows s b) (Maybe Text)

-- | An list of service IDs, specifying services whose maintenance windows
--   shall be returned.
lwServiceIds :: Lens' (Request ListWindows s b) [ServiceId]

-- | Only return maintenance windows that are of this type. Possible values
--   are past, future, ongoing. If this parameter is omitted, all
--   maintenance windows will be returned.
lwFilter :: Lens' (Request ListWindows s b) (Maybe Text)
data ListWindowsResponse
lwMaintenanceWindows :: Lens' ListWindowsResponse [MaintenanceWindow]
lwCounts :: Lens' ListWindowsResponse Counts
data CreateWindow

-- | Create a new maintenance window for the specified services. No new
--   incidents will be created for a service that is currently in
--   maintenance.
--   
--   <pre>
--   POST /maintenance_windows
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows/create</a>
createWindow :: RequesterId -> UTCTime -> UTCTime -> [ServiceId] -> Request CreateWindow s MaintenanceWindow

-- | A version of <a>createWindow</a> which uses HTTP Basic authentication
--   and doesn't require a <a>RequesterId</a>.
createWindowBasic :: UTCTime -> UTCTime -> [ServiceId] -> Request CreateWindow  'Basic MaintenanceWindow

-- | This maintenance window's start time. This is when the services will
--   stop creating incidents. If this date is in the past, it will be
--   updated to be the current time.
cwStartTime :: Lens' (Request CreateWindow s b) UTCTime

-- | This maintenance window's end time. This is when the services will
--   start creating incidents again. This date must be in the future and
--   after the start_time.
cwEndTime :: Lens' (Request CreateWindow s b) UTCTime

-- | A description for this maintenance window.
cwDescription :: Lens' (Request CreateWindow s b) (Maybe Text)

-- | The ids of the services that are affected by this maintenance window.
cwServiceIds :: Lens' (Request CreateWindow s b) [ServiceId]

-- | Get details about an existing maintenance window.
--   
--   <pre>
--   GET /maintenance_windows/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows/show</a>
getWindow :: WindowId -> Request Empty s MaintenanceWindow
data UpdateWindow

-- | Update an existing maintenance window.
--   
--   <pre>
--   PUT /maintenance_windows/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows/update</a>
updateWindow :: WindowId -> Request UpdateWindow s MaintenanceWindow

-- | The maintenance window's start time. Can only be updated on future
--   maintenance windows. If the start_time is set to a date in the past,
--   it will be updated to the current date.
uwStartTime :: Lens' (Request UpdateWindow s b) (Maybe Date)

-- | The maintenance window's end time. Can only be updated on ongoing and
--   future maintenance windows, and cannot be set to a value before
--   start_time.
uwEndTime :: Lens' (Request UpdateWindow s b) (Maybe Date)

-- | Description for this maintenance window. Can only be updated on
--   ongoing and future maintenance windows.
uwDescription :: Lens' (Request UpdateWindow s b) (Maybe Text)

-- | Services that are affected by this maintenance window. Can only be
--   updated on future maintenance windows.
uwServiceIds :: Lens' (Request UpdateWindow s b) (Maybe [ServiceId])

-- | Cancel or delete an existing maintenance window.
--   
--   <pre>
--   DELETE /maintenance_windows/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/maintenance_windows/delete</a>
deleteWindow :: WindowId -> Request Empty s Empty
data ServiceInfo
siId :: Lens' ServiceInfo ServiceId
siName :: Lens' ServiceInfo Text
siUrl :: Lens' ServiceInfo Text
data Counts
cOngoing :: Lens' Counts Int
cFuture :: Lens' Counts Int
cPast :: Lens' Counts Int
cAll :: Lens' Counts Int
data MaintenanceWindow
mwSequenceNumber :: Lens' MaintenanceWindow Int
mwStartTime :: Lens' MaintenanceWindow Date
mwEndTime :: Lens' MaintenanceWindow Date
mwDescription :: Lens' MaintenanceWindow (Maybe Text)
mwCreatedBy :: Lens' MaintenanceWindow User
mwServices :: Lens' MaintenanceWindow [ServiceInfo]
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.UpdateWindow
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.UpdateWindow
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.MaintenanceWindows.UpdateWindow
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.UpdateWindow
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.UpdateWindow
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.CreateWindow
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.CreateWindow
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.MaintenanceWindows.CreateWindow
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.CreateWindow
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.CreateWindow
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.CreateWindow'
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.CreateWindow'
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.CreateWindow'
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.CreateWindow'
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.ListWindowsResponse
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.ListWindowsResponse
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.ListWindowsResponse
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.ListWindowsResponse
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.Counts
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.Counts
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.Counts
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.Counts
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.MaintenanceWindows.ListWindows
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.MaintenanceWindows.ListWindows
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.ListWindows
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.MaintenanceWindows.ListWindows
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.MaintenanceWindow
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.MaintenanceWindow
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.MaintenanceWindow
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.MaintenanceWindow
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.MaintenanceWindows.ServiceInfo
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.MaintenanceWindows.ServiceInfo
instance GHC.Show.Show Network.PagerDuty.REST.MaintenanceWindows.ServiceInfo
instance GHC.Classes.Eq Network.PagerDuty.REST.MaintenanceWindows.ServiceInfo


-- | PagerDuty keeps a log of all the events that happen to an incident.
--   The following APIs provide fine-grained access to this incident log
--   entry data to give you more insight into how your team or organization
--   is handling your incidents. Log entry data includes details about the
--   event(s) that triggered the incident, who was notified and when, how
--   they were notified, and who acknowledged or resolved it, amongst a few
--   other things.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/log_entries</a>
module Network.PagerDuty.REST.LogEntries
data ListLogs

-- | List all incident log entries across the entire account.
--   
--   <pre>
--   GET /log_entries
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/log_entries/list</a>
listLogs :: Request ListLogs s [LogEntry]

-- | List all incident log entries that describe interactions with a
--   specific user.
--   
--   <pre>
--   GET /users/:user_id/log_entries
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/log_entries/user_log_entries</a>
listUserLogs :: UserId -> Request ListLogs s [LogEntry]

-- | List all incident log entries for a specific incident.
--   
--   <pre>
--   GET /incidents/:incident_id/log_entries
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/log_entries/incident_log_entries</a>
listIncidentLogs :: IncidentKey -> Request ListLogs s [LogEntry]

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> UTC.
llTimeZone :: Lens' (Request ListLogs s b) TimeZone

-- | The start of the date range over which you want to search.
llSince :: Lens' (Request ListLogs s b) (Maybe UTCTime)

-- | The end of the date range over which you want to search.
llUntil :: Lens' (Request ListLogs s b) (Maybe UTCTime)

-- | If true, will only return log entries of type trigger, acknowlldge, or
--   resolve.
--   
--   <i>Default:</i> false.
llIsOverview :: Lens' (Request ListLogs s b) Bool
data GetLog

-- | Get details for a specific incident log entry. This method provides
--   additional information you can use to get at raw event data.
--   
--   <pre>
--   GET /log_entries/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/log_entries/show</a>
getLog :: LogEntryId -> Request GetLog s LogEntry

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> UTC.
glTimeZone :: Lens' (Request GetLog s b) TimeZone

-- | Representation of the means by which the action was channeled.
data Channel
ChanNagios :: NagiosChannel -> Channel
ChanAPI :: APIChannel -> Channel
ChanEmail :: EmailChannel -> Channel
ChanUserEmail :: User -> EmailChannel -> Channel
ChanWebTrigger :: User -> WebTriggerChannel -> Channel
ChanSMS :: User -> Channel
ChanWeb :: User -> Channel
ChanNote :: User -> Channel
ChanAuto :: Channel
ChanTimeout :: Channel
_ChanNagios :: Prism' Channel NagiosChannel
_ChanAPI :: Prism' Channel APIChannel
_ChanEmail :: Prism' Channel EmailChannel
_ChanUserEmail :: Prism' Channel (User, EmailChannel)
_ChanWebTrigger :: Prism' Channel (User, WebTriggerChannel)
_ChanSMS :: Prism' Channel User
_ChanWeb :: Prism' Channel User
_ChanNote :: Prism' Channel User
_ChanAuto :: Prism' Channel ()
_ChanTimeout :: Prism' Channel ()
data NagiosChannel

-- | Same as host.
ncSummary :: Lens' NagiosChannel Text

-- | Nagios host.
ncHost :: Lens' NagiosChannel Text

-- | Nagios service that created the event, if applicable.
ncService :: Lens' NagiosChannel (Maybe Text)

-- | State the caused the event.
ncState :: Lens' NagiosChannel Text

-- | Additional details of the incident.
ncDetails :: Lens' NagiosChannel Object
data APIChannel

-- | Same as description.
acSummary :: Lens' APIChannel Text

-- | API service key.
acServiceKey :: Lens' APIChannel ServiceKey

-- | Description of the event.
acDescription :: Lens' APIChannel Text

-- | Incident deduping string.
acIncidentKey :: Lens' APIChannel IncidentKey

-- | Additional details of the incident, if any.
acDetails :: Lens' APIChannel Object
data EmailType
Plain :: EmailType
HTML :: EmailType
data EmailChannel

-- | Same as subject.
ecSummary :: Lens' EmailChannel Text

-- | To address of the email.
ecTo :: Lens' EmailChannel Text

-- | From address of the email.
ecFrom :: Lens' EmailChannel Text

-- | Subject of the email.
ecSubject :: Lens' EmailChannel Text

-- | Body of the email.
ecBody :: Lens' EmailChannel Text

-- | Content type of the email body.
ecBodyContentType :: Lens' EmailChannel EmailType

-- | URL for raw text of email.
ecRawUrl :: Lens' EmailChannel Text

-- | URL for html rendered version of the email.
--   
--   Only present if content_type is <a>HTML</a>.
ecHtmlUrl :: Lens' EmailChannel (Maybe Text)
data WebTriggerChannel

-- | Same as subject.
wcSummary :: Lens' WebTriggerChannel Text

-- | Subject of the web trigger.
wcSubject :: Lens' WebTriggerChannel Text

-- | Details about the web trigger.
wcDetails :: Lens' WebTriggerChannel (Maybe Text)
data Entry

-- | Log entries come in a wide variety of types. Most types use this
--   format, the exception being the <a>NotifyEntry</a> type.
LogEntry :: LogEntry -> Entry

-- | A user was notified.
NotifyEntry :: NotifyEntry -> Entry
_LogEntry :: Prism' Entry LogEntry
_NotifyEntry :: Prism' Entry NotifyEntry
data LogEntryType

-- | The incident was triggered.
Trigger :: LogEntryType

-- | The incident was acknowledged.
Acknowledge :: LogEntryType

-- | The incident was unacknowledged.
Unacknowledge :: LogEntryType

-- | The incident was resolved.
Resolve :: LogEntryType

-- | The incident was escalated.
Escalate :: LogEntryType

-- | The incident was assigned to a user.
Assign :: LogEntryType

-- | A note was added to the incident.
Annotate :: LogEntryType

-- | The incident has reached the log entry trigger limit and will not
--   create any more.
ReachTriggerLimit :: LogEntryType

-- | The incident has reached the end of its escalation policy and will
--   restart.
RepeatEscalationPath :: LogEntryType

-- | The incident has cycled through its escalation policy the max allowed
--   number of times.
ExhaustEscalationPath :: LogEntryType

-- | A user was notified.
Notify :: LogEntryType

-- | The raw log event.
data LogEntry

-- | Id of the log entry.
leId :: Lens' LogEntry LogEntryId

-- | The type of the log entry.
leType :: Lens' LogEntry LogEntryType

-- | Time at which the log entry was created.
leCreatedAt :: Lens' LogEntry Date

-- | Optional field containing an action note, if one was included with the
--   action.
leNote :: Lens' LogEntry (Maybe Text)

-- | Only for assign, escalate log entries. The user to which the incident
--   is assigned.
leAssignedUser :: Lens' LogEntry (Maybe User)

-- | Representation of the means by which the action was channeled and the
--   possible perfomer of this action.
leChannel :: Lens' LogEntry Channel

-- | Notify log entries correspond to notifications sent to users. They
--   have a distinct format from action log entries.
data NotifyEntry

-- | Time at which the log entry was created
neCreatedAt :: Lens' NotifyEntry UTCTime

-- | User who was notified
neUser :: Lens' NotifyEntry User

-- | Object representing the notification itself
neNotification :: Lens' NotifyEntry Notification
data NotificationType
SMS :: NotificationType
Email :: NotificationType
Phone :: NotificationType
IosPushNotification :: NotificationType
data NotificationStatus
Success :: NotificationStatus
Blocked :: NotificationStatus
Busy :: NotificationStatus
Failed :: NotificationStatus
NoAnswer :: NotificationStatus
BadAddress :: NotificationStatus
data Notification

-- | Type of notification.
nType :: Lens' Notification NotificationType

-- | The current status of the notification.
nStatus :: Lens' Notification NotificationStatus

-- | The address to which the notification was sent. I.e., an email
--   address, phone number, or iPhone name.
nAddress :: Lens' Notification Address
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.LogEntries.GetLog
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.LogEntries.GetLog
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.GetLog
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.LogEntries.GetLog
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.GetLog
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.GetLog
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.LogEntries.ListLogs
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.LogEntries.ListLogs
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.ListLogs
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.LogEntries.ListLogs
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.ListLogs
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.ListLogs
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.LogEntries.ListLogs
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.Entry
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.Entry
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.NotifyEntry
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.NotifyEntry
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.NotifyEntry
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.NotifyEntry
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.Notification
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.Notification
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.Notification
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.Notification
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.NotificationStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.NotificationStatus
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.LogEntries.NotificationStatus
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.NotificationStatus
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.NotificationStatus
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.NotificationType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.NotificationType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.LogEntries.NotificationType
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.NotificationType
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.NotificationType
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.LogEntry
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.LogEntry
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.LogEntry
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.LogEntryType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.LogEntryType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.LogEntries.LogEntryType
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.LogEntryType
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.LogEntryType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.Channel
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.Channel
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.Channel
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.WebTriggerChannel
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.WebTriggerChannel
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.WebTriggerChannel
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.WebTriggerChannel
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.EmailChannel
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.EmailChannel
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.EmailChannel
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.EmailChannel
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.EmailType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.EmailType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.LogEntries.EmailType
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.EmailType
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.EmailType
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.APIChannel
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.APIChannel
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.APIChannel
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.APIChannel
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.LogEntries.NagiosChannel
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.LogEntries.NagiosChannel
instance GHC.Show.Show Network.PagerDuty.REST.LogEntries.NagiosChannel
instance GHC.Classes.Eq Network.PagerDuty.REST.LogEntries.NagiosChannel


-- | The Incident Notes API allows you to add notes to a specified
--   incident.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/notes</a>
module Network.PagerDuty.REST.Incidents.Notes

-- | List existing notes for the specified incident.
--   
--   <pre>
--   GET /incidents/:incident_id/notes
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/notes/create</a>
listNotes :: IncidentId -> Request Empty s [Note]
data CreateNote

-- | Create a new note for the specified incident.
--   
--   <pre>
--   POST /incidents/:incident_id/notes
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/incidents/notes/create</a>
createNote :: IncidentId -> RequesterId -> Request CreateNote s Note

-- | A version of <a>createNote</a> which uses HTTP Basic authentication
--   and doesn't require a <a>RequesterId</a>.
createNoteBasic :: IncidentId -> Request CreateNote s Note

-- | The note content.
cnContent :: Lens' (Request CreateNote s b) (Maybe Text)
data Note
nId :: Lens' Note NoteId
nCreatedAt :: Lens' Note UTCTime
nUser :: Lens' Note User
nContent :: Lens' Note Text
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.Notes.CreateNote
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Incidents.Notes.CreateNote
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Notes.CreateNote
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Notes.CreateNote
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Incidents.Notes.Note
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Incidents.Notes.Note
instance GHC.Show.Show Network.PagerDuty.REST.Incidents.Notes.Note
instance GHC.Classes.Eq Network.PagerDuty.REST.Incidents.Notes.Note


-- | This API lets you access and manipulate escalation rules of an
--   existing escalation policy.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules</a>
module Network.PagerDuty.REST.EscalationPolicies.EscalationRules

-- | List all the escalation rules for an existing escalation policy.
--   
--   <pre>
--   GET /escalation_policies/:escalation_policy_id/escalation_rules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/list</a>
listRules :: EscalationPolicyId -> Request Empty s [Rule]
data CreateRule

-- | Creates a new escalation rule for an escalation policy and appends it
--   to the end of the existing escalation rules.
--   
--   <pre>
--   POST /escalation_policies/:escalation_policy_id/escalation_rules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/create</a>
createRule :: EscalationPolicyId -> Int -> [TargetId] -> Request CreateRule s Rule

-- | The escalation timeout in minutes. Must be at least 5 if the rule has
--   multiple targets, and at least 1 if not. If an incident is not
--   acknowledged within this timeout then it will escalate onto the next
--   escalation rule.
crEscalationDelayInMinutes :: Lens' CreateRule Int

-- | The list of the targets an incident should be assigned to upon
--   reaching this rule.
crTargets :: Lens' CreateRule [TargetId]

-- | Show the escalation rule for an existing escalation policy.
--   
--   <pre>
--   GET /escalation_policies/:escalation_policy_id/escalation_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/show</a>
getRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Rule
data UpdateRules

-- | Updates the entire collection of escalation rules for an existing
--   escalation policy. The ordering is determined by the positions of each
--   rule in the list. To create a new rule, add it to the list without an
--   id. To remove a rule, do not include it in the list.
--   
--   <pre>
--   PUT /escalation_policies/:escalation_policy_id/escalation_rules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/multi_update</a>
updateRules :: EscalationPolicyId -> [TargetId] -> Request UpdateRules s [Rule]

-- | An ordered array of escalation rules.
urEscalationRules :: Iso' UpdateRules [TargetId]
data UpdateRule

-- | Updates an escalation rule.
--   
--   <pre>
--   PUT /escalation_policies/:escalation_policy_id/escalation_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/update</a>
updateRule :: EscalationPolicyId -> EscalationRuleId -> Request UpdateRule s Rule

-- | The escalation timeout in minutes. Must be at least 5 if the rule has
--   multiple targets, and at least 1 if not. If an incident is not
--   acknowledged within this timeout then it will escalate onto the next
--   escalation rule.
urEscalationDelayInMinutes :: Lens' UpdateRule (Maybe Int)

-- | The list of the targets an incident should be assigned to upon
--   reaching this rule.
urTargets :: Lens' UpdateRule [TargetId]

-- | Deletes an existing escalation rule that belongs to an escalation
--   policy. There must be a matching rule.
--   
--   <pre>
--   DELETE /escalation_policies/:escalation_policy_id/escalation_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/delete</a>
deleteRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Empty
class HasUserInfo a
userInfo :: HasUserInfo a => Lens' a UserInfo

-- | The id of the user.
uId :: HasUserInfo a => Lens' a UserId

-- | The name of the user.
uName :: HasUserInfo a => Lens' a Text

-- | The user's email address.
uEmail :: HasUserInfo a => Lens' a Address

-- | The color used to represent the user in schedules.
uColor :: HasUserInfo a => Lens' a Text

-- | The user's personal time zone.
uTimeZone :: HasUserInfo a => Lens' a TimeZone
data Target
TSchedule :: ScheduleTarget -> Target
TUser :: UserInfo -> Target
_TSchedule :: Prism' Target ScheduleTarget
_TUser :: Prism' Target UserInfo
data ScheduleTarget

-- | The id of the target.
stId :: Lens' ScheduleTarget ScheduleId

-- | The name of the target.
stName :: Lens' ScheduleTarget Text
data Rule

-- | The ID of the escalation rule.
rId :: Lens' Rule EscalationRuleId

-- | The amount of time before an incident escalates away from this rule.
rEscalationDelayInMinutes :: Lens' Rule Int

-- | A list of targets which an incident will be assigned to upon reaching
--   this rule.
rTargets :: Lens' Rule [Target]
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRule
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRule
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRules
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRules
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRules
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRules
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.UpdateRules
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.CreateRule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.CreateRule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.EscalationRules.CreateRule
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.CreateRule
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.CreateRule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Rule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Rule
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Rule
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Rule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Target
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Target
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Target
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.Target
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.ScheduleTarget
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.ScheduleTarget
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.ScheduleTarget
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.ScheduleTarget
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetId
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetId
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetId
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetId
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.EscalationRules.TargetType


-- | This API lets you access and manipulate escalation policies and rules.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies</a>
module Network.PagerDuty.REST.EscalationPolicies
data ListPolicies

-- | List all the existing escalation policies.
--   
--   <pre>
--   GET /escalation_policies
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/list</a>
listPolicies :: Request ListPolicies s [Policy]

-- | Filters the result, showing only the escalation policies whose names
--   match the query.
lpQuery :: Lens' (Request ListPolicies s b) (Maybe Text)

-- | List all the existing escalation policies with currently on-call
--   users.
--   
--   If the start and end of an on-call object are null, then the user is
--   always on-call for an escalation policy level.
--   
--   <pre>
--   GET /escalation_policies/on_call
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call</a>
listOnCallPolicies :: Request ListPolicies s [Policy]
data CreatePolicy

-- | Creates an existing escalation policy and rules.
--   
--   <pre>
--   POST /escalation_policies
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/create</a>
createPolicy :: EscalationPolicyId -> Text -> [Rule] -> Request CreatePolicy s Policy

-- | The name of the escalation policy.
cpName :: Lens' (Request CreatePolicy s b) Text

-- | Whether or not to allow this policy to repeat its escalation rules
--   after the last rule is finished.
--   
--   <i>Default:</i> false.
cpRepeatEnabled :: Lens' (Request CreatePolicy s b) Bool

-- | The number of times to loop over the set of rules in this escalation
--   policy.
cpNumLoops :: Lens' (Request CreatePolicy s b) (Maybe Int)

-- | The escalation rules for this policy.
cpEscalationRules :: Lens' (Request CreatePolicy s b) [Rule]

-- | Get information about an existing escalation policy and its rules.
--   
--   <pre>
--   GET /escalation_policies/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/show</a>
getPolicy :: EscalationPolicyId -> Request Empty s Policy
data UpdatePolicy

-- | Updates an existing escalation policy and rules.
--   
--   <pre>
--   PUT /escalation_policies/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/update</a>
updatePolicy :: EscalationPolicyId -> Request UpdatePolicy s Policy

-- | The name of the escalation policy.
upName :: Lens' (Request UpdatePolicy s b) (Maybe Text)

-- | Whether or not to allow this policy to repeat its escalation rules
--   after the last rule is finished.
upRepeatEnabled :: Lens' (Request UpdatePolicy s b) (Maybe Bool)

-- | The number of times to loop over the set of rules in this escalation
--   policy.
upNumLoops :: Lens' (Request UpdatePolicy s b) (Maybe Int)

-- | The escalation rules for this policy.
upEscalationRules :: Lens' (Request UpdatePolicy s b) [Rule]

-- | Deletes an existing escalation policy and rules. The escalation policy
--   must not be in use by any services.
--   
--   <pre>
--   DELETE /escalation_policies/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/escalation_policies/delete</a>
deletePolicy :: EscalationPolicyId -> Request Empty s Empty
data Policy

-- | The ID of the escalation policy.
pId :: Lens' Policy EscalationPolicyId

-- | The name of the escalation policy.
pName :: Lens' Policy Text

-- | The number of times the escalation policy will repeat after reaching
--   the end of its escalation.
pNumLoops :: Lens' Policy Int

-- | A list of the policy's escalation rules in order of escalation.
pRules :: Lens' Policy [Rule]

-- | A list of services using this escalation policy.
pServices :: Lens' Policy [Service]
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.UpdatePolicy
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.UpdatePolicy
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.UpdatePolicy
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.UpdatePolicy
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.UpdatePolicy
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.CreatePolicy
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.CreatePolicy
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.CreatePolicy
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.CreatePolicy
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.CreatePolicy
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.EscalationPolicies.ListPolicies
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.EscalationPolicies.Policy
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.EscalationPolicies.Policy
instance GHC.Show.Show Network.PagerDuty.REST.EscalationPolicies.Policy
instance GHC.Classes.Eq Network.PagerDuty.REST.EscalationPolicies.Policy


-- | When an incident is triggered or when it is escalated it creates an
--   alert (also known as a notification). Alerts are messages containing
--   the details of the incident, and can be sent through SMS, email, phone
--   calls, and push notifications.
--   
--   This API allows you to access read-only data regarding what alerts
--   have been sent to your users.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/alerts</a>
module Network.PagerDuty.REST.Alerts
data ListAlerts

-- | List existing alerts for a given time range, optionally filtered by
--   type (SMS, Email, Phone, or Push).
--   
--   <pre>
--   GET /alerts
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/alerts/list</a>
listAlerts :: Date -> Date -> Request ListAlerts s [Alert]

-- | The start of the date range over which you want to search.
laSince :: Lens' (Request ListAlerts s b) UTCTime

-- | The end of the date range over which you want to search. This should
--   be in the same format as <tt>since</tt>.
--   
--   The size of the date range must be less than 3 months.
laUntil :: Lens' (Request ListAlerts s b) UTCTime

-- | Returns only the alerts of the said <a>AlertType</a> type.
laFilter :: Lens' (Request ListAlerts s b) (Maybe AlertType)

-- | Time zone in which dates in the result will be rendered.
--   
--   <i>Default:</i> account time zone.
laTimeZone :: Lens' (Request ListAlerts s b) (Maybe TimeZone)
data AlertType
SMS :: AlertType
Email :: AlertType
Phone :: AlertType
Push :: AlertType
data Alert
alertId :: Lens' Alert AlertId
alertType :: Lens' Alert AlertType
alertStartedAt :: Lens' Alert Date
alertUser :: Lens' Alert User
alertAddress :: Lens' Alert Address
instance Generics.SOP.Universe.Generic Network.PagerDuty.REST.Alerts.ListAlerts
instance Generics.SOP.Universe.HasDatatypeInfo Network.PagerDuty.REST.Alerts.ListAlerts
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Alerts.ListAlerts
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Alerts.ListAlerts
instance GHC.Show.Show Network.PagerDuty.REST.Alerts.ListAlerts
instance GHC.Classes.Eq Network.PagerDuty.REST.Alerts.ListAlerts
instance Network.PagerDuty.Internal.Types.Paginate Network.PagerDuty.REST.Alerts.ListAlerts
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Alerts.Alert
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Alerts.Alert
instance GHC.Show.Show Network.PagerDuty.REST.Alerts.Alert
instance GHC.Classes.Eq Network.PagerDuty.REST.Alerts.Alert
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Alerts.AlertType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Alerts.AlertType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Alerts.AlertType
instance GHC.Show.Show Network.PagerDuty.REST.Alerts.AlertType
instance GHC.Classes.Eq Network.PagerDuty.REST.Alerts.AlertType


-- | Contact methods describe the various channels (phone numbers, SMS
--   numbers and email addresses) used to contact a user when an incident
--   is assigned to the user.
--   
--   Access and manipulate the contact methods for a user.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods</a>
module Network.PagerDuty.REST.Users.ContactMethods

-- | List existing contact methods for the specified user.
--   
--   <pre>
--   GET /users/:user_id/contact_methods
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods/list</a>
listContacts :: UserId -> Request Empty s [Contact]
data CreateContact

-- | Create a new contact method for a given user. A contact method can be
--   one of the following types: SMS, email, and phone. push_notification
--   contact methods cannot be created using this API, they are added
--   automatically during device registration.
--   
--   <pre>
--   POST /users/:user_id/contact_methods
--   </pre>
--   
--   <i>Note:</i> The contact info must be unique.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods/create</a>
createContact :: UserId -> ContactType -> Address -> Request CreateContact s Contact

-- | The type of the contact method.
ccType :: Lens' (Request CreateContact s b) ContactType

-- | The id of the contact method. For <a>SMS</a> and <a>Phone</a> it is
--   the number, and for <a>Email</a> it is the email address.
ccAddress :: Lens' (Request CreateContact s b) Address

-- | The number code for your country. Not used for <a>Email</a>.
--   
--   <i>Default:</i> 1
ccCountryCode :: Lens' (Request CreateContact s b) (Maybe Int)

-- | A human friendly label for the contact method.
--   
--   <i>Example:</i> "Home Phone", "Work Email", etc.
--   
--   <i>Default:</i> The type of the contact method and the address (with
--   country code for phone numbers).
ccLabel :: Lens' (Request CreateContact s b) (Maybe Text)

-- | Send an abbreviated email message instead of the standard email
--   output. Useful for email-to-SMS gateways and email based pagers. Only
--   valid for <a>Email</a> contact methods.
--   
--   <i>Default:</i> false.
ccSendShortEmail :: Lens' (Request CreateContact s b) (Maybe Bool)

-- | Get details for a contact method.
--   
--   <pre>
--   GET /users/:user_id/contact_methods/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods/show</a>
getContact :: UserId -> ContactId -> Request Empty s Contact
data UpdateContact

-- | Update an existing contact method of a given user. Note that you
--   cannot change the type of an existing method.
--   
--   <pre>
--   PUT /users/:user_id/contact_methods/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods/update</a>
updateContact :: UserId -> ContactId -> Request UpdateContact s Contact

-- | The id of the contact method. For <a>SMS</a> and <a>Phone</a> it is
--   the number, and for <a>Email</a> it is the email address.
ucAddress :: Lens' (Request UpdateContact s b) (Maybe Address)

-- | The number code for your country. Not used for <a>Email</a>.
--   
--   <i>Default:</i> 1
ucCountryCode :: Lens' (Request UpdateContact s b) (Maybe Int)

-- | A human friendly label for the contact method.
--   
--   <i>Example:</i> "Home Phone", "Work Email", etc.
--   
--   <i>Default:</i> The type of the contact method and the address (with
--   country code for phone numbers).
ucLabel :: Lens' (Request UpdateContact s b) (Maybe Text)

-- | Send an abbreviated email message instead of the standard email
--   output. Useful for email-to-SMS gateways and email based pagers. Only
--   valid for <a>Email</a> contact methods.
--   
--   <i>Default:</i> false.
ucSendShortEmail :: Lens' (Request UpdateContact s b) (Maybe Bool)

-- | Remove a contact method and any corresponding notification rules.
--   
--   <pre>
--   DELETE /users/:user_id/contact_methods/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/contact_methods/delete</a>
deleteContact :: UserId -> ContactId -> Request Empty s Empty
data ContactType
SMS :: ContactType
Phone :: ContactType
Email :: ContactType
class HasContact c_a2lzu
contact :: HasContact c_a2lzu => Lens' c_a2lzu Contact
cAddress :: HasContact c_a2lzu => Lens' c_a2lzu Address
cBlacklisted :: HasContact c_a2lzu => Lens' c_a2lzu (Maybe Bool')
cCountryCode :: HasContact c_a2lzu => Lens' c_a2lzu (Maybe Int)
cId :: HasContact c_a2lzu => Lens' c_a2lzu ContactId
cLabel :: HasContact c_a2lzu => Lens' c_a2lzu Text
cSendShortEmail :: HasContact c_a2lzu => Lens' c_a2lzu (Maybe Bool')
cType :: HasContact c_a2lzu => Lens' c_a2lzu ContactType
cUserId :: HasContact c_a2lzu => Lens' c_a2lzu UserId
data Contact
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.ContactMethods.UpdateContact
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.ContactMethods.UpdateContact
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.ContactMethods.UpdateContact
instance GHC.Show.Show Network.PagerDuty.REST.Users.ContactMethods.UpdateContact
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.ContactMethods.UpdateContact
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.ContactMethods.CreateContact
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.ContactMethods.CreateContact
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.ContactMethods.CreateContact
instance GHC.Show.Show Network.PagerDuty.REST.Users.ContactMethods.CreateContact
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.ContactMethods.CreateContact
instance Network.PagerDuty.REST.Users.ContactMethods.HasContact Network.PagerDuty.REST.Users.ContactMethods.Contact
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.ContactMethods.Contact
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.ContactMethods.Contact
instance GHC.Show.Show Network.PagerDuty.REST.Users.ContactMethods.Contact
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.ContactMethods.Contact
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.ContactMethods.ContactType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.ContactMethods.ContactType
instance Network.PagerDuty.Internal.Query.QueryValues Network.PagerDuty.REST.Users.ContactMethods.ContactType
instance GHC.Show.Show Network.PagerDuty.REST.Users.ContactMethods.ContactType
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.ContactMethods.ContactType


-- | When a user is assigned an incident, the user's notification rules are
--   used to determine which contact method will be used to alert the user
--   and how long after the incident to do so.
--   
--   Access and manipulate the notification rules for a user.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules</a>
module Network.PagerDuty.REST.Users.NotificationRules

-- | List existing notification rules for the specified user.
--   
--   <pre>
--   GET /users/:user_id/notification_rules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules/list</a>
listRules :: UserId -> Request Empty s Rule
data CreateRule

-- | Create a new notification rule for the specified user.
--   
--   <pre>
--   POST /users/:user_id/notification_rules
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules/create</a>
createRule :: UserId -> ContactId -> Int -> Request CreateRule s Rule

-- | Number of minutes it will take for the notification rule to be
--   activated (from the time the incident is assigned to the owning user)
--   and an alert be fired.
crStartDelayInMinutes :: Lens' (Request CreateRule s b) Int

-- | The id of the contact method.
crContactMethodId :: Lens' (Request CreateRule s b) ContactId

-- | Get details for a notification rule.
--   
--   <pre>
--   GET /users/:user_id/notification_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules/show</a>
getRule :: UserId -> NotificationRuleId -> Request Empty s Rule
data UpdateRule

-- | Update an existing notification rule.
--   
--   <pre>
--   PUT /users/:user_id/notification_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules/update</a>
updateRule :: UserId -> NotificationRuleId -> Request UpdateRule s Rule

-- | Number of minutes it will take for the notification rule to be
--   activated (from the time the incident is assigned to the owning user)
--   and an alert be fired.
urStartDelayInMinutes :: Lens' (Request UpdateRule s b) (Maybe Int)

-- | The id of the contact method.
urContactMethodId :: Lens' (Request UpdateRule s b) (Maybe ContactId)

-- | Remove a notification rule.
--   
--   <pre>
--   DELETE /users/:user_id/notification_rules/:id
--   </pre>
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/users/notification_rules/delete</a>
deleteRule :: UserId -> NotificationRuleId -> Request Empty s Empty
data Rule
rId :: Lens' Rule NotificationRuleId
rStartDelayInMinutes :: Lens' Rule Int
rContactMethod :: Lens' Rule Contact
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.NotificationRules.UpdateRule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.NotificationRules.UpdateRule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.NotificationRules.UpdateRule
instance GHC.Show.Show Network.PagerDuty.REST.Users.NotificationRules.UpdateRule
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.NotificationRules.UpdateRule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.NotificationRules.CreateRule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.NotificationRules.CreateRule
instance Network.HTTP.Types.QueryLike.QueryLike Network.PagerDuty.REST.Users.NotificationRules.CreateRule
instance GHC.Show.Show Network.PagerDuty.REST.Users.NotificationRules.CreateRule
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.NotificationRules.CreateRule
instance Network.PagerDuty.REST.Users.ContactMethods.HasContact Network.PagerDuty.REST.Users.NotificationRules.Rule
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Users.NotificationRules.Rule
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Users.NotificationRules.Rule
instance GHC.Show.Show Network.PagerDuty.REST.Users.NotificationRules.Rule
instance GHC.Classes.Eq Network.PagerDuty.REST.Users.NotificationRules.Rule


-- | Webhooks let you recieve HTTP callbacks when interesting events happen
--   within your PagerDuty account. Details surrounding the interesting
--   event will be sent via HTTP to a URL that you specify.
--   
--   PagerDuty currently supports incident-based webhooks. After adding a
--   webhook URL to a PagerDuty service, the triggering of new incidents on
--   that service will cause outgoing webhook messages to be sent to that
--   URL. In addition, certain interesting changes to an incident's state
--   will cause other types of incident webhook messages to be sent:
--   Generally, any change to the <tt>status</tt> or
--   <tt>assigned_to_user</tt> of an incident will cause an outgoing
--   message to be sent.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/rest/webhooks</a>
module Network.PagerDuty.REST.Webhooks
data WebhookType

-- | Sent when an incident is newly created/triggered.
WTrigger :: WebhookType

-- | Sent when an incident has had its status changed from triggered to
--   acknowledged.
WAcknowledge :: WebhookType

-- | Sent when an incident is unacknowledged due to timeout.
WUnacknowledge :: WebhookType

-- | Sent when an incident has been resolved.
WResolve :: WebhookType

-- | Sent when an incident has been manually reassigned to another user in
--   a different escalation chain.
WAssign :: WebhookType

-- | Sent when an incident has been escalated to another user in the same
--   escalation chain.
WEscalate :: WebhookType

-- | Sent when an incident has been reassigned to another escalation chain.
WDelegate :: WebhookType

-- | <i>Note:</i> As new types of incident actions are supported, new
--   incident webhook message types will be added.
WOther :: Text -> WebhookType
data Webhook

-- | Uniquely identifies this outgoing webhook message; can be used for
--   idempotency when processing the messages.
wId :: Lens' Webhook WebhookId

-- | The webhook message type.
wType :: Lens' Webhook WebhookType

-- | The date/time when the incident changed state.
wCreatedOn :: Lens' Webhook UTCTime
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Webhooks.Webhook
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Webhooks.Webhook
instance Network.PagerDuty.REST.Incidents.HasIncident Network.PagerDuty.REST.Webhooks.Webhook
instance GHC.Show.Show Network.PagerDuty.REST.Webhooks.Webhook
instance GHC.Classes.Eq Network.PagerDuty.REST.Webhooks.Webhook
instance GHC.Show.Show Network.PagerDuty.REST.Webhooks.WebhookType
instance GHC.Classes.Eq Network.PagerDuty.REST.Webhooks.WebhookType
instance Data.ByteString.Conversion.To.ToByteString Network.PagerDuty.REST.Webhooks.WebhookType
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.REST.Webhooks.WebhookType
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.REST.Webhooks.WebhookType

module Network.PagerDuty.REST

-- | <i>See:</i> <a>sendWith</a>
send :: (MonadIO m, FromJSON b) => SubDomain -> Auth s -> Manager -> Request a s b -> m (Either Error b)
sendWith :: (MonadIO m, FromJSON b) => Env s -> Request a s b -> m (Either Error b)

-- | <i>See:</i> <a>paginateWith</a>
paginate :: (MonadIO m, Paginate a, FromJSON b) => SubDomain -> Auth s -> Manager -> Request a s b -> Source m (Either Error b)
paginateWith :: (MonadIO m, Paginate a, FromJSON b) => Env s -> Request a s b -> Source m (Either Error b)

-- | The environment containing the parameters required to make PagerDuty
--   requests.
data Env (s :: Security)
envDomain :: forall s_aD4R. Lens' (Env s_aD4R) SubDomain
envAuth :: forall s s'. Lens (Env s) (Env s') (Auth s) (Auth s')
envManager :: forall s_aD4R. Lens' (Env s_aD4R) Manager
envLogger :: forall s_aD4R. Lens' (Env s_aD4R) Logger

-- | The log level and associated logger function.
data Logger
None :: Logger
Debug :: (Text -> IO ()) -> Logger

-- | Log a message using the debug logger, or if none is specified noop.
debug :: MonadIO m => Logger -> Text -> m ()

-- | Exists primarily to obtain a constraint for the <tt>paginate</tt>
--   function.
class Paginate a
data Request a (s :: Security) b
data Error
_Internal :: Prism' Error Text
_Integration :: Prism' Error IntegrationError
_REST :: Prism' Error RESTError
class HasMessage s a | s -> a

-- | A short human-readable message describing the error.
message :: HasMessage s a => Lens' s a
class HasErrors s a | s -> a

-- | A list of human-readable reasons for the error. These values, and even
--   their format, are subject to change.
errors :: HasErrors s a => Lens' s a
data IntegrationError
status :: Lens' IntegrationError Text
data RESTError
data Code

-- | In the case of an error, the PagerDuty error code can give further
--   details on the nature of the error.
--   
--   <i>See:</i> <a>description</a>
code :: Lens' RESTError Code
description :: Code -> Text
data Security
Basic :: Security
Token :: Security
data Auth (a :: Security)
[AuthBasic] :: ByteString -> ByteString -> Auth  'Basic
[AuthToken] :: ByteString -> Auth  'Token
data Key (a :: Symbol)
mkKey :: Text -> Key a
type ServiceKey = Key "service"
type IncidentKey = Key "incident"
data Id (a :: Symbol)
mkId :: Text -> Id a
type AlertId = Id "alert"
type ContactId = Id "contact"
type EmailFilterId = Id "email-filter"
type EscalationPolicyId = Id "escalation-policy"
type EscalationRuleId = Id "escalation-rule"
type IncidentId = Id "incident"
type LogEntryId = Id "log-entry"
type NoteId = Id "note"
type NotificationRuleId = Id "notification-rule"
type OverrideId = Id "schedule-override"
type RequesterId = Id "requester"
type ScheduleId = Id "schedule"
type ServiceId = Id "service"
type UserId = Id "user"
type VendorId = Id "vendor"
type WebhookId = Id "webhook"
type WindowId = Id "maintenance-window"
data SubDomain
mkSubDomain :: ByteString -> SubDomain
data Address
mkAddress :: Text -> Address
data Empty
Empty :: Empty


-- | The PagerDuty event integration API is how you would add PagerDuty's
--   advanced alerting functionality to any system that can make an HTTP
--   API call. You can now add phone, SMS and email alerting to your
--   monitoring tools, ticketing systems and custom software.
--   
--   The API was designed to allow you to easily integrate a monitoring
--   system with a Service in PagerDuty. Monitoring systems generally send
--   out events when problems are detected and when these problems have
--   been resolved (fixed). Some more advanced systems also understand the
--   concept of acknowledgements: problems can be acknowledged by an
--   engineer to signal he or she is working on fixing the issue.
--   
--   Since monitoring systems emit events, the API is based around
--   accepting events. Incoming events (sent via the API) are routed to a
--   PagerDuty service and processed. They may result in a new incident
--   being created, or an existing incident being acknowledged or resolved.
--   
--   The same event-based API can also be used to integrate a PagerDuty
--   service with ticketing systems and various other software tools.
--   
--   <i>See:</i>
--   <a>http://developer.pagerduty.com/documentation/integration/events</a>
module Network.PagerDuty.Integration

-- | Send an event to the integration API.
submit :: MonadIO m => Manager -> Event -> m (Either Error Response)

-- | <i>See:</i> <a>submit</a>
submitWith :: MonadIO m => Manager -> Logger -> Event -> m (Either Error Response)
data Trigger

-- | Your monitoring tools should send PagerDuty a trigger event to report
--   a new or ongoing problem. When PagerDuty receives a trigger event, it
--   will either open a new incident, or add a new trigger log entry to an
--   existing incident, depending on the provided incident_key.
trigger :: ServiceKey -> IncidentKey -> Text -> Event

-- | The name of the monitoring client that is triggering this event.
client :: Lens' Trigger (Maybe Text)

-- | The URL of the monitoring client that is triggering this event.
clientUrl :: Lens' Trigger (Maybe Text)
type Acknowledge = Generic

-- | Acknowledge events cause the referenced incident to enter the
--   acknowledged state.
--   
--   While an incident is acknowledged, it won't generate any additional
--   notifications, even if it receives new trigger events. Your monitoring
--   tools should send PagerDuty an acknowledge event when they know
--   someone is presently working on the problem.
acknowledge :: ServiceKey -> IncidentKey -> Event
type Resolve = Generic

-- | Resolve events cause the referenced incident to enter the resolved
--   state.
--   
--   Once an incident is resolved, it won't generate any additional
--   notifications. New trigger events with the same incident_key as a
--   resolved incident won't re-open the incident. Instead, a new incident
--   will be created. Your monitoring tools should send PagerDuty a resolve
--   event when the problem that caused the initial trigger event has been
--   fixed.
resolve :: ServiceKey -> IncidentKey -> Event
class HasServiceKey s a | s -> a

-- | The GUID of one of your "Generic API" services. This is the "service
--   key" listed on a Generic API's service detail page.
serviceKey :: HasServiceKey s a => Lens' s a
class HasIncidentKey s a | s -> a

-- | Identifies the incident to which this trigger event should be applied.
--   If there's no open (i.e. unresolved) incident with this key, a new one
--   will be created. If there's already an open incident with a matching
--   key, this event will be appended to that incident's log. The event key
--   provides an easy way to "de-dup" problem reports. If this field isn't
--   provided, PagerDuty will automatically open a new incident with a
--   unique key.
incidentKey :: HasIncidentKey s a => Lens' s a
class HasDescription s a | s -> a

-- | A short description of the problem that led to this trigger. This
--   field (or a truncated version) will be used when generating phone
--   calls, SMS messages and alert emails. It will also appear on the
--   incidents tables in the PagerDuty UI. The maximum length is 1024
--   characters.
description :: HasDescription s a => Lens' s a
class HasDetails s a | s -> a

-- | An arbitrary JSON object containing any data you'd like included in
--   the incident log.
details :: HasDetails s a => Lens' s a
data Event

-- | <i>See:</i> <a>trigger</a>
Trigger :: Trigger -> Event

-- | <i>See:</i> <a>acknowledge</a>
Acknowledge :: Generic -> Event

-- | <i>See:</i> <a>resolve</a>
Resolve :: Generic -> Event
_Trigger :: Prism' Event Trigger
_Acknowledge :: Prism' Event Generic
_Resolve :: Prism' Event Generic
data Response

-- | <tt>success</tt>.
rsStatus :: Lens' Response Text

-- | <tt>Event processed</tt>.
rsMessage :: Lens' Response Text

-- | The key of the incident that will be affected by the request.
rsIncidentKey :: Lens' Response IncidentKey
data Generic

-- | The environment containing the parameters required to make PagerDuty
--   requests.
data Env (s :: Security)
envDomain :: forall s_aD4R. Lens' (Env s_aD4R) SubDomain
envAuth :: forall s s'. Lens (Env s) (Env s') (Auth s) (Auth s')
envManager :: forall s_aD4R. Lens' (Env s_aD4R) Manager
envLogger :: forall s_aD4R. Lens' (Env s_aD4R) Logger

-- | The log level and associated logger function.
data Logger
None :: Logger
Debug :: (Text -> IO ()) -> Logger

-- | Log a message using the debug logger, or if none is specified noop.
debug :: MonadIO m => Logger -> Text -> m ()

-- | Exists primarily to obtain a constraint for the <tt>paginate</tt>
--   function.
class Paginate a
data Request a (s :: Security) b
data Error
_Internal :: Prism' Error Text
_Integration :: Prism' Error IntegrationError
_REST :: Prism' Error RESTError
class HasMessage s a | s -> a

-- | A short human-readable message describing the error.
message :: HasMessage s a => Lens' s a
class HasErrors s a | s -> a

-- | A list of human-readable reasons for the error. These values, and even
--   their format, are subject to change.
errors :: HasErrors s a => Lens' s a
data IntegrationError
status :: Lens' IntegrationError Text
data RESTError
data Code

-- | In the case of an error, the PagerDuty error code can give further
--   details on the nature of the error.
--   
--   <i>See:</i> <a>description</a>
code :: Lens' RESTError Code
description :: Code -> Text
data Security
Basic :: Security
Token :: Security
data Auth (a :: Security)
[AuthBasic] :: ByteString -> ByteString -> Auth  'Basic
[AuthToken] :: ByteString -> Auth  'Token
data Key (a :: Symbol)
mkKey :: Text -> Key a
type ServiceKey = Key "service"
type IncidentKey = Key "incident"
data Id (a :: Symbol)
mkId :: Text -> Id a
type AlertId = Id "alert"
type ContactId = Id "contact"
type EmailFilterId = Id "email-filter"
type EscalationPolicyId = Id "escalation-policy"
type EscalationRuleId = Id "escalation-rule"
type IncidentId = Id "incident"
type LogEntryId = Id "log-entry"
type NoteId = Id "note"
type NotificationRuleId = Id "notification-rule"
type OverrideId = Id "schedule-override"
type RequesterId = Id "requester"
type ScheduleId = Id "schedule"
type ServiceId = Id "service"
type UserId = Id "user"
type VendorId = Id "vendor"
type WebhookId = Id "webhook"
type WindowId = Id "maintenance-window"
data SubDomain
mkSubDomain :: ByteString -> SubDomain
data Address
mkAddress :: Text -> Address
data Empty
Empty :: Empty
instance Network.PagerDuty.Integration.HasServiceKey Network.PagerDuty.Integration.Event Network.PagerDuty.Internal.Types.ServiceKey
instance Network.PagerDuty.Integration.HasIncidentKey Network.PagerDuty.Integration.Event Network.PagerDuty.Internal.Types.IncidentKey
instance Network.PagerDuty.Integration.HasDetails Network.PagerDuty.Integration.Event (GHC.Base.Maybe Data.Aeson.Types.Internal.Object)
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.Integration.Event
instance GHC.Show.Show Network.PagerDuty.Integration.Event
instance GHC.Classes.Eq Network.PagerDuty.Integration.Event
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.Integration.Generic
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.Integration.Generic
instance Network.PagerDuty.Integration.HasServiceKey Network.PagerDuty.Integration.Generic Network.PagerDuty.Internal.Types.ServiceKey
instance Network.PagerDuty.Integration.HasIncidentKey Network.PagerDuty.Integration.Generic Network.PagerDuty.Internal.Types.IncidentKey
instance Network.PagerDuty.Integration.HasDescription Network.PagerDuty.Integration.Generic (GHC.Base.Maybe Data.Text.Internal.Text)
instance Network.PagerDuty.Integration.HasDetails Network.PagerDuty.Integration.Generic (GHC.Base.Maybe Data.Aeson.Types.Internal.Object)
instance GHC.Show.Show Network.PagerDuty.Integration.Generic
instance GHC.Classes.Eq Network.PagerDuty.Integration.Generic
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.Integration.Trigger
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.Integration.Trigger
instance Network.PagerDuty.Integration.HasServiceKey Network.PagerDuty.Integration.Trigger Network.PagerDuty.Internal.Types.ServiceKey
instance Network.PagerDuty.Integration.HasIncidentKey Network.PagerDuty.Integration.Trigger Network.PagerDuty.Internal.Types.IncidentKey
instance Network.PagerDuty.Integration.HasDescription Network.PagerDuty.Integration.Trigger Data.Text.Internal.Text
instance Network.PagerDuty.Integration.HasDetails Network.PagerDuty.Integration.Trigger (GHC.Base.Maybe Data.Aeson.Types.Internal.Object)
instance GHC.Show.Show Network.PagerDuty.Integration.Trigger
instance GHC.Classes.Eq Network.PagerDuty.Integration.Trigger
instance Data.Aeson.Types.ToJSON.ToJSON Network.PagerDuty.Integration.Response
instance Data.Aeson.Types.FromJSON.FromJSON Network.PagerDuty.Integration.Response
instance GHC.Show.Show Network.PagerDuty.Integration.Response
instance GHC.Classes.Eq Network.PagerDuty.Integration.Response

module Control.Monad.Trans.PagerDuty

-- | A convenient alias for <a>PagerDutyT</a> <a>IO</a>.
type PagerDuty s = PagerDutyT s IO
data PagerDutyT s m a
runPagerDutyT :: PagerDutyT s m a -> Env s -> m (Either Error a)
submit :: (MonadIO m, MonadReader (Env s) m, MonadError Error m) => Event -> m Response
submitCatch :: (MonadIO m, MonadReader (Env s) m) => Event -> m (Either Error Response)
send :: (MonadIO m, MonadReader (Env s) m, MonadError Error m, FromJSON b) => Request a s b -> m b
sendCatch :: (MonadIO m, MonadReader (Env s) m, FromJSON b) => Request a s b -> m (Either Error b)
paginate :: (MonadIO m, MonadReader (Env s) m, MonadError Error m, Paginate a, FromJSON b) => Request a s b -> Source m b
paginateCatch :: (MonadIO m, MonadReader (Env s) m, Paginate a, FromJSON b) => Request a s b -> Source m (Either Error b)
hoistError :: (MonadError Error m) => Either Error a -> m a

-- | The environment containing the parameters required to make PagerDuty
--   requests.
data Env (s :: Security)
envDomain :: forall s_aD4R. Lens' (Env s_aD4R) SubDomain
envAuth :: forall s s'. Lens (Env s) (Env s') (Auth s) (Auth s')
envManager :: forall s_aD4R. Lens' (Env s_aD4R) Manager
envLogger :: forall s_aD4R. Lens' (Env s_aD4R) Logger

-- | The log level and associated logger function.
data Logger
None :: Logger
Debug :: (Text -> IO ()) -> Logger

-- | Log a message using the debug logger, or if none is specified noop.
debug :: MonadIO m => Logger -> Text -> m ()

-- | Exists primarily to obtain a constraint for the <tt>paginate</tt>
--   function.
class Paginate a
data Request a (s :: Security) b
data Error
_Internal :: Prism' Error Text
_Integration :: Prism' Error IntegrationError
_REST :: Prism' Error RESTError
class HasMessage s a | s -> a

-- | A short human-readable message describing the error.
message :: HasMessage s a => Lens' s a
class HasErrors s a | s -> a

-- | A list of human-readable reasons for the error. These values, and even
--   their format, are subject to change.
errors :: HasErrors s a => Lens' s a
data IntegrationError
status :: Lens' IntegrationError Text
data RESTError
data Code

-- | In the case of an error, the PagerDuty error code can give further
--   details on the nature of the error.
--   
--   <i>See:</i> <a>description</a>
code :: Lens' RESTError Code
description :: Code -> Text
data Security
Basic :: Security
Token :: Security
data Auth (a :: Security)
[AuthBasic] :: ByteString -> ByteString -> Auth  'Basic
[AuthToken] :: ByteString -> Auth  'Token
data Key (a :: Symbol)
mkKey :: Text -> Key a
type ServiceKey = Key "service"
type IncidentKey = Key "incident"
data Id (a :: Symbol)
mkId :: Text -> Id a
type AlertId = Id "alert"
type ContactId = Id "contact"
type EmailFilterId = Id "email-filter"
type EscalationPolicyId = Id "escalation-policy"
type EscalationRuleId = Id "escalation-rule"
type IncidentId = Id "incident"
type LogEntryId = Id "log-entry"
type NoteId = Id "note"
type NotificationRuleId = Id "notification-rule"
type OverrideId = Id "schedule-override"
type RequesterId = Id "requester"
type ScheduleId = Id "schedule"
type ServiceId = Id "service"
type UserId = Id "user"
type VendorId = Id "vendor"
type WebhookId = Id "webhook"
type WindowId = Id "maintenance-window"
data SubDomain
mkSubDomain :: ByteString -> SubDomain
data Address
mkAddress :: Text -> Address
data Empty
Empty :: Empty
instance GHC.Base.Monad m => Control.Monad.Error.Class.MonadError Network.PagerDuty.Internal.Types.Error (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader (Network.PagerDuty.Internal.Types.Env s) (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance GHC.Base.Monad m => GHC.Base.Monad (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance GHC.Base.Monad m => GHC.Base.Applicative (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance GHC.Base.Functor m => GHC.Base.Functor (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.Trans.Class.MonadTrans (Control.Monad.Trans.PagerDuty.PagerDutyT s)
instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.Trans.Control.MonadTransControl (Control.Monad.Trans.PagerDuty.PagerDutyT s)
instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (Control.Monad.Trans.PagerDuty.PagerDutyT s m)
instance Control.Monad.Morph.MFunctor (Control.Monad.Trans.PagerDuty.PagerDutyT s)
instance Control.Monad.Morph.MMonad (Control.Monad.Trans.PagerDuty.PagerDutyT s)
