{-# 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.KubernetesConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GuardDuty.Types.KubernetesAuditLogsConfiguration
import qualified Amazonka.Prelude as Prelude
data KubernetesConfiguration = KubernetesConfiguration'
{
KubernetesConfiguration -> KubernetesAuditLogsConfiguration
auditLogs :: KubernetesAuditLogsConfiguration
}
deriving (KubernetesConfiguration -> KubernetesConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KubernetesConfiguration -> KubernetesConfiguration -> Bool
$c/= :: KubernetesConfiguration -> KubernetesConfiguration -> Bool
== :: KubernetesConfiguration -> KubernetesConfiguration -> Bool
$c== :: KubernetesConfiguration -> KubernetesConfiguration -> Bool
Prelude.Eq, ReadPrec [KubernetesConfiguration]
ReadPrec KubernetesConfiguration
Int -> ReadS KubernetesConfiguration
ReadS [KubernetesConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KubernetesConfiguration]
$creadListPrec :: ReadPrec [KubernetesConfiguration]
readPrec :: ReadPrec KubernetesConfiguration
$creadPrec :: ReadPrec KubernetesConfiguration
readList :: ReadS [KubernetesConfiguration]
$creadList :: ReadS [KubernetesConfiguration]
readsPrec :: Int -> ReadS KubernetesConfiguration
$creadsPrec :: Int -> ReadS KubernetesConfiguration
Prelude.Read, Int -> KubernetesConfiguration -> ShowS
[KubernetesConfiguration] -> ShowS
KubernetesConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KubernetesConfiguration] -> ShowS
$cshowList :: [KubernetesConfiguration] -> ShowS
show :: KubernetesConfiguration -> String
$cshow :: KubernetesConfiguration -> String
showsPrec :: Int -> KubernetesConfiguration -> ShowS
$cshowsPrec :: Int -> KubernetesConfiguration -> ShowS
Prelude.Show, forall x. Rep KubernetesConfiguration x -> KubernetesConfiguration
forall x. KubernetesConfiguration -> Rep KubernetesConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KubernetesConfiguration x -> KubernetesConfiguration
$cfrom :: forall x. KubernetesConfiguration -> Rep KubernetesConfiguration x
Prelude.Generic)
newKubernetesConfiguration ::
KubernetesAuditLogsConfiguration ->
KubernetesConfiguration
newKubernetesConfiguration :: KubernetesAuditLogsConfiguration -> KubernetesConfiguration
newKubernetesConfiguration KubernetesAuditLogsConfiguration
pAuditLogs_ =
KubernetesConfiguration' {$sel:auditLogs:KubernetesConfiguration' :: KubernetesAuditLogsConfiguration
auditLogs = KubernetesAuditLogsConfiguration
pAuditLogs_}
kubernetesConfiguration_auditLogs :: Lens.Lens' KubernetesConfiguration KubernetesAuditLogsConfiguration
kubernetesConfiguration_auditLogs :: Lens' KubernetesConfiguration KubernetesAuditLogsConfiguration
kubernetesConfiguration_auditLogs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KubernetesConfiguration' {KubernetesAuditLogsConfiguration
auditLogs :: KubernetesAuditLogsConfiguration
$sel:auditLogs:KubernetesConfiguration' :: KubernetesConfiguration -> KubernetesAuditLogsConfiguration
auditLogs} -> KubernetesAuditLogsConfiguration
auditLogs) (\s :: KubernetesConfiguration
s@KubernetesConfiguration' {} KubernetesAuditLogsConfiguration
a -> KubernetesConfiguration
s {$sel:auditLogs:KubernetesConfiguration' :: KubernetesAuditLogsConfiguration
auditLogs = KubernetesAuditLogsConfiguration
a} :: KubernetesConfiguration)
instance Prelude.Hashable KubernetesConfiguration where
hashWithSalt :: Int -> KubernetesConfiguration -> Int
hashWithSalt Int
_salt KubernetesConfiguration' {KubernetesAuditLogsConfiguration
auditLogs :: KubernetesAuditLogsConfiguration
$sel:auditLogs:KubernetesConfiguration' :: KubernetesConfiguration -> KubernetesAuditLogsConfiguration
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` KubernetesAuditLogsConfiguration
auditLogs
instance Prelude.NFData KubernetesConfiguration where
rnf :: KubernetesConfiguration -> ()
rnf KubernetesConfiguration' {KubernetesAuditLogsConfiguration
auditLogs :: KubernetesAuditLogsConfiguration
$sel:auditLogs:KubernetesConfiguration' :: KubernetesConfiguration -> KubernetesAuditLogsConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf KubernetesAuditLogsConfiguration
auditLogs
instance Data.ToJSON KubernetesConfiguration where
toJSON :: KubernetesConfiguration -> Value
toJSON KubernetesConfiguration' {KubernetesAuditLogsConfiguration
auditLogs :: KubernetesAuditLogsConfiguration
$sel:auditLogs:KubernetesConfiguration' :: KubernetesConfiguration -> KubernetesAuditLogsConfiguration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"auditLogs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= KubernetesAuditLogsConfiguration
auditLogs)]
)