{-# 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.AmplifyBackend.Types.ResolutionStrategy
-- 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.AmplifyBackend.Types.ResolutionStrategy
  ( ResolutionStrategy
      ( ..,
        ResolutionStrategy_AUTOMERGE,
        ResolutionStrategy_LAMBDA,
        ResolutionStrategy_NONE,
        ResolutionStrategy_OPTIMISTIC_CONCURRENCY
      ),
  )
where

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

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

pattern ResolutionStrategy_AUTOMERGE :: ResolutionStrategy
pattern $bResolutionStrategy_AUTOMERGE :: ResolutionStrategy
$mResolutionStrategy_AUTOMERGE :: forall r. ResolutionStrategy -> (Void# -> r) -> (Void# -> r) -> r
ResolutionStrategy_AUTOMERGE = ResolutionStrategy' "AUTOMERGE"

pattern ResolutionStrategy_LAMBDA :: ResolutionStrategy
pattern $bResolutionStrategy_LAMBDA :: ResolutionStrategy
$mResolutionStrategy_LAMBDA :: forall r. ResolutionStrategy -> (Void# -> r) -> (Void# -> r) -> r
ResolutionStrategy_LAMBDA = ResolutionStrategy' "LAMBDA"

pattern ResolutionStrategy_NONE :: ResolutionStrategy
pattern $bResolutionStrategy_NONE :: ResolutionStrategy
$mResolutionStrategy_NONE :: forall r. ResolutionStrategy -> (Void# -> r) -> (Void# -> r) -> r
ResolutionStrategy_NONE = ResolutionStrategy' "NONE"

pattern ResolutionStrategy_OPTIMISTIC_CONCURRENCY :: ResolutionStrategy
pattern $bResolutionStrategy_OPTIMISTIC_CONCURRENCY :: ResolutionStrategy
$mResolutionStrategy_OPTIMISTIC_CONCURRENCY :: forall r. ResolutionStrategy -> (Void# -> r) -> (Void# -> r) -> r
ResolutionStrategy_OPTIMISTIC_CONCURRENCY = ResolutionStrategy' "OPTIMISTIC_CONCURRENCY"

{-# COMPLETE
  ResolutionStrategy_AUTOMERGE,
  ResolutionStrategy_LAMBDA,
  ResolutionStrategy_NONE,
  ResolutionStrategy_OPTIMISTIC_CONCURRENCY,
  ResolutionStrategy'
  #-}