{-# 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.CloudFormation.Types.OnFailure
-- 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.CloudFormation.Types.OnFailure
  ( OnFailure
      ( ..,
        OnFailure_DELETE,
        OnFailure_DO_NOTHING,
        OnFailure_ROLLBACK
      ),
  )
where

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

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

pattern OnFailure_DELETE :: OnFailure
pattern $bOnFailure_DELETE :: OnFailure
$mOnFailure_DELETE :: forall {r}. OnFailure -> ((# #) -> r) -> ((# #) -> r) -> r
OnFailure_DELETE = OnFailure' "DELETE"

pattern OnFailure_DO_NOTHING :: OnFailure
pattern $bOnFailure_DO_NOTHING :: OnFailure
$mOnFailure_DO_NOTHING :: forall {r}. OnFailure -> ((# #) -> r) -> ((# #) -> r) -> r
OnFailure_DO_NOTHING = OnFailure' "DO_NOTHING"

pattern OnFailure_ROLLBACK :: OnFailure
pattern $bOnFailure_ROLLBACK :: OnFailure
$mOnFailure_ROLLBACK :: forall {r}. OnFailure -> ((# #) -> r) -> ((# #) -> r) -> r
OnFailure_ROLLBACK = OnFailure' "ROLLBACK"

{-# COMPLETE
  OnFailure_DELETE,
  OnFailure_DO_NOTHING,
  OnFailure_ROLLBACK,
  OnFailure'
  #-}