{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Layer = Layer'
{
Layer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Layer -> Maybe Integer
codeSize :: Prelude.Maybe Prelude.Integer,
Layer -> Maybe Text
signingJobArn :: Prelude.Maybe Prelude.Text,
Layer -> Maybe Text
signingProfileVersionArn :: Prelude.Maybe Prelude.Text
}
deriving (Layer -> Layer -> Bool
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]
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
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. 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'
{ $sel:arn:Layer' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:codeSize:Layer' :: Maybe Integer
codeSize = forall a. Maybe a
Prelude.Nothing,
$sel:signingJobArn:Layer' :: Maybe Text
signingJobArn = forall a. Maybe a
Prelude.Nothing,
$sel:signingProfileVersionArn:Layer' :: Maybe Text
signingProfileVersionArn = forall a. Maybe a
Prelude.Nothing
}
layer_arn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_arn :: Lens' Layer (Maybe Text)
layer_arn = 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_codeSize :: Lens.Lens' Layer (Prelude.Maybe Prelude.Integer)
layer_codeSize :: Lens' Layer (Maybe Integer)
layer_codeSize = 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)
layer_signingJobArn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_signingJobArn :: Lens' Layer (Maybe Text)
layer_signingJobArn = 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_signingProfileVersionArn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_signingProfileVersionArn :: Lens' Layer (Maybe Text)
layer_signingProfileVersionArn = 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)
instance Data.FromJSON Layer where
parseJSON :: Value -> Parser Layer
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Layer"
( \Object
x ->
Maybe Text -> Maybe Integer -> Maybe Text -> Maybe Text -> Layer
Layer'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CodeSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SigningJobArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SigningProfileVersionArn")
)
instance Prelude.Hashable Layer where
hashWithSalt :: Int -> Layer -> Int
hashWithSalt Int
_salt Layer' {Maybe Integer
Maybe Text
signingProfileVersionArn :: Maybe Text
signingJobArn :: Maybe Text
codeSize :: Maybe Integer
arn :: Maybe Text
$sel:signingProfileVersionArn:Layer' :: Layer -> Maybe Text
$sel:signingJobArn:Layer' :: Layer -> Maybe Text
$sel:codeSize:Layer' :: Layer -> Maybe Integer
$sel:arn:Layer' :: Layer -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
codeSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
signingJobArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
signingProfileVersionArn
instance Prelude.NFData Layer where
rnf :: Layer -> ()
rnf Layer' {Maybe Integer
Maybe Text
signingProfileVersionArn :: Maybe Text
signingJobArn :: Maybe Text
codeSize :: Maybe Integer
arn :: Maybe Text
$sel:signingProfileVersionArn:Layer' :: Layer -> Maybe Text
$sel:signingJobArn:Layer' :: Layer -> Maybe Text
$sel:codeSize:Layer' :: Layer -> Maybe Integer
$sel:arn:Layer' :: Layer -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
codeSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
signingJobArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
signingProfileVersionArn