{-# 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.AppSync.Types.ConflictHandlerType
-- 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.AppSync.Types.ConflictHandlerType
  ( ConflictHandlerType
      ( ..,
        ConflictHandlerType_AUTOMERGE,
        ConflictHandlerType_LAMBDA,
        ConflictHandlerType_NONE,
        ConflictHandlerType_OPTIMISTIC_CONCURRENCY
      ),
  )
where

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

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

pattern ConflictHandlerType_AUTOMERGE :: ConflictHandlerType
pattern $bConflictHandlerType_AUTOMERGE :: ConflictHandlerType
$mConflictHandlerType_AUTOMERGE :: forall r. ConflictHandlerType -> (Void# -> r) -> (Void# -> r) -> r
ConflictHandlerType_AUTOMERGE = ConflictHandlerType' "AUTOMERGE"

pattern ConflictHandlerType_LAMBDA :: ConflictHandlerType
pattern $bConflictHandlerType_LAMBDA :: ConflictHandlerType
$mConflictHandlerType_LAMBDA :: forall r. ConflictHandlerType -> (Void# -> r) -> (Void# -> r) -> r
ConflictHandlerType_LAMBDA = ConflictHandlerType' "LAMBDA"

pattern ConflictHandlerType_NONE :: ConflictHandlerType
pattern $bConflictHandlerType_NONE :: ConflictHandlerType
$mConflictHandlerType_NONE :: forall r. ConflictHandlerType -> (Void# -> r) -> (Void# -> r) -> r
ConflictHandlerType_NONE = ConflictHandlerType' "NONE"

pattern ConflictHandlerType_OPTIMISTIC_CONCURRENCY :: ConflictHandlerType
pattern $bConflictHandlerType_OPTIMISTIC_CONCURRENCY :: ConflictHandlerType
$mConflictHandlerType_OPTIMISTIC_CONCURRENCY :: forall r. ConflictHandlerType -> (Void# -> r) -> (Void# -> r) -> r
ConflictHandlerType_OPTIMISTIC_CONCURRENCY = ConflictHandlerType' "OPTIMISTIC_CONCURRENCY"

{-# COMPLETE
  ConflictHandlerType_AUTOMERGE,
  ConflictHandlerType_LAMBDA,
  ConflictHandlerType_NONE,
  ConflictHandlerType_OPTIMISTIC_CONCURRENCY,
  ConflictHandlerType'
  #-}