{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudTrail.Types.EventCategory
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudTrail.Types.EventCategory
  ( EventCategory
      ( ..,
        EventCategory_Insight
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype EventCategory = EventCategory'
  { EventCategory -> Text
fromEventCategory ::
      Core.Text
  }
  deriving stock
    ( Int -> EventCategory -> ShowS
[EventCategory] -> ShowS
EventCategory -> String
(Int -> EventCategory -> ShowS)
-> (EventCategory -> String)
-> ([EventCategory] -> ShowS)
-> Show EventCategory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventCategory] -> ShowS
$cshowList :: [EventCategory] -> ShowS
show :: EventCategory -> String
$cshow :: EventCategory -> String
showsPrec :: Int -> EventCategory -> ShowS
$cshowsPrec :: Int -> EventCategory -> ShowS
Prelude.Show,
      ReadPrec [EventCategory]
ReadPrec EventCategory
Int -> ReadS EventCategory
ReadS [EventCategory]
(Int -> ReadS EventCategory)
-> ReadS [EventCategory]
-> ReadPrec EventCategory
-> ReadPrec [EventCategory]
-> Read EventCategory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventCategory]
$creadListPrec :: ReadPrec [EventCategory]
readPrec :: ReadPrec EventCategory
$creadPrec :: ReadPrec EventCategory
readList :: ReadS [EventCategory]
$creadList :: ReadS [EventCategory]
readsPrec :: Int -> ReadS EventCategory
$creadsPrec :: Int -> ReadS EventCategory
Prelude.Read,
      EventCategory -> EventCategory -> Bool
(EventCategory -> EventCategory -> Bool)
-> (EventCategory -> EventCategory -> Bool) -> Eq EventCategory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventCategory -> EventCategory -> Bool
$c/= :: EventCategory -> EventCategory -> Bool
== :: EventCategory -> EventCategory -> Bool
$c== :: EventCategory -> EventCategory -> Bool
Prelude.Eq,
      Eq EventCategory
Eq EventCategory
-> (EventCategory -> EventCategory -> Ordering)
-> (EventCategory -> EventCategory -> Bool)
-> (EventCategory -> EventCategory -> Bool)
-> (EventCategory -> EventCategory -> Bool)
-> (EventCategory -> EventCategory -> Bool)
-> (EventCategory -> EventCategory -> EventCategory)
-> (EventCategory -> EventCategory -> EventCategory)
-> Ord EventCategory
EventCategory -> EventCategory -> Bool
EventCategory -> EventCategory -> Ordering
EventCategory -> EventCategory -> EventCategory
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: EventCategory -> EventCategory -> EventCategory
$cmin :: EventCategory -> EventCategory -> EventCategory
max :: EventCategory -> EventCategory -> EventCategory
$cmax :: EventCategory -> EventCategory -> EventCategory
>= :: EventCategory -> EventCategory -> Bool
$c>= :: EventCategory -> EventCategory -> Bool
> :: EventCategory -> EventCategory -> Bool
$c> :: EventCategory -> EventCategory -> Bool
<= :: EventCategory -> EventCategory -> Bool
$c<= :: EventCategory -> EventCategory -> Bool
< :: EventCategory -> EventCategory -> Bool
$c< :: EventCategory -> EventCategory -> Bool
compare :: EventCategory -> EventCategory -> Ordering
$ccompare :: EventCategory -> EventCategory -> Ordering
$cp1Ord :: Eq EventCategory
Prelude.Ord,
      (forall x. EventCategory -> Rep EventCategory x)
-> (forall x. Rep EventCategory x -> EventCategory)
-> Generic EventCategory
forall x. Rep EventCategory x -> EventCategory
forall x. EventCategory -> Rep EventCategory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventCategory x -> EventCategory
$cfrom :: forall x. EventCategory -> Rep EventCategory x
Prelude.Generic
    )
  deriving newtype
    ( Int -> EventCategory -> Int
EventCategory -> Int
(Int -> EventCategory -> Int)
-> (EventCategory -> Int) -> Hashable EventCategory
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: EventCategory -> Int
$chash :: EventCategory -> Int
hashWithSalt :: Int -> EventCategory -> Int
$chashWithSalt :: Int -> EventCategory -> Int
Prelude.Hashable,
      EventCategory -> ()
(EventCategory -> ()) -> NFData EventCategory
forall a. (a -> ()) -> NFData a
rnf :: EventCategory -> ()
$crnf :: EventCategory -> ()
Prelude.NFData,
      Text -> Either String EventCategory
(Text -> Either String EventCategory) -> FromText EventCategory
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String EventCategory
$cfromText :: Text -> Either String EventCategory
Core.FromText,
      EventCategory -> Text
(EventCategory -> Text) -> ToText EventCategory
forall a. (a -> Text) -> ToText a
toText :: EventCategory -> Text
$ctoText :: EventCategory -> Text
Core.ToText,
      EventCategory -> ByteString
(EventCategory -> ByteString) -> ToByteString EventCategory
forall a. (a -> ByteString) -> ToByteString a
toBS :: EventCategory -> ByteString
$ctoBS :: EventCategory -> ByteString
Core.ToByteString,
      EventCategory -> ByteStringBuilder
(EventCategory -> ByteStringBuilder) -> ToLog EventCategory
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: EventCategory -> ByteStringBuilder
$cbuild :: EventCategory -> ByteStringBuilder
Core.ToLog,
      HeaderName -> EventCategory -> [Header]
(HeaderName -> EventCategory -> [Header]) -> ToHeader EventCategory
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> EventCategory -> [Header]
$ctoHeader :: HeaderName -> EventCategory -> [Header]
Core.ToHeader,
      EventCategory -> QueryString
(EventCategory -> QueryString) -> ToQuery EventCategory
forall a. (a -> QueryString) -> ToQuery a
toQuery :: EventCategory -> QueryString
$ctoQuery :: EventCategory -> QueryString
Core.ToQuery,
      Value -> Parser [EventCategory]
Value -> Parser EventCategory
(Value -> Parser EventCategory)
-> (Value -> Parser [EventCategory]) -> FromJSON EventCategory
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [EventCategory]
$cparseJSONList :: Value -> Parser [EventCategory]
parseJSON :: Value -> Parser EventCategory
$cparseJSON :: Value -> Parser EventCategory
Core.FromJSON,
      FromJSONKeyFunction [EventCategory]
FromJSONKeyFunction EventCategory
FromJSONKeyFunction EventCategory
-> FromJSONKeyFunction [EventCategory] -> FromJSONKey EventCategory
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [EventCategory]
$cfromJSONKeyList :: FromJSONKeyFunction [EventCategory]
fromJSONKey :: FromJSONKeyFunction EventCategory
$cfromJSONKey :: FromJSONKeyFunction EventCategory
Core.FromJSONKey,
      [EventCategory] -> Encoding
[EventCategory] -> Value
EventCategory -> Encoding
EventCategory -> Value
(EventCategory -> Value)
-> (EventCategory -> Encoding)
-> ([EventCategory] -> Value)
-> ([EventCategory] -> Encoding)
-> ToJSON EventCategory
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [EventCategory] -> Encoding
$ctoEncodingList :: [EventCategory] -> Encoding
toJSONList :: [EventCategory] -> Value
$ctoJSONList :: [EventCategory] -> Value
toEncoding :: EventCategory -> Encoding
$ctoEncoding :: EventCategory -> Encoding
toJSON :: EventCategory -> Value
$ctoJSON :: EventCategory -> Value
Core.ToJSON,
      ToJSONKeyFunction [EventCategory]
ToJSONKeyFunction EventCategory
ToJSONKeyFunction EventCategory
-> ToJSONKeyFunction [EventCategory] -> ToJSONKey EventCategory
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [EventCategory]
$ctoJSONKeyList :: ToJSONKeyFunction [EventCategory]
toJSONKey :: ToJSONKeyFunction EventCategory
$ctoJSONKey :: ToJSONKeyFunction EventCategory
Core.ToJSONKey,
      [Node] -> Either String EventCategory
([Node] -> Either String EventCategory) -> FromXML EventCategory
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String EventCategory
$cparseXML :: [Node] -> Either String EventCategory
Core.FromXML,
      EventCategory -> XML
(EventCategory -> XML) -> ToXML EventCategory
forall a. (a -> XML) -> ToXML a
toXML :: EventCategory -> XML
$ctoXML :: EventCategory -> XML
Core.ToXML
    )

pattern EventCategory_Insight :: EventCategory
pattern $bEventCategory_Insight :: EventCategory
$mEventCategory_Insight :: forall r. EventCategory -> (Void# -> r) -> (Void# -> r) -> r
EventCategory_Insight = EventCategory' "insight"

{-# COMPLETE
  EventCategory_Insight,
  EventCategory'
  #-}