{-# 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.Location.Types.VehicleWeightUnit
-- 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.Location.Types.VehicleWeightUnit
  ( VehicleWeightUnit
      ( ..,
        VehicleWeightUnit_Kilograms,
        VehicleWeightUnit_Pounds
      ),
  )
where

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

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

pattern VehicleWeightUnit_Kilograms :: VehicleWeightUnit
pattern $bVehicleWeightUnit_Kilograms :: VehicleWeightUnit
$mVehicleWeightUnit_Kilograms :: forall r. VehicleWeightUnit -> (Void# -> r) -> (Void# -> r) -> r
VehicleWeightUnit_Kilograms = VehicleWeightUnit' "Kilograms"

pattern VehicleWeightUnit_Pounds :: VehicleWeightUnit
pattern $bVehicleWeightUnit_Pounds :: VehicleWeightUnit
$mVehicleWeightUnit_Pounds :: forall r. VehicleWeightUnit -> (Void# -> r) -> (Void# -> r) -> r
VehicleWeightUnit_Pounds = VehicleWeightUnit' "Pounds"

{-# COMPLETE
  VehicleWeightUnit_Kilograms,
  VehicleWeightUnit_Pounds,
  VehicleWeightUnit'
  #-}