{-# 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.EC2.Types.ShutdownBehavior
-- 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.EC2.Types.ShutdownBehavior
  ( ShutdownBehavior
      ( ..,
        ShutdownBehavior_Stop,
        ShutdownBehavior_Terminate
      ),
  )
where

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

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

pattern ShutdownBehavior_Stop :: ShutdownBehavior
pattern $bShutdownBehavior_Stop :: ShutdownBehavior
$mShutdownBehavior_Stop :: forall {r}. ShutdownBehavior -> ((# #) -> r) -> ((# #) -> r) -> r
ShutdownBehavior_Stop = ShutdownBehavior' "stop"

pattern ShutdownBehavior_Terminate :: ShutdownBehavior
pattern $bShutdownBehavior_Terminate :: ShutdownBehavior
$mShutdownBehavior_Terminate :: forall {r}. ShutdownBehavior -> ((# #) -> r) -> ((# #) -> r) -> r
ShutdownBehavior_Terminate = ShutdownBehavior' "terminate"

{-# COMPLETE
  ShutdownBehavior_Stop,
  ShutdownBehavior_Terminate,
  ShutdownBehavior'
  #-}