{-# 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.CloudDirectory.Types.UpdateActionType
-- 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.CloudDirectory.Types.UpdateActionType
  ( UpdateActionType
      ( ..,
        UpdateActionType_CREATE_OR_UPDATE,
        UpdateActionType_DELETE
      ),
  )
where

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

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

pattern UpdateActionType_CREATE_OR_UPDATE :: UpdateActionType
pattern $bUpdateActionType_CREATE_OR_UPDATE :: UpdateActionType
$mUpdateActionType_CREATE_OR_UPDATE :: forall r. UpdateActionType -> (Void# -> r) -> (Void# -> r) -> r
UpdateActionType_CREATE_OR_UPDATE = UpdateActionType' "CREATE_OR_UPDATE"

pattern UpdateActionType_DELETE :: UpdateActionType
pattern $bUpdateActionType_DELETE :: UpdateActionType
$mUpdateActionType_DELETE :: forall r. UpdateActionType -> (Void# -> r) -> (Void# -> r) -> r
UpdateActionType_DELETE = UpdateActionType' "DELETE"

{-# COMPLETE
  UpdateActionType_CREATE_OR_UPDATE,
  UpdateActionType_DELETE,
  UpdateActionType'
  #-}