{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Location.Types.DistanceUnit
( DistanceUnit
( ..,
DistanceUnit_Kilometers,
DistanceUnit_Miles
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
newtype DistanceUnit = DistanceUnit'
{ DistanceUnit -> Text
fromDistanceUnit ::
Core.Text
}
deriving stock
( Int -> DistanceUnit -> ShowS
[DistanceUnit] -> ShowS
DistanceUnit -> String
(Int -> DistanceUnit -> ShowS)
-> (DistanceUnit -> String)
-> ([DistanceUnit] -> ShowS)
-> Show DistanceUnit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DistanceUnit] -> ShowS
$cshowList :: [DistanceUnit] -> ShowS
show :: DistanceUnit -> String
$cshow :: DistanceUnit -> String
showsPrec :: Int -> DistanceUnit -> ShowS
$cshowsPrec :: Int -> DistanceUnit -> ShowS
Prelude.Show,
ReadPrec [DistanceUnit]
ReadPrec DistanceUnit
Int -> ReadS DistanceUnit
ReadS [DistanceUnit]
(Int -> ReadS DistanceUnit)
-> ReadS [DistanceUnit]
-> ReadPrec DistanceUnit
-> ReadPrec [DistanceUnit]
-> Read DistanceUnit
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DistanceUnit]
$creadListPrec :: ReadPrec [DistanceUnit]
readPrec :: ReadPrec DistanceUnit
$creadPrec :: ReadPrec DistanceUnit
readList :: ReadS [DistanceUnit]
$creadList :: ReadS [DistanceUnit]
readsPrec :: Int -> ReadS DistanceUnit
$creadsPrec :: Int -> ReadS DistanceUnit
Prelude.Read,
DistanceUnit -> DistanceUnit -> Bool
(DistanceUnit -> DistanceUnit -> Bool)
-> (DistanceUnit -> DistanceUnit -> Bool) -> Eq DistanceUnit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DistanceUnit -> DistanceUnit -> Bool
$c/= :: DistanceUnit -> DistanceUnit -> Bool
== :: DistanceUnit -> DistanceUnit -> Bool
$c== :: DistanceUnit -> DistanceUnit -> Bool
Prelude.Eq,
Eq DistanceUnit
Eq DistanceUnit
-> (DistanceUnit -> DistanceUnit -> Ordering)
-> (DistanceUnit -> DistanceUnit -> Bool)
-> (DistanceUnit -> DistanceUnit -> Bool)
-> (DistanceUnit -> DistanceUnit -> Bool)
-> (DistanceUnit -> DistanceUnit -> Bool)
-> (DistanceUnit -> DistanceUnit -> DistanceUnit)
-> (DistanceUnit -> DistanceUnit -> DistanceUnit)
-> Ord DistanceUnit
DistanceUnit -> DistanceUnit -> Bool
DistanceUnit -> DistanceUnit -> Ordering
DistanceUnit -> DistanceUnit -> DistanceUnit
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 :: DistanceUnit -> DistanceUnit -> DistanceUnit
$cmin :: DistanceUnit -> DistanceUnit -> DistanceUnit
max :: DistanceUnit -> DistanceUnit -> DistanceUnit
$cmax :: DistanceUnit -> DistanceUnit -> DistanceUnit
>= :: DistanceUnit -> DistanceUnit -> Bool
$c>= :: DistanceUnit -> DistanceUnit -> Bool
> :: DistanceUnit -> DistanceUnit -> Bool
$c> :: DistanceUnit -> DistanceUnit -> Bool
<= :: DistanceUnit -> DistanceUnit -> Bool
$c<= :: DistanceUnit -> DistanceUnit -> Bool
< :: DistanceUnit -> DistanceUnit -> Bool
$c< :: DistanceUnit -> DistanceUnit -> Bool
compare :: DistanceUnit -> DistanceUnit -> Ordering
$ccompare :: DistanceUnit -> DistanceUnit -> Ordering
$cp1Ord :: Eq DistanceUnit
Prelude.Ord,
(forall x. DistanceUnit -> Rep DistanceUnit x)
-> (forall x. Rep DistanceUnit x -> DistanceUnit)
-> Generic DistanceUnit
forall x. Rep DistanceUnit x -> DistanceUnit
forall x. DistanceUnit -> Rep DistanceUnit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DistanceUnit x -> DistanceUnit
$cfrom :: forall x. DistanceUnit -> Rep DistanceUnit x
Prelude.Generic
)
deriving newtype
( Int -> DistanceUnit -> Int
DistanceUnit -> Int
(Int -> DistanceUnit -> Int)
-> (DistanceUnit -> Int) -> Hashable DistanceUnit
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DistanceUnit -> Int
$chash :: DistanceUnit -> Int
hashWithSalt :: Int -> DistanceUnit -> Int
$chashWithSalt :: Int -> DistanceUnit -> Int
Prelude.Hashable,
DistanceUnit -> ()
(DistanceUnit -> ()) -> NFData DistanceUnit
forall a. (a -> ()) -> NFData a
rnf :: DistanceUnit -> ()
$crnf :: DistanceUnit -> ()
Prelude.NFData,
Text -> Either String DistanceUnit
(Text -> Either String DistanceUnit) -> FromText DistanceUnit
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String DistanceUnit
$cfromText :: Text -> Either String DistanceUnit
Core.FromText,
DistanceUnit -> Text
(DistanceUnit -> Text) -> ToText DistanceUnit
forall a. (a -> Text) -> ToText a
toText :: DistanceUnit -> Text
$ctoText :: DistanceUnit -> Text
Core.ToText,
DistanceUnit -> ByteString
(DistanceUnit -> ByteString) -> ToByteString DistanceUnit
forall a. (a -> ByteString) -> ToByteString a
toBS :: DistanceUnit -> ByteString
$ctoBS :: DistanceUnit -> ByteString
Core.ToByteString,
DistanceUnit -> ByteStringBuilder
(DistanceUnit -> ByteStringBuilder) -> ToLog DistanceUnit
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: DistanceUnit -> ByteStringBuilder
$cbuild :: DistanceUnit -> ByteStringBuilder
Core.ToLog,
HeaderName -> DistanceUnit -> [Header]
(HeaderName -> DistanceUnit -> [Header]) -> ToHeader DistanceUnit
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> DistanceUnit -> [Header]
$ctoHeader :: HeaderName -> DistanceUnit -> [Header]
Core.ToHeader,
DistanceUnit -> QueryString
(DistanceUnit -> QueryString) -> ToQuery DistanceUnit
forall a. (a -> QueryString) -> ToQuery a
toQuery :: DistanceUnit -> QueryString
$ctoQuery :: DistanceUnit -> QueryString
Core.ToQuery,
Value -> Parser [DistanceUnit]
Value -> Parser DistanceUnit
(Value -> Parser DistanceUnit)
-> (Value -> Parser [DistanceUnit]) -> FromJSON DistanceUnit
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [DistanceUnit]
$cparseJSONList :: Value -> Parser [DistanceUnit]
parseJSON :: Value -> Parser DistanceUnit
$cparseJSON :: Value -> Parser DistanceUnit
Core.FromJSON,
FromJSONKeyFunction [DistanceUnit]
FromJSONKeyFunction DistanceUnit
FromJSONKeyFunction DistanceUnit
-> FromJSONKeyFunction [DistanceUnit] -> FromJSONKey DistanceUnit
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [DistanceUnit]
$cfromJSONKeyList :: FromJSONKeyFunction [DistanceUnit]
fromJSONKey :: FromJSONKeyFunction DistanceUnit
$cfromJSONKey :: FromJSONKeyFunction DistanceUnit
Core.FromJSONKey,
[DistanceUnit] -> Encoding
[DistanceUnit] -> Value
DistanceUnit -> Encoding
DistanceUnit -> Value
(DistanceUnit -> Value)
-> (DistanceUnit -> Encoding)
-> ([DistanceUnit] -> Value)
-> ([DistanceUnit] -> Encoding)
-> ToJSON DistanceUnit
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [DistanceUnit] -> Encoding
$ctoEncodingList :: [DistanceUnit] -> Encoding
toJSONList :: [DistanceUnit] -> Value
$ctoJSONList :: [DistanceUnit] -> Value
toEncoding :: DistanceUnit -> Encoding
$ctoEncoding :: DistanceUnit -> Encoding
toJSON :: DistanceUnit -> Value
$ctoJSON :: DistanceUnit -> Value
Core.ToJSON,
ToJSONKeyFunction [DistanceUnit]
ToJSONKeyFunction DistanceUnit
ToJSONKeyFunction DistanceUnit
-> ToJSONKeyFunction [DistanceUnit] -> ToJSONKey DistanceUnit
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [DistanceUnit]
$ctoJSONKeyList :: ToJSONKeyFunction [DistanceUnit]
toJSONKey :: ToJSONKeyFunction DistanceUnit
$ctoJSONKey :: ToJSONKeyFunction DistanceUnit
Core.ToJSONKey,
[Node] -> Either String DistanceUnit
([Node] -> Either String DistanceUnit) -> FromXML DistanceUnit
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String DistanceUnit
$cparseXML :: [Node] -> Either String DistanceUnit
Core.FromXML,
DistanceUnit -> XML
(DistanceUnit -> XML) -> ToXML DistanceUnit
forall a. (a -> XML) -> ToXML a
toXML :: DistanceUnit -> XML
$ctoXML :: DistanceUnit -> XML
Core.ToXML
)
pattern DistanceUnit_Kilometers :: DistanceUnit
pattern $bDistanceUnit_Kilometers :: DistanceUnit
$mDistanceUnit_Kilometers :: forall r. DistanceUnit -> (Void# -> r) -> (Void# -> r) -> r
DistanceUnit_Kilometers = DistanceUnit' "Kilometers"
pattern DistanceUnit_Miles :: DistanceUnit
pattern $bDistanceUnit_Miles :: DistanceUnit
$mDistanceUnit_Miles :: forall r. DistanceUnit -> (Void# -> r) -> (Void# -> r) -> r
DistanceUnit_Miles = DistanceUnit' "Miles"
{-# COMPLETE
DistanceUnit_Kilometers,
DistanceUnit_Miles,
DistanceUnit'
#-}