{-# 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.Glue.Types.ExistCondition
-- 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.Glue.Types.ExistCondition
  ( ExistCondition
      ( ..,
        ExistCondition_MUST_EXIST,
        ExistCondition_NONE,
        ExistCondition_NOT_EXIST
      ),
  )
where

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

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

pattern ExistCondition_MUST_EXIST :: ExistCondition
pattern $bExistCondition_MUST_EXIST :: ExistCondition
$mExistCondition_MUST_EXIST :: forall r. ExistCondition -> (Void# -> r) -> (Void# -> r) -> r
ExistCondition_MUST_EXIST = ExistCondition' "MUST_EXIST"

pattern ExistCondition_NONE :: ExistCondition
pattern $bExistCondition_NONE :: ExistCondition
$mExistCondition_NONE :: forall r. ExistCondition -> (Void# -> r) -> (Void# -> r) -> r
ExistCondition_NONE = ExistCondition' "NONE"

pattern ExistCondition_NOT_EXIST :: ExistCondition
pattern $bExistCondition_NOT_EXIST :: ExistCondition
$mExistCondition_NOT_EXIST :: forall r. ExistCondition -> (Void# -> r) -> (Void# -> r) -> r
ExistCondition_NOT_EXIST = ExistCondition' "NOT_EXIST"

{-# COMPLETE
  ExistCondition_MUST_EXIST,
  ExistCondition_NONE,
  ExistCondition_NOT_EXIST,
  ExistCondition'
  #-}