{-# 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.AutoPlacement
-- 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.AutoPlacement
  ( AutoPlacement
      ( ..,
        AutoPlacement_Off,
        AutoPlacement_On
      ),
  )
where

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

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

pattern AutoPlacement_Off :: AutoPlacement
pattern $bAutoPlacement_Off :: AutoPlacement
$mAutoPlacement_Off :: forall {r}. AutoPlacement -> ((# #) -> r) -> ((# #) -> r) -> r
AutoPlacement_Off = AutoPlacement' "off"

pattern AutoPlacement_On :: AutoPlacement
pattern $bAutoPlacement_On :: AutoPlacement
$mAutoPlacement_On :: forall {r}. AutoPlacement -> ((# #) -> r) -> ((# #) -> r) -> r
AutoPlacement_On = AutoPlacement' "on"

{-# COMPLETE
  AutoPlacement_Off,
  AutoPlacement_On,
  AutoPlacement'
  #-}