{-# 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.MacieV2.Types.UsageStatisticsSortKey
-- 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.MacieV2.Types.UsageStatisticsSortKey
  ( UsageStatisticsSortKey
      ( ..,
        UsageStatisticsSortKey_AccountId,
        UsageStatisticsSortKey_FreeTrialStartDate,
        UsageStatisticsSortKey_ServiceLimitValue,
        UsageStatisticsSortKey_Total
      ),
  )
where

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

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

pattern UsageStatisticsSortKey_AccountId :: UsageStatisticsSortKey
pattern $bUsageStatisticsSortKey_AccountId :: UsageStatisticsSortKey
$mUsageStatisticsSortKey_AccountId :: forall r.
UsageStatisticsSortKey -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticsSortKey_AccountId = UsageStatisticsSortKey' "accountId"

pattern UsageStatisticsSortKey_FreeTrialStartDate :: UsageStatisticsSortKey
pattern $bUsageStatisticsSortKey_FreeTrialStartDate :: UsageStatisticsSortKey
$mUsageStatisticsSortKey_FreeTrialStartDate :: forall r.
UsageStatisticsSortKey -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticsSortKey_FreeTrialStartDate = UsageStatisticsSortKey' "freeTrialStartDate"

pattern UsageStatisticsSortKey_ServiceLimitValue :: UsageStatisticsSortKey
pattern $bUsageStatisticsSortKey_ServiceLimitValue :: UsageStatisticsSortKey
$mUsageStatisticsSortKey_ServiceLimitValue :: forall r.
UsageStatisticsSortKey -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticsSortKey_ServiceLimitValue = UsageStatisticsSortKey' "serviceLimitValue"

pattern UsageStatisticsSortKey_Total :: UsageStatisticsSortKey
pattern $bUsageStatisticsSortKey_Total :: UsageStatisticsSortKey
$mUsageStatisticsSortKey_Total :: forall r.
UsageStatisticsSortKey -> (Void# -> r) -> (Void# -> r) -> r
UsageStatisticsSortKey_Total = UsageStatisticsSortKey' "total"

{-# COMPLETE
  UsageStatisticsSortKey_AccountId,
  UsageStatisticsSortKey_FreeTrialStartDate,
  UsageStatisticsSortKey_ServiceLimitValue,
  UsageStatisticsSortKey_Total,
  UsageStatisticsSortKey'
  #-}