{-# 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.EC2.Types.HostRecovery
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.HostRecovery
  ( HostRecovery
      ( ..,
        HostRecovery_Off,
        HostRecovery_On
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

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

pattern HostRecovery_Off :: HostRecovery
pattern $bHostRecovery_Off :: HostRecovery
$mHostRecovery_Off :: forall {r}. HostRecovery -> ((# #) -> r) -> ((# #) -> r) -> r
HostRecovery_Off = HostRecovery' "off"

pattern HostRecovery_On :: HostRecovery
pattern $bHostRecovery_On :: HostRecovery
$mHostRecovery_On :: forall {r}. HostRecovery -> ((# #) -> r) -> ((# #) -> r) -> r
HostRecovery_On = HostRecovery' "on"

{-# COMPLETE
  HostRecovery_Off,
  HostRecovery_On,
  HostRecovery'
  #-}