{-# 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.AccessAnalyzer.Types.KmsGrantOperation
-- 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.AccessAnalyzer.Types.KmsGrantOperation
  ( KmsGrantOperation
      ( ..,
        KmsGrantOperation_CreateGrant,
        KmsGrantOperation_Decrypt,
        KmsGrantOperation_DescribeKey,
        KmsGrantOperation_Encrypt,
        KmsGrantOperation_GenerateDataKey,
        KmsGrantOperation_GenerateDataKeyPair,
        KmsGrantOperation_GenerateDataKeyPairWithoutPlaintext,
        KmsGrantOperation_GenerateDataKeyWithoutPlaintext,
        KmsGrantOperation_GetPublicKey,
        KmsGrantOperation_ReEncryptFrom,
        KmsGrantOperation_ReEncryptTo,
        KmsGrantOperation_RetireGrant,
        KmsGrantOperation_Sign,
        KmsGrantOperation_Verify
      ),
  )
where

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

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

pattern KmsGrantOperation_CreateGrant :: KmsGrantOperation
pattern $bKmsGrantOperation_CreateGrant :: KmsGrantOperation
$mKmsGrantOperation_CreateGrant :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_CreateGrant = KmsGrantOperation' "CreateGrant"

pattern KmsGrantOperation_Decrypt :: KmsGrantOperation
pattern $bKmsGrantOperation_Decrypt :: KmsGrantOperation
$mKmsGrantOperation_Decrypt :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_Decrypt = KmsGrantOperation' "Decrypt"

pattern KmsGrantOperation_DescribeKey :: KmsGrantOperation
pattern $bKmsGrantOperation_DescribeKey :: KmsGrantOperation
$mKmsGrantOperation_DescribeKey :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_DescribeKey = KmsGrantOperation' "DescribeKey"

pattern KmsGrantOperation_Encrypt :: KmsGrantOperation
pattern $bKmsGrantOperation_Encrypt :: KmsGrantOperation
$mKmsGrantOperation_Encrypt :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_Encrypt = KmsGrantOperation' "Encrypt"

pattern KmsGrantOperation_GenerateDataKey :: KmsGrantOperation
pattern $bKmsGrantOperation_GenerateDataKey :: KmsGrantOperation
$mKmsGrantOperation_GenerateDataKey :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_GenerateDataKey = KmsGrantOperation' "GenerateDataKey"

pattern KmsGrantOperation_GenerateDataKeyPair :: KmsGrantOperation
pattern $bKmsGrantOperation_GenerateDataKeyPair :: KmsGrantOperation
$mKmsGrantOperation_GenerateDataKeyPair :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_GenerateDataKeyPair = KmsGrantOperation' "GenerateDataKeyPair"

pattern KmsGrantOperation_GenerateDataKeyPairWithoutPlaintext :: KmsGrantOperation
pattern $bKmsGrantOperation_GenerateDataKeyPairWithoutPlaintext :: KmsGrantOperation
$mKmsGrantOperation_GenerateDataKeyPairWithoutPlaintext :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_GenerateDataKeyPairWithoutPlaintext = KmsGrantOperation' "GenerateDataKeyPairWithoutPlaintext"

pattern KmsGrantOperation_GenerateDataKeyWithoutPlaintext :: KmsGrantOperation
pattern $bKmsGrantOperation_GenerateDataKeyWithoutPlaintext :: KmsGrantOperation
$mKmsGrantOperation_GenerateDataKeyWithoutPlaintext :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_GenerateDataKeyWithoutPlaintext = KmsGrantOperation' "GenerateDataKeyWithoutPlaintext"

pattern KmsGrantOperation_GetPublicKey :: KmsGrantOperation
pattern $bKmsGrantOperation_GetPublicKey :: KmsGrantOperation
$mKmsGrantOperation_GetPublicKey :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_GetPublicKey = KmsGrantOperation' "GetPublicKey"

pattern KmsGrantOperation_ReEncryptFrom :: KmsGrantOperation
pattern $bKmsGrantOperation_ReEncryptFrom :: KmsGrantOperation
$mKmsGrantOperation_ReEncryptFrom :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_ReEncryptFrom = KmsGrantOperation' "ReEncryptFrom"

pattern KmsGrantOperation_ReEncryptTo :: KmsGrantOperation
pattern $bKmsGrantOperation_ReEncryptTo :: KmsGrantOperation
$mKmsGrantOperation_ReEncryptTo :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_ReEncryptTo = KmsGrantOperation' "ReEncryptTo"

pattern KmsGrantOperation_RetireGrant :: KmsGrantOperation
pattern $bKmsGrantOperation_RetireGrant :: KmsGrantOperation
$mKmsGrantOperation_RetireGrant :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_RetireGrant = KmsGrantOperation' "RetireGrant"

pattern KmsGrantOperation_Sign :: KmsGrantOperation
pattern $bKmsGrantOperation_Sign :: KmsGrantOperation
$mKmsGrantOperation_Sign :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_Sign = KmsGrantOperation' "Sign"

pattern KmsGrantOperation_Verify :: KmsGrantOperation
pattern $bKmsGrantOperation_Verify :: KmsGrantOperation
$mKmsGrantOperation_Verify :: forall r. KmsGrantOperation -> (Void# -> r) -> (Void# -> r) -> r
KmsGrantOperation_Verify = KmsGrantOperation' "Verify"

{-# COMPLETE
  KmsGrantOperation_CreateGrant,
  KmsGrantOperation_Decrypt,
  KmsGrantOperation_DescribeKey,
  KmsGrantOperation_Encrypt,
  KmsGrantOperation_GenerateDataKey,
  KmsGrantOperation_GenerateDataKeyPair,
  KmsGrantOperation_GenerateDataKeyPairWithoutPlaintext,
  KmsGrantOperation_GenerateDataKeyWithoutPlaintext,
  KmsGrantOperation_GetPublicKey,
  KmsGrantOperation_ReEncryptFrom,
  KmsGrantOperation_ReEncryptTo,
  KmsGrantOperation_RetireGrant,
  KmsGrantOperation_Sign,
  KmsGrantOperation_Verify,
  KmsGrantOperation'
  #-}