{-# 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.RobOMaker.Types.FailureBehavior
-- 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.RobOMaker.Types.FailureBehavior
  ( FailureBehavior
      ( ..,
        FailureBehavior_Continue,
        FailureBehavior_Fail
      ),
  )
where

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

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

pattern FailureBehavior_Continue :: FailureBehavior
pattern $bFailureBehavior_Continue :: FailureBehavior
$mFailureBehavior_Continue :: forall r. FailureBehavior -> (Void# -> r) -> (Void# -> r) -> r
FailureBehavior_Continue = FailureBehavior' "Continue"

pattern FailureBehavior_Fail :: FailureBehavior
pattern $bFailureBehavior_Fail :: FailureBehavior
$mFailureBehavior_Fail :: forall r. FailureBehavior -> (Void# -> r) -> (Void# -> r) -> r
FailureBehavior_Fail = FailureBehavior' "Fail"

{-# COMPLETE
  FailureBehavior_Continue,
  FailureBehavior_Fail,
  FailureBehavior'
  #-}