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