{-# 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.CodeDeploy.Types.AutoRollbackEvent
-- 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.CodeDeploy.Types.AutoRollbackEvent
  ( AutoRollbackEvent
      ( ..,
        AutoRollbackEvent_DEPLOYMENT_FAILURE,
        AutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM,
        AutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST
      ),
  )
where

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

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

pattern AutoRollbackEvent_DEPLOYMENT_FAILURE :: AutoRollbackEvent
pattern $bAutoRollbackEvent_DEPLOYMENT_FAILURE :: AutoRollbackEvent
$mAutoRollbackEvent_DEPLOYMENT_FAILURE :: forall r. AutoRollbackEvent -> (Void# -> r) -> (Void# -> r) -> r
AutoRollbackEvent_DEPLOYMENT_FAILURE = AutoRollbackEvent' "DEPLOYMENT_FAILURE"

pattern AutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM :: AutoRollbackEvent
pattern $bAutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM :: AutoRollbackEvent
$mAutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM :: forall r. AutoRollbackEvent -> (Void# -> r) -> (Void# -> r) -> r
AutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM = AutoRollbackEvent' "DEPLOYMENT_STOP_ON_ALARM"

pattern AutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST :: AutoRollbackEvent
pattern $bAutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST :: AutoRollbackEvent
$mAutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST :: forall r. AutoRollbackEvent -> (Void# -> r) -> (Void# -> r) -> r
AutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST = AutoRollbackEvent' "DEPLOYMENT_STOP_ON_REQUEST"

{-# COMPLETE
  AutoRollbackEvent_DEPLOYMENT_FAILURE,
  AutoRollbackEvent_DEPLOYMENT_STOP_ON_ALARM,
  AutoRollbackEvent_DEPLOYMENT_STOP_ON_REQUEST,
  AutoRollbackEvent'
  #-}