{-# 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.CodeGuruReviewer.Types.EncryptionOption
-- 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.CodeGuruReviewer.Types.EncryptionOption
  ( EncryptionOption
      ( ..,
        EncryptionOption_AWS_OWNED_CMK,
        EncryptionOption_CUSTOMER_MANAGED_CMK
      ),
  )
where

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

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

pattern EncryptionOption_AWS_OWNED_CMK :: EncryptionOption
pattern $bEncryptionOption_AWS_OWNED_CMK :: EncryptionOption
$mEncryptionOption_AWS_OWNED_CMK :: forall r. EncryptionOption -> (Void# -> r) -> (Void# -> r) -> r
EncryptionOption_AWS_OWNED_CMK = EncryptionOption' "AWS_OWNED_CMK"

pattern EncryptionOption_CUSTOMER_MANAGED_CMK :: EncryptionOption
pattern $bEncryptionOption_CUSTOMER_MANAGED_CMK :: EncryptionOption
$mEncryptionOption_CUSTOMER_MANAGED_CMK :: forall r. EncryptionOption -> (Void# -> r) -> (Void# -> r) -> r
EncryptionOption_CUSTOMER_MANAGED_CMK = EncryptionOption' "CUSTOMER_MANAGED_CMK"

{-# COMPLETE
  EncryptionOption_AWS_OWNED_CMK,
  EncryptionOption_CUSTOMER_MANAGED_CMK,
  EncryptionOption'
  #-}