{-# 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.SecurityHub.Types.AwsEksClusterLoggingDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEksClusterLoggingClusterLoggingDetails
data AwsEksClusterLoggingDetails = AwsEksClusterLoggingDetails'
{
AwsEksClusterLoggingDetails
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging :: Prelude.Maybe [AwsEksClusterLoggingClusterLoggingDetails]
}
deriving (AwsEksClusterLoggingDetails -> AwsEksClusterLoggingDetails -> Bool
(AwsEksClusterLoggingDetails
-> AwsEksClusterLoggingDetails -> Bool)
-> (AwsEksClusterLoggingDetails
-> AwsEksClusterLoggingDetails -> Bool)
-> Eq AwsEksClusterLoggingDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEksClusterLoggingDetails -> AwsEksClusterLoggingDetails -> Bool
$c/= :: AwsEksClusterLoggingDetails -> AwsEksClusterLoggingDetails -> Bool
== :: AwsEksClusterLoggingDetails -> AwsEksClusterLoggingDetails -> Bool
$c== :: AwsEksClusterLoggingDetails -> AwsEksClusterLoggingDetails -> Bool
Prelude.Eq, ReadPrec [AwsEksClusterLoggingDetails]
ReadPrec AwsEksClusterLoggingDetails
Int -> ReadS AwsEksClusterLoggingDetails
ReadS [AwsEksClusterLoggingDetails]
(Int -> ReadS AwsEksClusterLoggingDetails)
-> ReadS [AwsEksClusterLoggingDetails]
-> ReadPrec AwsEksClusterLoggingDetails
-> ReadPrec [AwsEksClusterLoggingDetails]
-> Read AwsEksClusterLoggingDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEksClusterLoggingDetails]
$creadListPrec :: ReadPrec [AwsEksClusterLoggingDetails]
readPrec :: ReadPrec AwsEksClusterLoggingDetails
$creadPrec :: ReadPrec AwsEksClusterLoggingDetails
readList :: ReadS [AwsEksClusterLoggingDetails]
$creadList :: ReadS [AwsEksClusterLoggingDetails]
readsPrec :: Int -> ReadS AwsEksClusterLoggingDetails
$creadsPrec :: Int -> ReadS AwsEksClusterLoggingDetails
Prelude.Read, Int -> AwsEksClusterLoggingDetails -> ShowS
[AwsEksClusterLoggingDetails] -> ShowS
AwsEksClusterLoggingDetails -> String
(Int -> AwsEksClusterLoggingDetails -> ShowS)
-> (AwsEksClusterLoggingDetails -> String)
-> ([AwsEksClusterLoggingDetails] -> ShowS)
-> Show AwsEksClusterLoggingDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEksClusterLoggingDetails] -> ShowS
$cshowList :: [AwsEksClusterLoggingDetails] -> ShowS
show :: AwsEksClusterLoggingDetails -> String
$cshow :: AwsEksClusterLoggingDetails -> String
showsPrec :: Int -> AwsEksClusterLoggingDetails -> ShowS
$cshowsPrec :: Int -> AwsEksClusterLoggingDetails -> ShowS
Prelude.Show, (forall x.
AwsEksClusterLoggingDetails -> Rep AwsEksClusterLoggingDetails x)
-> (forall x.
Rep AwsEksClusterLoggingDetails x -> AwsEksClusterLoggingDetails)
-> Generic AwsEksClusterLoggingDetails
forall x.
Rep AwsEksClusterLoggingDetails x -> AwsEksClusterLoggingDetails
forall x.
AwsEksClusterLoggingDetails -> Rep AwsEksClusterLoggingDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEksClusterLoggingDetails x -> AwsEksClusterLoggingDetails
$cfrom :: forall x.
AwsEksClusterLoggingDetails -> Rep AwsEksClusterLoggingDetails x
Prelude.Generic)
newAwsEksClusterLoggingDetails ::
AwsEksClusterLoggingDetails
newAwsEksClusterLoggingDetails :: AwsEksClusterLoggingDetails
newAwsEksClusterLoggingDetails =
AwsEksClusterLoggingDetails' :: Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> AwsEksClusterLoggingDetails
AwsEksClusterLoggingDetails'
{ $sel:clusterLogging:AwsEksClusterLoggingDetails' :: Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging =
Maybe [AwsEksClusterLoggingClusterLoggingDetails]
forall a. Maybe a
Prelude.Nothing
}
awsEksClusterLoggingDetails_clusterLogging :: Lens.Lens' AwsEksClusterLoggingDetails (Prelude.Maybe [AwsEksClusterLoggingClusterLoggingDetails])
awsEksClusterLoggingDetails_clusterLogging :: (Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> f (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> AwsEksClusterLoggingDetails -> f AwsEksClusterLoggingDetails
awsEksClusterLoggingDetails_clusterLogging = (AwsEksClusterLoggingDetails
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails])
-> (AwsEksClusterLoggingDetails
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> AwsEksClusterLoggingDetails)
-> Lens
AwsEksClusterLoggingDetails
AwsEksClusterLoggingDetails
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEksClusterLoggingDetails' {Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging :: Maybe [AwsEksClusterLoggingClusterLoggingDetails]
$sel:clusterLogging:AwsEksClusterLoggingDetails' :: AwsEksClusterLoggingDetails
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging} -> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging) (\s :: AwsEksClusterLoggingDetails
s@AwsEksClusterLoggingDetails' {} Maybe [AwsEksClusterLoggingClusterLoggingDetails]
a -> AwsEksClusterLoggingDetails
s {$sel:clusterLogging:AwsEksClusterLoggingDetails' :: Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging = Maybe [AwsEksClusterLoggingClusterLoggingDetails]
a} :: AwsEksClusterLoggingDetails) ((Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> f (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> AwsEksClusterLoggingDetails -> f AwsEksClusterLoggingDetails)
-> ((Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> f (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> f (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> (Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> f (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> AwsEksClusterLoggingDetails
-> f AwsEksClusterLoggingDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
-> Iso
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
(Maybe [AwsEksClusterLoggingClusterLoggingDetails])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
[AwsEksClusterLoggingClusterLoggingDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON AwsEksClusterLoggingDetails where
parseJSON :: Value -> Parser AwsEksClusterLoggingDetails
parseJSON =
String
-> (Object -> Parser AwsEksClusterLoggingDetails)
-> Value
-> Parser AwsEksClusterLoggingDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEksClusterLoggingDetails"
( \Object
x ->
Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> AwsEksClusterLoggingDetails
AwsEksClusterLoggingDetails'
(Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> AwsEksClusterLoggingDetails)
-> Parser (Maybe [AwsEksClusterLoggingClusterLoggingDetails])
-> Parser AwsEksClusterLoggingDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Parser
(Maybe (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterLogging"
Parser (Maybe (Maybe [AwsEksClusterLoggingClusterLoggingDetails]))
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
-> Parser (Maybe [AwsEksClusterLoggingClusterLoggingDetails])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEksClusterLoggingClusterLoggingDetails]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable AwsEksClusterLoggingDetails
instance Prelude.NFData AwsEksClusterLoggingDetails
instance Core.ToJSON AwsEksClusterLoggingDetails where
toJSON :: AwsEksClusterLoggingDetails -> Value
toJSON AwsEksClusterLoggingDetails' {Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging :: Maybe [AwsEksClusterLoggingClusterLoggingDetails]
$sel:clusterLogging:AwsEksClusterLoggingDetails' :: AwsEksClusterLoggingDetails
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ClusterLogging" Text -> [AwsEksClusterLoggingClusterLoggingDetails] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AwsEksClusterLoggingClusterLoggingDetails] -> Pair)
-> Maybe [AwsEksClusterLoggingClusterLoggingDetails] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEksClusterLoggingClusterLoggingDetails]
clusterLogging
]
)