alerta-0.1.0.6: Bindings to the alerta REST API

Safe HaskellNone
LanguageHaskell2010

Alerta

Contents

Description

The alerta API allows you to query and modify

  • Alerts
  • Environments
  • Services
  • Blackouts
  • Heartbeats
  • API Keys
  • Users
  • Customers

Synopsis

Bindings

Alerts

Alert history and alert queries

listAlerts Source #

Arguments

:: Maybe ApiKey 
-> Maybe QueryString

this is a JSON document describing a Mongo query see http://docs.mongodb.org/manual/reference/operator/query/

-> [UUID] 
-> IsRepeat 
-> [FieldQuery] 
-> Maybe [AlertAttr]

alert attributes to show

-> Maybe [AlertAttr]

alert attributes to hide

-> Maybe ShouldReverse 
-> [AlertAttr] 
-> Maybe PageNo 
-> Maybe Limit 
-> ClientM AlertsResp 

Environments

Services

Blackouts

Heartbeats

API keys

Users

Customers

Types

General domain terms

type Tag = Text Source #

type UUID = Text Source #

type Href = Text Source #

Query and sorting options

type ShouldReverse Source #

Arguments

 = Bool

whether to reverse the order of a sort

type Limit Source #

Arguments

 = Int

maximum number of results to return (actually a positive int)

type PageNo Source #

Arguments

 = Int

what page of the results to return (actually a positive int)

type QueryString = Text Source #

This is a JSON document describing a Mongo query, see http://docs.mongodb.org/manual/reference/operator/query/

type IsRepeat = Bool Source #

true for duplicate, false if an alert is correlated (in which case alerta appends an item to the history)

Field queries

data MatchType Source #

Matches can be either literal or regular expressions. n.b. regexes are case-insensitive and are not anchored, i.e. no need to write .*regex.*

Constructors

Regex 
Literal 

(=.) :: QueryAttr -> Text -> FieldQuery Source #

Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.

(!=) :: QueryAttr -> Text -> FieldQuery Source #

Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.

(~.) :: QueryAttr -> Text -> FieldQuery Source #

Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.

(!~) :: QueryAttr -> Text -> FieldQuery Source #

Convenient syntax for the four types of field queries viz. literal, negated literal, regex, negated regex.

Generic response

data Resp Source #

This type is used for basic responses that have no content beyond whether they succeeded or failed with an error message.

Constructors

OkResp 
ErrorResp 

Fields

Instances

Eq Resp Source # 

Methods

(==) :: Resp -> Resp -> Bool #

(/=) :: Resp -> Resp -> Bool #

Show Resp Source # 

Methods

showsPrec :: Int -> Resp -> ShowS #

show :: Resp -> String #

showList :: [Resp] -> ShowS #

Generic Resp Source # 

Associated Types

type Rep Resp :: * -> * #

Methods

from :: Resp -> Rep Resp x #

to :: Rep Resp x -> Resp #

FromJSON Resp Source # 
ToJSON Resp Source # 
type Rep Resp Source # 
type Rep Resp = D1 (MetaData "Resp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkResp" PrefixI False) U1) (C1 (MetaCons "ErrorResp" PrefixI True) (S1 (MetaSel (Just Symbol "respMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Alerts

data Severity Source #

Alert severity

Constructors

Unknown 
Trace

8 (grey)

Debug

7 (purple)

Informational

6 (green)

Ok

5 (green)

Normal

5 (green)

Cleared

5 (green)

Indeterminate

5 (silver)

Warning

4 (blue)

Minor

3 (yellow)

Major

2 (orange)

Critical

1 (red)

Security

0 (black)

Instances

Bounded Severity Source # 
Enum Severity Source # 
Eq Severity Source # 
Ord Severity Source # 
Read Severity Source # 
Show Severity Source # 
Ix Severity Source # 
Generic Severity Source # 

Associated Types

type Rep Severity :: * -> * #

Methods

from :: Severity -> Rep Severity x #

to :: Rep Severity x -> Severity #

FromJSON Severity Source # 
FromJSONKey Severity Source # 
ToJSON Severity Source # 
ToJSONKey Severity Source # 
ToHttpApiData Severity Source # 
type Rep Severity Source # 
type Rep Severity = D1 (MetaData "Severity" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "Unknown" PrefixI False) U1) ((:+:) (C1 (MetaCons "Trace" PrefixI False) U1) (C1 (MetaCons "Debug" PrefixI False) U1))) ((:+:) (C1 (MetaCons "Informational" PrefixI False) U1) ((:+:) (C1 (MetaCons "Ok" PrefixI False) U1) (C1 (MetaCons "Normal" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "Cleared" PrefixI False) U1) ((:+:) (C1 (MetaCons "Indeterminate" PrefixI False) U1) (C1 (MetaCons "Warning" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "Minor" PrefixI False) U1) (C1 (MetaCons "Major" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Critical" PrefixI False) U1) (C1 (MetaCons "Security" PrefixI False) U1)))))

data Status Source #

Status of an alert.

Constructors

OpenStatus

status code 1

AssignStatus

status code 2

AckStatus

status code 3

ClosedStatus

status code 4

ExpiredStatus

status code 5

UnknownStatus

status code 9

Instances

Bounded Status Source # 
Enum Status Source # 
Eq Status Source # 

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Ord Status Source # 
Read Status Source # 
Show Status Source # 
Ix Status Source # 
Generic Status Source # 

Associated Types

type Rep Status :: * -> * #

Methods

from :: Status -> Rep Status x #

to :: Rep Status x -> Status #

FromJSON Status Source # 
FromJSONKey Status Source # 
ToJSON Status Source # 
ToJSONKey Status Source # 
ToHttpApiData Status Source # 
type Rep Status Source # 
type Rep Status = D1 (MetaData "Status" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) ((:+:) (C1 (MetaCons "OpenStatus" PrefixI False) U1) ((:+:) (C1 (MetaCons "AssignStatus" PrefixI False) U1) (C1 (MetaCons "AckStatus" PrefixI False) U1))) ((:+:) (C1 (MetaCons "ClosedStatus" PrefixI False) U1) ((:+:) (C1 (MetaCons "ExpiredStatus" PrefixI False) U1) (C1 (MetaCons "UnknownStatus" PrefixI False) U1))))

data TrendIndication Source #

Instances

Bounded TrendIndication Source # 
Enum TrendIndication Source # 
Eq TrendIndication Source # 
Ord TrendIndication Source # 
Show TrendIndication Source # 
Ix TrendIndication Source # 
Generic TrendIndication Source # 
FromJSON TrendIndication Source # 
ToJSON TrendIndication Source # 
FromHttpApiData TrendIndication Source # 
type Rep TrendIndication Source # 
type Rep TrendIndication = D1 (MetaData "TrendIndication" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "NoChange" PrefixI False) U1) ((:+:) (C1 (MetaCons "LessSevere" PrefixI False) U1) (C1 (MetaCons "MoreSevere" PrefixI False) U1)))

data Alert Source #

Data required to create (post) an alert.

Constructors

Alert 

Fields

Instances

Eq Alert Source # 

Methods

(==) :: Alert -> Alert -> Bool #

(/=) :: Alert -> Alert -> Bool #

Show Alert Source # 

Methods

showsPrec :: Int -> Alert -> ShowS #

show :: Alert -> String #

showList :: [Alert] -> ShowS #

Generic Alert Source # 

Associated Types

type Rep Alert :: * -> * #

Methods

from :: Alert -> Rep Alert x #

to :: Rep Alert x -> Alert #

FromJSON Alert Source # 
ToJSON Alert Source # 
type Rep Alert Source # 
type Rep Alert = D1 (MetaData "Alert" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "Alert" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Resource)) (S1 (MetaSel (Just Symbol "alertEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event))) ((:*:) (S1 (MetaSel (Just Symbol "alertEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Environment))) (S1 (MetaSel (Just Symbol "alertSeverity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Severity))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertCorrelate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Event]))) (S1 (MetaSel (Just Symbol "alertStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Status)))) ((:*:) (S1 (MetaSel (Just Symbol "alertService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Service]))) ((:*:) (S1 (MetaSel (Just Symbol "alertGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Group))) (S1 (MetaSel (Just Symbol "alertValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Value))))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "alertTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Tag])))) ((:*:) (S1 (MetaSel (Just Symbol "alertAttributes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Map Text Text)))) (S1 (MetaSel (Just Symbol "alertOrigin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Origin))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AlertType))) (S1 (MetaSel (Just Symbol "alertCreateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe UTCTime)))) ((:*:) (S1 (MetaSel (Just Symbol "alertTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) ((:*:) (S1 (MetaSel (Just Symbol "alertRawData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "alertCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName)))))))))

mkAlert :: Resource -> Event -> Service -> Alert Source #

Create an alert with just the mandatory fields.

data AlertInfo Source #

Data returned from the server about an alert

Instances

Eq AlertInfo Source # 
Show AlertInfo Source # 
Generic AlertInfo Source # 

Associated Types

type Rep AlertInfo :: * -> * #

FromJSON AlertInfo Source # 
ToJSON AlertInfo Source # 
type Rep AlertInfo Source # 
type Rep AlertInfo = D1 (MetaData "AlertInfo" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "AlertInfo" PrefixI True) ((:*:) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Resource)) (S1 (MetaSel (Just Symbol "alertInfoEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Environment)) (S1 (MetaSel (Just Symbol "alertInfoSeverity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Severity)))) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoCorrelate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Event])) (S1 (MetaSel (Just Symbol "alertInfoStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Status)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Service])) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Group)) (S1 (MetaSel (Just Symbol "alertInfoValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "alertInfoTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag]))) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoAttributes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Text Text))) (S1 (MetaSel (Just Symbol "alertInfoOrigin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Origin)))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 AlertType)) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoCreateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "alertInfoTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoRawData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "alertInfoCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName)))) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoDuplicateCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Int))) (S1 (MetaSel (Just Symbol "alertInfoRepeat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Bool)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoPreviousSeverity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Severity))) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoTrendIndication") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe TrendIndication))) (S1 (MetaSel (Just Symbol "alertInfoReceiveTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoLastReceiveId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe UUID))) (S1 (MetaSel (Just Symbol "alertInfoLastReceiveTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime))) ((:*:) (S1 (MetaSel (Just Symbol "alertInfoHistory") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [HistoryItem])) (S1 (MetaSel (Just Symbol "alertInfoHref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Href))))))))

data AlertAttr Source #

Alert attributes, used for sorting, grouping and for field-based queries

Instances

Enum AlertAttr Source # 
Eq AlertAttr Source # 
Show AlertAttr Source # 
IsString AlertAttr Source # 
Generic AlertAttr Source # 

Associated Types

type Rep AlertAttr :: * -> * #

FromJSON AlertAttr Source # 
ToJSON AlertAttr Source # 
ToHttpApiData AlertAttr Source # 
type Rep AlertAttr Source # 
type Rep AlertAttr = D1 (MetaData "AlertAttr" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "IdAlertAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "ResourceAlertAttr" PrefixI False) U1) (C1 (MetaCons "EventAlertAttr" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "EnvironmentAlertAttr" PrefixI False) U1) (C1 (MetaCons "SeverityAlertAttr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "CorrelateAlertAttr" PrefixI False) U1) (C1 (MetaCons "StatusAlertAttr" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "ServiceAlertAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "GroupAlertAttr" PrefixI False) U1) (C1 (MetaCons "ValueAlertAttr" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "TextAlertAttr" PrefixI False) U1) (C1 (MetaCons "TagsAlertAttr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "AttributesAlertAttr" PrefixI False) U1) (C1 (MetaCons "OriginAlertAttr" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TypeAlertAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "CreateTimeAlertAttr" PrefixI False) U1) (C1 (MetaCons "TimeoutAlertAttr" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "RawDataAlertAttr" PrefixI False) U1) (C1 (MetaCons "CustomerAlertAttr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "DuplicateCountAlertAttr" PrefixI False) U1) (C1 (MetaCons "RepeatAlertAttr" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "PreviousSeverityAlertAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "TrendIndicationAlertAttr" PrefixI False) U1) (C1 (MetaCons "ReceiveTimeAlertAttr" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LastReceiveIdAlertAttr" PrefixI False) U1) (C1 (MetaCons "LastReceiveTimeAlertAttr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "HistoryAlertAttr" PrefixI False) U1) (C1 (MetaCons "HrefAlertAttr" PrefixI False) U1))))))

data QueryAttr Source #

These are the valid keys for use in field queries.

NB no id, repeat or duplicateCount as these have special handling.

Instances

Enum QueryAttr Source # 
Eq QueryAttr Source # 
Show QueryAttr Source # 
IsString QueryAttr Source # 
Generic QueryAttr Source # 

Associated Types

type Rep QueryAttr :: * -> * #

ToHttpApiData QueryAttr Source # 
type Rep QueryAttr Source # 
type Rep QueryAttr = D1 (MetaData "QueryAttr" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "EventQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "EnvironmentQueryAttr" PrefixI False) U1) (C1 (MetaCons "SeverityQueryAttr" PrefixI False) U1))) ((:+:) (C1 (MetaCons "CorrelateQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "StatusQueryAttr" PrefixI False) U1) (C1 (MetaCons "ServiceQueryAttr" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "GroupQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "ValueQueryAttr" PrefixI False) U1) (C1 (MetaCons "TextQueryAttr" PrefixI False) U1))) ((:+:) (C1 (MetaCons "TagsQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "AttributesQueryAttr" PrefixI False) U1) (C1 (MetaCons "OriginQueryAttr" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "TypeQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "CreateTimeQueryAttr" PrefixI False) U1) (C1 (MetaCons "TimeoutQueryAttr" PrefixI False) U1))) ((:+:) (C1 (MetaCons "RawDataQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "CustomerQueryAttr" PrefixI False) U1) (C1 (MetaCons "RepeatQueryAttr" PrefixI False) U1)))) ((:+:) ((:+:) (C1 (MetaCons "PreviousSeverityQueryAttr" PrefixI False) U1) ((:+:) (C1 (MetaCons "TrendIndicationQueryAttr" PrefixI False) U1) (C1 (MetaCons "ReceiveTimeQueryAttr" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LastReceiveIdQueryAttr" PrefixI False) U1) (C1 (MetaCons "LastReceiveTimeQueryAttr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "HistoryQueryAttr" PrefixI False) U1) (C1 (MetaCons "HrefQueryAttr" PrefixI False) U1))))))

data HistoryItem Source #

Instances

Eq HistoryItem Source # 
Show HistoryItem Source # 
Generic HistoryItem Source # 

Associated Types

type Rep HistoryItem :: * -> * #

FromJSON HistoryItem Source # 
ToJSON HistoryItem Source # 
type Rep HistoryItem Source # 
type Rep HistoryItem = D1 (MetaData "HistoryItem" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "StatusHistoryItem" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "historyItemEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)) (S1 (MetaSel (Just Symbol "historyItemStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Status))) ((:*:) (S1 (MetaSel (Just Symbol "historyItemText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "historyItemId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) (S1 (MetaSel (Just Symbol "historyItemUpdateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)))))) (C1 (MetaCons "SeverityHistoryItem" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "historyItemEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)) ((:*:) (S1 (MetaSel (Just Symbol "historyItemSeverity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Severity)) (S1 (MetaSel (Just Symbol "historyItemText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))) ((:*:) (S1 (MetaSel (Just Symbol "historyItemId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "historyItemUpdateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "historyItemValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)))))))

data ExtendedHistoryItem Source #

When performing an alert history query an enriched version of the alert history is returned with extra fields.

Instances

Eq ExtendedHistoryItem Source # 
Show ExtendedHistoryItem Source # 
Generic ExtendedHistoryItem Source # 
FromJSON ExtendedHistoryItem Source # 
ToJSON ExtendedHistoryItem Source # 
type Rep ExtendedHistoryItem Source # 
type Rep ExtendedHistoryItem = D1 (MetaData "ExtendedHistoryItem" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "StatusExtendedHistoryItem" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Resource)) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)))) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Environment)) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Status)) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Service]))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Group)) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemAttributes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Text Text))) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemOrigin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Origin))) ((:*:) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemUpdateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "statusExtendedHistoryItemCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName)))))))) (C1 (MetaCons "SeverityExtendedHistoryItem" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Resource)) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Event)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Environment)) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemSeverity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Severity))) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Service])) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Group))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemValue") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemAttributes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map Text Text))) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemOrigin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Origin))) ((:*:) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemUpdateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "severityExtendedHistoryItemCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName)))))))))

newtype Tags Source #

Constructors

Tags 

Fields

Instances

Eq Tags Source # 

Methods

(==) :: Tags -> Tags -> Bool #

(/=) :: Tags -> Tags -> Bool #

Show Tags Source # 

Methods

showsPrec :: Int -> Tags -> ShowS #

show :: Tags -> String #

showList :: [Tags] -> ShowS #

Generic Tags Source # 

Associated Types

type Rep Tags :: * -> * #

Methods

from :: Tags -> Rep Tags x #

to :: Rep Tags x -> Tags #

FromJSON Tags Source # 
ToJSON Tags Source # 
type Rep Tags Source # 
type Rep Tags = D1 (MetaData "Tags" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" True) (C1 (MetaCons "Tags" PrefixI True) (S1 (MetaSel (Just Symbol "tags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Tag])))

newtype Attributes Source #

Attributes are key-value pairs that can be attached to an alert.

Constructors

Attributes 

Fields

data CreateAlertResp Source #

Constructors

OkCreateAlertResp 

Fields

ErrorCreateAlertResp 

Instances

Eq CreateAlertResp Source # 
Show CreateAlertResp Source # 
Generic CreateAlertResp Source # 
FromJSON CreateAlertResp Source # 
ToJSON CreateAlertResp Source # 
type Rep CreateAlertResp Source # 
type Rep CreateAlertResp = D1 (MetaData "CreateAlertResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkCreateAlertResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "okCreateAlertRespId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "okCreateAlertRespAlert") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe AlertInfo))) (S1 (MetaSel (Just Symbol "okCreateAlertRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorCreateAlertResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorCreateAlertRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data AlertsResp Source #

Instances

Eq AlertsResp Source # 
Show AlertsResp Source # 
Generic AlertsResp Source # 

Associated Types

type Rep AlertsResp :: * -> * #

FromJSON AlertsResp Source # 
ToJSON AlertsResp Source # 
type Rep AlertsResp Source # 
type Rep AlertsResp = D1 (MetaData "AlertsResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkAlertsResp" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespAlerts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [AlertInfo])) (S1 (MetaSel (Just Symbol "okAlertsRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespPage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PageNo)) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespPageSize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "okAlertsRespPages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespMore") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespSeverityCounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Map Severity Int)))) (S1 (MetaSel (Just Symbol "okAlertsRespStatusCounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Map Status Int)))))) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespLastTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) ((:*:) (S1 (MetaSel (Just Symbol "okAlertsRespAutoRefresh") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) (S1 (MetaSel (Just Symbol "okAlertsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))))) (C1 (MetaCons "ErrorAlertsResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorAlertsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data AlertCountResp Source #

Instances

Eq AlertCountResp Source # 
Show AlertCountResp Source # 
Generic AlertCountResp Source # 

Associated Types

type Rep AlertCountResp :: * -> * #

FromJSON AlertCountResp Source # 
ToJSON AlertCountResp Source # 
type Rep AlertCountResp Source # 
type Rep AlertCountResp = D1 (MetaData "AlertCountResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkAlertCountResp" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okAlertCountRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "okAlertCountRespSeverityCounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "okAlertCountRespStatusCounts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "okAlertCountRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorAlertCountResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorAlertCountRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data Top10Info Source #

This also has a field corresponding to the "group-by" query parameter used i.e. if you group by origin, then the result will have an "origin" field.

This dependently-typed feature is not currently captured in the Haskell types.

Instances

Eq Top10Info Source # 
Show Top10Info Source # 
Generic Top10Info Source # 

Associated Types

type Rep Top10Info :: * -> * #

FromJSON Top10Info Source # 
ToJSON Top10Info Source # 
type Rep Top10Info Source # 
type Rep Top10Info = D1 (MetaData "Top10Info" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "Top10Info" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "top10InfoCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "top10InfoDuplicateCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "top10InfoEnvironments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Environment])) ((:*:) (S1 (MetaSel (Just Symbol "top10InfoServices") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Service])) (S1 (MetaSel (Just Symbol "top10InfoResources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ResourceInfo]))))))

data Top10Resp Source #

data AlertHistoryResp Source #

Instances

Eq AlertHistoryResp Source # 
Show AlertHistoryResp Source # 
Generic AlertHistoryResp Source # 
FromJSON AlertHistoryResp Source # 
ToJSON AlertHistoryResp Source # 
type Rep AlertHistoryResp Source # 
type Rep AlertHistoryResp = D1 (MetaData "AlertHistoryResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkAlertHistoryResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "okAlertHistoryRespHistory") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ExtendedHistoryItem])) ((:*:) (S1 (MetaSel (Just Symbol "okAlertHistoryRespLastTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "okAlertHistoryRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorAlertHistoryResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorAlertHistoryResp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Environments

data EnvironmentsResp Source #

Instances

Eq EnvironmentsResp Source # 
Show EnvironmentsResp Source # 
Generic EnvironmentsResp Source # 
FromJSON EnvironmentsResp Source # 
ToJSON EnvironmentsResp Source # 
type Rep EnvironmentsResp Source # 
type Rep EnvironmentsResp = D1 (MetaData "EnvironmentsResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkEnvironmentsResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "okEnvironmentsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "okEnvironmentsRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "okEnvironmentsRespEnvironments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [EnvironmentInfo]))))) (C1 (MetaCons "ErrorEnvironmentsResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorEnvironmentsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Services

data ServicesResp Source #

Instances

Eq ServicesResp Source # 
Show ServicesResp Source # 
Generic ServicesResp Source # 

Associated Types

type Rep ServicesResp :: * -> * #

FromJSON ServicesResp Source # 
ToJSON ServicesResp Source # 
type Rep ServicesResp Source # 
type Rep ServicesResp = D1 (MetaData "ServicesResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkServicesResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "okServicesRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) ((:*:) (S1 (MetaSel (Just Symbol "okServicesRespServices") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ServiceInfo])) (S1 (MetaSel (Just Symbol "okServicesRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorServicesResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorServicesRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Blackouts

data Blackout Source #

Constructors

Blackout 

Fields

Instances

Eq Blackout Source # 
Show Blackout Source # 
Generic Blackout Source # 

Associated Types

type Rep Blackout :: * -> * #

Methods

from :: Blackout -> Rep Blackout x #

to :: Rep Blackout x -> Blackout #

FromJSON Blackout Source # 
ToJSON Blackout Source # 
type Rep Blackout Source # 

blackout :: Environment -> Blackout Source #

Create a blackout with only the mandatory fields

data BlackoutInfo Source #

A note on blackout priorities:

Priority is

  1. by default
  2. if resource and not event present
  3. if service present
  4. if event and not resource
  5. if group present
  6. if resource and event present
  7. if tags present

Somewhat bizarrely, the saved blackout only includes an attribute

{resource,service,event,group,tags}

if it was used to deduce the priority, i.e. a priority 6 blackout will have resource and event attributes, but no tags attribute, even if it was supplied when it was created.

Instances

Eq BlackoutInfo Source # 
Show BlackoutInfo Source # 
Generic BlackoutInfo Source # 

Associated Types

type Rep BlackoutInfo :: * -> * #

FromJSON BlackoutInfo Source # 
ToJSON BlackoutInfo Source # 
type Rep BlackoutInfo Source # 
type Rep BlackoutInfo = D1 (MetaData "BlackoutInfo" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "BlackoutInfo" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoPriority") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "blackoutInfoEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Environment)))) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Resource))) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Service]))) (S1 (MetaSel (Just Symbol "blackoutInfoEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Event)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Group))) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Tag]))) (S1 (MetaSel (Just Symbol "blackoutInfoCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName))))) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoStartTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) ((:*:) (S1 (MetaSel (Just Symbol "blackoutInfoEndTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "blackoutInfoDuration") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))))))

data BlackoutStatus Source #

Constructors

Expired 
Pending 
Active 

Instances

Bounded BlackoutStatus Source # 
Enum BlackoutStatus Source # 
Eq BlackoutStatus Source # 
Ord BlackoutStatus Source # 
Show BlackoutStatus Source # 
Ix BlackoutStatus Source # 
Generic BlackoutStatus Source # 

Associated Types

type Rep BlackoutStatus :: * -> * #

FromJSON BlackoutStatus Source # 
ToJSON BlackoutStatus Source # 
type Rep BlackoutStatus Source # 
type Rep BlackoutStatus = D1 (MetaData "BlackoutStatus" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "Expired" PrefixI False) U1) ((:+:) (C1 (MetaCons "Pending" PrefixI False) U1) (C1 (MetaCons "Active" PrefixI False) U1)))

data ExtendedBlackoutInfo Source #

Instances

Eq ExtendedBlackoutInfo Source # 
Show ExtendedBlackoutInfo Source # 
Generic ExtendedBlackoutInfo Source # 
FromJSON ExtendedBlackoutInfo Source # 
ToJSON ExtendedBlackoutInfo Source # 
type Rep ExtendedBlackoutInfo Source # 
type Rep ExtendedBlackoutInfo = D1 (MetaData "ExtendedBlackoutInfo" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "ExtendedBlackoutInfo" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoPriority") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Environment)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoResource") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Resource))) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoService") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Service])))) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoEvent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Event))) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoGroup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Group)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [Tag]))) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName))) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoStartTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoEndTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoDuration") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoRemaining") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "extendedBlackoutInfoStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BlackoutStatus)))))))

data BlackoutResp Source #

data BlackoutsResp Source #

Instances

Eq BlackoutsResp Source # 
Show BlackoutsResp Source # 
Generic BlackoutsResp Source # 

Associated Types

type Rep BlackoutsResp :: * -> * #

FromJSON BlackoutsResp Source # 
ToJSON BlackoutsResp Source # 
type Rep BlackoutsResp Source # 
type Rep BlackoutsResp = D1 (MetaData "BlackoutsResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkBlackoutsResp" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okBlackoutsRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "okBlackoutsRespBlackouts") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ExtendedBlackoutInfo]))) ((:*:) (S1 (MetaSel (Just Symbol "okBlackoutsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "okBlackoutsRespTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime))))) (C1 (MetaCons "ErrorBlackoutsResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorBlackoutsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Heartbeats

data Heartbeat Source #

Data needed to create a heartbeat

Instances

Eq Heartbeat Source # 
Show Heartbeat Source # 
Generic Heartbeat Source # 

Associated Types

type Rep Heartbeat :: * -> * #

FromJSON Heartbeat Source # 
ToJSON Heartbeat Source # 
Default Heartbeat Source # 

Methods

def :: Heartbeat #

type Rep Heartbeat Source # 

data HeartbeatInfo Source #

Information returned from the server about a heartbeat

Instances

Eq HeartbeatInfo Source # 
Show HeartbeatInfo Source # 
Generic HeartbeatInfo Source # 

Associated Types

type Rep HeartbeatInfo :: * -> * #

FromJSON HeartbeatInfo Source # 
ToJSON HeartbeatInfo Source # 
type Rep HeartbeatInfo Source # 

data CreateHeartbeatResp Source #

Instances

Eq CreateHeartbeatResp Source # 
Show CreateHeartbeatResp Source # 
Generic CreateHeartbeatResp Source # 
FromJSON CreateHeartbeatResp Source # 
ToJSON CreateHeartbeatResp Source # 
type Rep CreateHeartbeatResp Source # 
type Rep CreateHeartbeatResp = D1 (MetaData "CreateHeartbeatResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkCreateHeartbeatResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "createHeartbeatRespId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UUID)) (S1 (MetaSel (Just Symbol "createHeartbeatRespHeartbeat") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 HeartbeatInfo)))) (C1 (MetaCons "ErrorCreateHeartbeatResp" PrefixI True) (S1 (MetaSel (Just Symbol "createHeartbeatRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data HeartbeatResp Source #

data HeartbeatsResp Source #

Instances

Eq HeartbeatsResp Source # 
Show HeartbeatsResp Source # 
Generic HeartbeatsResp Source # 

Associated Types

type Rep HeartbeatsResp :: * -> * #

FromJSON HeartbeatsResp Source # 
ToJSON HeartbeatsResp Source # 
type Rep HeartbeatsResp Source # 
type Rep HeartbeatsResp = D1 (MetaData "HeartbeatsResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkHeartbeatsResp" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "heartbeatsRespHeartbeats") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [HeartbeatInfo])) (S1 (MetaSel (Just Symbol "heartbeatsRespTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe UTCTime)))) ((:*:) (S1 (MetaSel (Just Symbol "heartbeatsRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) (S1 (MetaSel (Just Symbol "heartbeatsRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorHeartbeatsResp" PrefixI True) (S1 (MetaSel (Just Symbol "heartbeatsRespErrorMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

API keys

data ApiKey Source #

40-char UTF8

Constructors

ApiKey 

Fields

data CreateApiKey Source #

Data needed to create an API key

Constructors

CreateApiKey 

Fields

Instances

Eq CreateApiKey Source # 
Show CreateApiKey Source # 
Generic CreateApiKey Source # 

Associated Types

type Rep CreateApiKey :: * -> * #

FromJSON CreateApiKey Source # 
ToJSON CreateApiKey Source # 
Default CreateApiKey Source # 

Methods

def :: CreateApiKey #

type Rep CreateApiKey Source # 
type Rep CreateApiKey = D1 (MetaData "CreateApiKey" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) (C1 (MetaCons "CreateApiKey" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "createApiKeyUser") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Email))) (S1 (MetaSel (Just Symbol "createApiKeyCustomer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe CustomerName)))) ((:*:) (S1 (MetaSel (Just Symbol "createApiKeyType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe ApiKeyType))) (S1 (MetaSel (Just Symbol "createApiKeyText") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))))))

data ApiKeyType Source #

Constructors

ReadOnly 
ReadWrite 

Instances

Bounded ApiKeyType Source # 
Enum ApiKeyType Source # 
Eq ApiKeyType Source # 
Ord ApiKeyType Source # 
Show ApiKeyType Source # 
Ix ApiKeyType Source # 
Generic ApiKeyType Source # 

Associated Types

type Rep ApiKeyType :: * -> * #

FromJSON ApiKeyType Source # 
ToJSON ApiKeyType Source # 
type Rep ApiKeyType Source # 
type Rep ApiKeyType = D1 (MetaData "ApiKeyType" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "ReadOnly" PrefixI False) U1) (C1 (MetaCons "ReadWrite" PrefixI False) U1))

data ApiKeyInfo Source #

Information returned from the server about an API key

Instances

Eq ApiKeyInfo Source # 
Show ApiKeyInfo Source # 
Generic ApiKeyInfo Source # 

Associated Types

type Rep ApiKeyInfo :: * -> * #

FromJSON ApiKeyInfo Source # 
ToJSON ApiKeyInfo Source # 
type Rep ApiKeyInfo Source # 

data CreateApiKeyResp Source #

Instances

Eq CreateApiKeyResp Source # 
Show CreateApiKeyResp Source # 
Generic CreateApiKeyResp Source # 
FromJSON CreateApiKeyResp Source # 
ToJSON CreateApiKeyResp Source # 
type Rep CreateApiKeyResp Source # 
type Rep CreateApiKeyResp = D1 (MetaData "CreateApiKeyResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkCreateApiKeyResp" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "okCreateApiKeyRespKey") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ApiKey)) (S1 (MetaSel (Just Symbol "okCreateApiKeyRespData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ApiKeyInfo)))) (C1 (MetaCons "ErrorCreateApiKeyResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorCreateApiKeyRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

data ApiKeysResp Source #

Instances

Eq ApiKeysResp Source # 
Show ApiKeysResp Source # 
Generic ApiKeysResp Source # 

Associated Types

type Rep ApiKeysResp :: * -> * #

FromJSON ApiKeysResp Source # 
ToJSON ApiKeysResp Source # 
type Rep ApiKeysResp Source # 
type Rep ApiKeysResp = D1 (MetaData "ApiKeysResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkApiKeysResp" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okApiKeysRespKeys") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ApiKeyInfo])) (S1 (MetaSel (Just Symbol "okApiKeysRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "okApiKeysRespTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime)) (S1 (MetaSel (Just Symbol "okApiKeysRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text)))))) (C1 (MetaCons "ErrorApiKeysResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorApiKeysRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Users

data User Source #

user :: UserName -> Email -> Password -> User Source #

Create a user with just the mandatory fields.

data UserAttr u Source #

User attributes, used in updating a user. It's an error to update a user with all attributes missing.

We track whether at least one attribute has been set with a phantom type.

Alerta bugs:

  • can't update password without also passing provider=basic as alerta checks the update message, not the user.
  • can't set email_verified to false without providing another parameter.

The helper functions "withUserName" etc. can be used in conjunction with the default empty UserAttr to build up a nonempty UserAttr.

Instances

Eq (UserAttr u) Source # 

Methods

(==) :: UserAttr u -> UserAttr u -> Bool #

(/=) :: UserAttr u -> UserAttr u -> Bool #

Show (UserAttr u) Source # 

Methods

showsPrec :: Int -> UserAttr u -> ShowS #

show :: UserAttr u -> String #

showList :: [UserAttr u] -> ShowS #

Generic (UserAttr u) Source # 

Associated Types

type Rep (UserAttr u) :: * -> * #

Methods

from :: UserAttr u -> Rep (UserAttr u) x #

to :: Rep (UserAttr u) x -> UserAttr u #

FromJSON (UserAttr UnknownIfEmpty) Source # 
ToJSON (UserAttr Nonempty) Source # 
Default (UserAttr Empty) Source # 

Methods

def :: UserAttr Empty #

type Rep (UserAttr u) Source # 

data UserInfo Source #

Instances

Show UserInfo Source # 
Generic UserInfo Source # 

Associated Types

type Rep UserInfo :: * -> * #

Methods

from :: UserInfo -> Rep UserInfo x #

to :: Rep UserInfo x -> UserInfo #

FromJSON UserInfo Source # 
ToJSON UserInfo Source # 
type Rep UserInfo Source # 

data RoleType Source #

Instances

Bounded RoleType Source # 
Enum RoleType Source # 
Eq RoleType Source # 
Ord RoleType Source # 
Show RoleType Source # 
Ix RoleType Source # 
Generic RoleType Source # 

Associated Types

type Rep RoleType :: * -> * #

Methods

from :: RoleType -> Rep RoleType x #

to :: Rep RoleType x -> RoleType #

FromJSON RoleType Source # 
ToJSON RoleType Source # 
type Rep RoleType Source # 
type Rep RoleType = D1 (MetaData "RoleType" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "UserRoleType" PrefixI False) U1) (C1 (MetaCons "AdminRoleType" PrefixI False) U1))

data ExtendedUserInfo Source #

Instances

Show ExtendedUserInfo Source # 
Generic ExtendedUserInfo Source # 
FromJSON ExtendedUserInfo Source # 
ToJSON ExtendedUserInfo Source # 
type Rep ExtendedUserInfo Source # 

data UsersResp Source #

Instances

Show UsersResp Source # 
Generic UsersResp Source # 

Associated Types

type Rep UsersResp :: * -> * #

FromJSON UsersResp Source # 
ToJSON UsersResp Source # 
type Rep UsersResp Source # 

Customers

data CustomersResp Source #

Instances

Show CustomersResp Source # 
Generic CustomersResp Source # 

Associated Types

type Rep CustomersResp :: * -> * #

FromJSON CustomersResp Source # 
ToJSON CustomersResp Source # 
type Rep CustomersResp Source # 
type Rep CustomersResp = D1 (MetaData "CustomersResp" "Alerta.Types" "alerta-0.1.0.6-HFNJeuCENDS1l14ia2kA2f" False) ((:+:) (C1 (MetaCons "OkCustomersResp" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "okCustomersRespCustomers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [CustomerInfo])) (S1 (MetaSel (Just Symbol "okCustomersRespTotal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) ((:*:) (S1 (MetaSel (Just Symbol "okCustomersRespMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "okCustomersRespTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UTCTime))))) (C1 (MetaCons "ErrorCustomersResp" PrefixI True) (S1 (MetaSel (Just Symbol "errorCustomersMessage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text))))

Helpers

run :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO a Source #

Run a Servant client function, pretty-printing the JSON returned.

run' :: (Show a, FromJSON a, ToJSON a) => ClientM a -> IO () Source #

Run a Servant client function, pretty-printing the JSON returned, and discarding the return value.

prettyPrintEncoding :: ToJSON a => a -> IO () Source #

Pretty-print the JSON encoding of the supplied value.

now :: () -> UTCTime Source #

Current time. Not referentially transparent!