{-# 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.Grafana.Types.UpdateAction
-- 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.Grafana.Types.UpdateAction
  ( UpdateAction
      ( ..,
        UpdateAction_ADD,
        UpdateAction_REVOKE
      ),
  )
where

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

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

pattern UpdateAction_ADD :: UpdateAction
pattern $bUpdateAction_ADD :: UpdateAction
$mUpdateAction_ADD :: forall r. UpdateAction -> (Void# -> r) -> (Void# -> r) -> r
UpdateAction_ADD = UpdateAction' "ADD"

pattern UpdateAction_REVOKE :: UpdateAction
pattern $bUpdateAction_REVOKE :: UpdateAction
$mUpdateAction_REVOKE :: forall r. UpdateAction -> (Void# -> r) -> (Void# -> r) -> r
UpdateAction_REVOKE = UpdateAction' "REVOKE"

{-# COMPLETE
  UpdateAction_ADD,
  UpdateAction_REVOKE,
  UpdateAction'
  #-}