{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype UpdateAction = UpdateAction'
  { UpdateAction -> Text
fromUpdateAction ::
      Data.Text
  }
  deriving stock
    ( Int -> UpdateAction -> ShowS
[UpdateAction] -> ShowS
UpdateAction -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq UpdateAction
Int -> UpdateAction -> Int
UpdateAction -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: UpdateAction -> ()
$crnf :: UpdateAction -> ()
Prelude.NFData,
      Text -> Either String UpdateAction
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String UpdateAction
$cfromText :: Text -> Either String UpdateAction
Data.FromText,
      UpdateAction -> Text
forall a. (a -> Text) -> ToText a
toText :: UpdateAction -> Text
$ctoText :: UpdateAction -> Text
Data.ToText,
      UpdateAction -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: UpdateAction -> ByteString
$ctoBS :: UpdateAction -> ByteString
Data.ToByteString,
      UpdateAction -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: UpdateAction -> ByteStringBuilder
$cbuild :: UpdateAction -> ByteStringBuilder
Data.ToLog,
      HeaderName -> UpdateAction -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> UpdateAction -> [Header]
$ctoHeader :: HeaderName -> UpdateAction -> [Header]
Data.ToHeader,
      UpdateAction -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: UpdateAction -> QueryString
$ctoQuery :: UpdateAction -> QueryString
Data.ToQuery,
      Value -> Parser [UpdateAction]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [UpdateAction]
FromJSONKeyFunction UpdateAction
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [UpdateAction]
$cfromJSONKeyList :: FromJSONKeyFunction [UpdateAction]
fromJSONKey :: FromJSONKeyFunction UpdateAction
$cfromJSONKey :: FromJSONKeyFunction UpdateAction
Data.FromJSONKey,
      [UpdateAction] -> Encoding
[UpdateAction] -> Value
UpdateAction -> Encoding
UpdateAction -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [UpdateAction]
ToJSONKeyFunction UpdateAction
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [UpdateAction]
$ctoJSONKeyList :: ToJSONKeyFunction [UpdateAction]
toJSONKey :: ToJSONKeyFunction UpdateAction
$ctoJSONKey :: ToJSONKeyFunction UpdateAction
Data.ToJSONKey,
      [Node] -> Either String UpdateAction
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String UpdateAction
$cparseXML :: [Node] -> Either String UpdateAction
Data.FromXML,
      UpdateAction -> XML
forall a. (a -> XML) -> ToXML a
toXML :: UpdateAction -> XML
$ctoXML :: UpdateAction -> XML
Data.ToXML
    )

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

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

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