{-# 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.LexModels.Types.MergeStrategy
-- 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.LexModels.Types.MergeStrategy
  ( MergeStrategy
      ( ..,
        MergeStrategy_FAIL_ON_CONFLICT,
        MergeStrategy_OVERWRITE_LATEST
      ),
  )
where

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

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

pattern MergeStrategy_FAIL_ON_CONFLICT :: MergeStrategy
pattern $bMergeStrategy_FAIL_ON_CONFLICT :: MergeStrategy
$mMergeStrategy_FAIL_ON_CONFLICT :: forall r. MergeStrategy -> (Void# -> r) -> (Void# -> r) -> r
MergeStrategy_FAIL_ON_CONFLICT = MergeStrategy' "FAIL_ON_CONFLICT"

pattern MergeStrategy_OVERWRITE_LATEST :: MergeStrategy
pattern $bMergeStrategy_OVERWRITE_LATEST :: MergeStrategy
$mMergeStrategy_OVERWRITE_LATEST :: forall r. MergeStrategy -> (Void# -> r) -> (Void# -> r) -> r
MergeStrategy_OVERWRITE_LATEST = MergeStrategy' "OVERWRITE_LATEST"

{-# COMPLETE
  MergeStrategy_FAIL_ON_CONFLICT,
  MergeStrategy_OVERWRITE_LATEST,
  MergeStrategy'
  #-}