{-# 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.Lambda.Types.Layer where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Layer = Layer'
{
Layer -> Maybe Text
signingProfileVersionArn :: Prelude.Maybe Prelude.Text,
Layer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Layer -> Maybe Text
signingJobArn :: Prelude.Maybe Prelude.Text,
Layer -> Maybe Integer
codeSize :: Prelude.Maybe Prelude.Integer
}
deriving (Layer -> Layer -> Bool
(Layer -> Layer -> Bool) -> (Layer -> Layer -> Bool) -> Eq Layer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Layer -> Layer -> Bool
$c/= :: Layer -> Layer -> Bool
== :: Layer -> Layer -> Bool
$c== :: Layer -> Layer -> Bool
Prelude.Eq, ReadPrec [Layer]
ReadPrec Layer
Int -> ReadS Layer
ReadS [Layer]
(Int -> ReadS Layer)
-> ReadS [Layer]
-> ReadPrec Layer
-> ReadPrec [Layer]
-> Read Layer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Layer]
$creadListPrec :: ReadPrec [Layer]
readPrec :: ReadPrec Layer
$creadPrec :: ReadPrec Layer
readList :: ReadS [Layer]
$creadList :: ReadS [Layer]
readsPrec :: Int -> ReadS Layer
$creadsPrec :: Int -> ReadS Layer
Prelude.Read, Int -> Layer -> ShowS
[Layer] -> ShowS
Layer -> String
(Int -> Layer -> ShowS)
-> (Layer -> String) -> ([Layer] -> ShowS) -> Show Layer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Layer] -> ShowS
$cshowList :: [Layer] -> ShowS
show :: Layer -> String
$cshow :: Layer -> String
showsPrec :: Int -> Layer -> ShowS
$cshowsPrec :: Int -> Layer -> ShowS
Prelude.Show, (forall x. Layer -> Rep Layer x)
-> (forall x. Rep Layer x -> Layer) -> Generic Layer
forall x. Rep Layer x -> Layer
forall x. Layer -> Rep Layer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Layer x -> Layer
$cfrom :: forall x. Layer -> Rep Layer x
Prelude.Generic)
newLayer ::
Layer
newLayer :: Layer
newLayer =
Layer' :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Integer -> Layer
Layer'
{ $sel:signingProfileVersionArn:Layer' :: Maybe Text
signingProfileVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Layer' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:signingJobArn:Layer' :: Maybe Text
signingJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:codeSize:Layer' :: Maybe Integer
codeSize = Maybe Integer
forall a. Maybe a
Prelude.Nothing
}
layer_signingProfileVersionArn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_signingProfileVersionArn :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_signingProfileVersionArn = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
signingProfileVersionArn :: Maybe Text
$sel:signingProfileVersionArn:Layer' :: Layer -> Maybe Text
signingProfileVersionArn} -> Maybe Text
signingProfileVersionArn) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:signingProfileVersionArn:Layer' :: Maybe Text
signingProfileVersionArn = Maybe Text
a} :: Layer)
layer_arn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_arn :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_arn = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
arn :: Maybe Text
$sel:arn:Layer' :: Layer -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:arn:Layer' :: Maybe Text
arn = Maybe Text
a} :: Layer)
layer_signingJobArn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_signingJobArn :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_signingJobArn = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
signingJobArn :: Maybe Text
$sel:signingJobArn:Layer' :: Layer -> Maybe Text
signingJobArn} -> Maybe Text
signingJobArn) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:signingJobArn:Layer' :: Maybe Text
signingJobArn = Maybe Text
a} :: Layer)
layer_codeSize :: Lens.Lens' Layer (Prelude.Maybe Prelude.Integer)
layer_codeSize :: (Maybe Integer -> f (Maybe Integer)) -> Layer -> f Layer
layer_codeSize = (Layer -> Maybe Integer)
-> (Layer -> Maybe Integer -> Layer)
-> Lens Layer Layer (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Integer
codeSize :: Maybe Integer
$sel:codeSize:Layer' :: Layer -> Maybe Integer
codeSize} -> Maybe Integer
codeSize) (\s :: Layer
s@Layer' {} Maybe Integer
a -> Layer
s {$sel:codeSize:Layer' :: Maybe Integer
codeSize = Maybe Integer
a} :: Layer)
instance Core.FromJSON Layer where
parseJSON :: Value -> Parser Layer
parseJSON =
String -> (Object -> Parser Layer) -> Value -> Parser Layer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Layer"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> Maybe Integer -> Layer
Layer'
(Maybe Text -> Maybe Text -> Maybe Text -> Maybe Integer -> Layer)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Integer -> Layer)
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
"SigningProfileVersionArn")
Parser (Maybe Text -> Maybe Text -> Maybe Integer -> Layer)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Integer -> Layer)
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
"Arn")
Parser (Maybe Text -> Maybe Integer -> Layer)
-> Parser (Maybe Text) -> Parser (Maybe Integer -> Layer)
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
"SigningJobArn")
Parser (Maybe Integer -> Layer)
-> Parser (Maybe Integer) -> Parser Layer
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
"CodeSize")
)
instance Prelude.Hashable Layer
instance Prelude.NFData Layer