{-# 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.CloudWatchEvents.Types.PlacementConstraintType
-- 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.CloudWatchEvents.Types.PlacementConstraintType
  ( PlacementConstraintType
      ( ..,
        PlacementConstraintType_DistinctInstance,
        PlacementConstraintType_MemberOf
      ),
  )
where

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

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

pattern PlacementConstraintType_DistinctInstance :: PlacementConstraintType
pattern $bPlacementConstraintType_DistinctInstance :: PlacementConstraintType
$mPlacementConstraintType_DistinctInstance :: forall {r}.
PlacementConstraintType -> ((# #) -> r) -> ((# #) -> r) -> r
PlacementConstraintType_DistinctInstance = PlacementConstraintType' "distinctInstance"

pattern PlacementConstraintType_MemberOf :: PlacementConstraintType
pattern $bPlacementConstraintType_MemberOf :: PlacementConstraintType
$mPlacementConstraintType_MemberOf :: forall {r}.
PlacementConstraintType -> ((# #) -> r) -> ((# #) -> r) -> r
PlacementConstraintType_MemberOf = PlacementConstraintType' "memberOf"

{-# COMPLETE
  PlacementConstraintType_DistinctInstance,
  PlacementConstraintType_MemberOf,
  PlacementConstraintType'
  #-}