{-# 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.ECS.Types.ManagedTerminationProtection
-- 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.ECS.Types.ManagedTerminationProtection
  ( ManagedTerminationProtection
      ( ..,
        ManagedTerminationProtection_DISABLED,
        ManagedTerminationProtection_ENABLED
      ),
  )
where

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

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

pattern ManagedTerminationProtection_DISABLED :: ManagedTerminationProtection
pattern $bManagedTerminationProtection_DISABLED :: ManagedTerminationProtection
$mManagedTerminationProtection_DISABLED :: forall r.
ManagedTerminationProtection -> (Void# -> r) -> (Void# -> r) -> r
ManagedTerminationProtection_DISABLED = ManagedTerminationProtection' "DISABLED"

pattern ManagedTerminationProtection_ENABLED :: ManagedTerminationProtection
pattern $bManagedTerminationProtection_ENABLED :: ManagedTerminationProtection
$mManagedTerminationProtection_ENABLED :: forall r.
ManagedTerminationProtection -> (Void# -> r) -> (Void# -> r) -> r
ManagedTerminationProtection_ENABLED = ManagedTerminationProtection' "ENABLED"

{-# COMPLETE
  ManagedTerminationProtection_DISABLED,
  ManagedTerminationProtection_ENABLED,
  ManagedTerminationProtection'
  #-}