{-# 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.GreengrassV2.Types.DeploymentFailureHandlingPolicy
-- 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.GreengrassV2.Types.DeploymentFailureHandlingPolicy
  ( DeploymentFailureHandlingPolicy
      ( ..,
        DeploymentFailureHandlingPolicy_DO_NOTHING,
        DeploymentFailureHandlingPolicy_ROLLBACK
      ),
  )
where

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

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

pattern DeploymentFailureHandlingPolicy_DO_NOTHING :: DeploymentFailureHandlingPolicy
pattern $bDeploymentFailureHandlingPolicy_DO_NOTHING :: DeploymentFailureHandlingPolicy
$mDeploymentFailureHandlingPolicy_DO_NOTHING :: forall r.
DeploymentFailureHandlingPolicy
-> (Void# -> r) -> (Void# -> r) -> r
DeploymentFailureHandlingPolicy_DO_NOTHING = DeploymentFailureHandlingPolicy' "DO_NOTHING"

pattern DeploymentFailureHandlingPolicy_ROLLBACK :: DeploymentFailureHandlingPolicy
pattern $bDeploymentFailureHandlingPolicy_ROLLBACK :: DeploymentFailureHandlingPolicy
$mDeploymentFailureHandlingPolicy_ROLLBACK :: forall r.
DeploymentFailureHandlingPolicy
-> (Void# -> r) -> (Void# -> r) -> r
DeploymentFailureHandlingPolicy_ROLLBACK = DeploymentFailureHandlingPolicy' "ROLLBACK"

{-# COMPLETE
  DeploymentFailureHandlingPolicy_DO_NOTHING,
  DeploymentFailureHandlingPolicy_ROLLBACK,
  DeploymentFailureHandlingPolicy'
  #-}