{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.GuardDuty.Types.DefaultServerSideEncryption where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DefaultServerSideEncryption = DefaultServerSideEncryption'
{
DefaultServerSideEncryption -> Maybe Text
encryptionType :: Prelude.Maybe Prelude.Text,
DefaultServerSideEncryption -> Maybe Text
kmsMasterKeyArn :: Prelude.Maybe Prelude.Text
}
deriving (DefaultServerSideEncryption -> DefaultServerSideEncryption -> Bool
(DefaultServerSideEncryption
-> DefaultServerSideEncryption -> Bool)
-> (DefaultServerSideEncryption
-> DefaultServerSideEncryption -> Bool)
-> Eq DefaultServerSideEncryption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefaultServerSideEncryption -> DefaultServerSideEncryption -> Bool
$c/= :: DefaultServerSideEncryption -> DefaultServerSideEncryption -> Bool
== :: DefaultServerSideEncryption -> DefaultServerSideEncryption -> Bool
$c== :: DefaultServerSideEncryption -> DefaultServerSideEncryption -> Bool
Prelude.Eq, ReadPrec [DefaultServerSideEncryption]
ReadPrec DefaultServerSideEncryption
Int -> ReadS DefaultServerSideEncryption
ReadS [DefaultServerSideEncryption]
(Int -> ReadS DefaultServerSideEncryption)
-> ReadS [DefaultServerSideEncryption]
-> ReadPrec DefaultServerSideEncryption
-> ReadPrec [DefaultServerSideEncryption]
-> Read DefaultServerSideEncryption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefaultServerSideEncryption]
$creadListPrec :: ReadPrec [DefaultServerSideEncryption]
readPrec :: ReadPrec DefaultServerSideEncryption
$creadPrec :: ReadPrec DefaultServerSideEncryption
readList :: ReadS [DefaultServerSideEncryption]
$creadList :: ReadS [DefaultServerSideEncryption]
readsPrec :: Int -> ReadS DefaultServerSideEncryption
$creadsPrec :: Int -> ReadS DefaultServerSideEncryption
Prelude.Read, Int -> DefaultServerSideEncryption -> ShowS
[DefaultServerSideEncryption] -> ShowS
DefaultServerSideEncryption -> String
(Int -> DefaultServerSideEncryption -> ShowS)
-> (DefaultServerSideEncryption -> String)
-> ([DefaultServerSideEncryption] -> ShowS)
-> Show DefaultServerSideEncryption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefaultServerSideEncryption] -> ShowS
$cshowList :: [DefaultServerSideEncryption] -> ShowS
show :: DefaultServerSideEncryption -> String
$cshow :: DefaultServerSideEncryption -> String
showsPrec :: Int -> DefaultServerSideEncryption -> ShowS
$cshowsPrec :: Int -> DefaultServerSideEncryption -> ShowS
Prelude.Show, (forall x.
DefaultServerSideEncryption -> Rep DefaultServerSideEncryption x)
-> (forall x.
Rep DefaultServerSideEncryption x -> DefaultServerSideEncryption)
-> Generic DefaultServerSideEncryption
forall x.
Rep DefaultServerSideEncryption x -> DefaultServerSideEncryption
forall x.
DefaultServerSideEncryption -> Rep DefaultServerSideEncryption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DefaultServerSideEncryption x -> DefaultServerSideEncryption
$cfrom :: forall x.
DefaultServerSideEncryption -> Rep DefaultServerSideEncryption x
Prelude.Generic)
newDefaultServerSideEncryption ::
DefaultServerSideEncryption
newDefaultServerSideEncryption :: DefaultServerSideEncryption
newDefaultServerSideEncryption =
DefaultServerSideEncryption' :: Maybe Text -> Maybe Text -> DefaultServerSideEncryption
DefaultServerSideEncryption'
{ $sel:encryptionType:DefaultServerSideEncryption' :: Maybe Text
encryptionType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsMasterKeyArn:DefaultServerSideEncryption' :: Maybe Text
kmsMasterKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
defaultServerSideEncryption_encryptionType :: Lens.Lens' DefaultServerSideEncryption (Prelude.Maybe Prelude.Text)
defaultServerSideEncryption_encryptionType :: (Maybe Text -> f (Maybe Text))
-> DefaultServerSideEncryption -> f DefaultServerSideEncryption
defaultServerSideEncryption_encryptionType = (DefaultServerSideEncryption -> Maybe Text)
-> (DefaultServerSideEncryption
-> Maybe Text -> DefaultServerSideEncryption)
-> Lens
DefaultServerSideEncryption
DefaultServerSideEncryption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultServerSideEncryption' {Maybe Text
encryptionType :: Maybe Text
$sel:encryptionType:DefaultServerSideEncryption' :: DefaultServerSideEncryption -> Maybe Text
encryptionType} -> Maybe Text
encryptionType) (\s :: DefaultServerSideEncryption
s@DefaultServerSideEncryption' {} Maybe Text
a -> DefaultServerSideEncryption
s {$sel:encryptionType:DefaultServerSideEncryption' :: Maybe Text
encryptionType = Maybe Text
a} :: DefaultServerSideEncryption)
defaultServerSideEncryption_kmsMasterKeyArn :: Lens.Lens' DefaultServerSideEncryption (Prelude.Maybe Prelude.Text)
defaultServerSideEncryption_kmsMasterKeyArn :: (Maybe Text -> f (Maybe Text))
-> DefaultServerSideEncryption -> f DefaultServerSideEncryption
defaultServerSideEncryption_kmsMasterKeyArn = (DefaultServerSideEncryption -> Maybe Text)
-> (DefaultServerSideEncryption
-> Maybe Text -> DefaultServerSideEncryption)
-> Lens
DefaultServerSideEncryption
DefaultServerSideEncryption
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultServerSideEncryption' {Maybe Text
kmsMasterKeyArn :: Maybe Text
$sel:kmsMasterKeyArn:DefaultServerSideEncryption' :: DefaultServerSideEncryption -> Maybe Text
kmsMasterKeyArn} -> Maybe Text
kmsMasterKeyArn) (\s :: DefaultServerSideEncryption
s@DefaultServerSideEncryption' {} Maybe Text
a -> DefaultServerSideEncryption
s {$sel:kmsMasterKeyArn:DefaultServerSideEncryption' :: Maybe Text
kmsMasterKeyArn = Maybe Text
a} :: DefaultServerSideEncryption)
instance Core.FromJSON DefaultServerSideEncryption where
parseJSON :: Value -> Parser DefaultServerSideEncryption
parseJSON =
String
-> (Object -> Parser DefaultServerSideEncryption)
-> Value
-> Parser DefaultServerSideEncryption
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DefaultServerSideEncryption"
( \Object
x ->
Maybe Text -> Maybe Text -> DefaultServerSideEncryption
DefaultServerSideEncryption'
(Maybe Text -> Maybe Text -> DefaultServerSideEncryption)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DefaultServerSideEncryption)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryptionType")
Parser (Maybe Text -> DefaultServerSideEncryption)
-> Parser (Maybe Text) -> Parser DefaultServerSideEncryption
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"kmsMasterKeyArn")
)
instance Prelude.Hashable DefaultServerSideEncryption
instance Prelude.NFData DefaultServerSideEncryption