{-# 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.HealthLake.Types.FHIRVersion
-- 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.HealthLake.Types.FHIRVersion
  ( FHIRVersion
      ( ..,
        FHIRVersion_R4
      ),
  )
where

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

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

pattern FHIRVersion_R4 :: FHIRVersion
pattern $bFHIRVersion_R4 :: FHIRVersion
$mFHIRVersion_R4 :: forall r. FHIRVersion -> (Void# -> r) -> (Void# -> r) -> r
FHIRVersion_R4 = FHIRVersion' "R4"

{-# COMPLETE
  FHIRVersion_R4,
  FHIRVersion'
  #-}