{-# 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.GuardDuty.Types.UsageStatisticType
-- 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.GuardDuty.Types.UsageStatisticType
  ( UsageStatisticType
      ( ..,
        UsageStatisticType_SUM_BY_ACCOUNT,
        UsageStatisticType_SUM_BY_DATA_SOURCE,
        UsageStatisticType_SUM_BY_RESOURCE,
        UsageStatisticType_TOP_RESOURCES
      ),
  )
where

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

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

pattern UsageStatisticType_SUM_BY_ACCOUNT :: UsageStatisticType
pattern $bUsageStatisticType_SUM_BY_ACCOUNT :: UsageStatisticType
$mUsageStatisticType_SUM_BY_ACCOUNT :: forall r. UsageStatisticType -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticType_SUM_BY_ACCOUNT = UsageStatisticType' "SUM_BY_ACCOUNT"

pattern UsageStatisticType_SUM_BY_DATA_SOURCE :: UsageStatisticType
pattern $bUsageStatisticType_SUM_BY_DATA_SOURCE :: UsageStatisticType
$mUsageStatisticType_SUM_BY_DATA_SOURCE :: forall r. UsageStatisticType -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticType_SUM_BY_DATA_SOURCE = UsageStatisticType' "SUM_BY_DATA_SOURCE"

pattern UsageStatisticType_SUM_BY_RESOURCE :: UsageStatisticType
pattern $bUsageStatisticType_SUM_BY_RESOURCE :: UsageStatisticType
$mUsageStatisticType_SUM_BY_RESOURCE :: forall r. UsageStatisticType -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticType_SUM_BY_RESOURCE = UsageStatisticType' "SUM_BY_RESOURCE"

pattern UsageStatisticType_TOP_RESOURCES :: UsageStatisticType
pattern $bUsageStatisticType_TOP_RESOURCES :: UsageStatisticType
$mUsageStatisticType_TOP_RESOURCES :: forall r. UsageStatisticType -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticType_TOP_RESOURCES = UsageStatisticType' "TOP_RESOURCES"

{-# COMPLETE
  UsageStatisticType_SUM_BY_ACCOUNT,
  UsageStatisticType_SUM_BY_DATA_SOURCE,
  UsageStatisticType_SUM_BY_RESOURCE,
  UsageStatisticType_TOP_RESOURCES,
  UsageStatisticType'
  #-}