{-# 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.CognitoSync.Types.Operation
-- 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.CognitoSync.Types.Operation
  ( Operation
      ( ..,
        Operation_Remove,
        Operation_Replace
      ),
  )
where

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

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

pattern Operation_Remove :: Operation
pattern $bOperation_Remove :: Operation
$mOperation_Remove :: forall r. Operation -> (Void# -> r) -> (Void# -> r) -> r
Operation_Remove = Operation' "remove"

pattern Operation_Replace :: Operation
pattern $bOperation_Replace :: Operation
$mOperation_Replace :: forall r. Operation -> (Void# -> r) -> (Void# -> r) -> r
Operation_Replace = Operation' "replace"

{-# COMPLETE
  Operation_Remove,
  Operation_Replace,
  Operation'
  #-}