{-# 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.Currency
-- 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.Currency
  ( Currency
      ( ..,
        Currency_USD
      ),
  )
where

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

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

pattern Currency_USD :: Currency
pattern $bCurrency_USD :: Currency
$mCurrency_USD :: forall r. Currency -> (Void# -> r) -> (Void# -> r) -> r
Currency_USD = Currency' "USD"

{-# COMPLETE
  Currency_USD,
  Currency'
  #-}