{-# 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.LayersListItem where
import qualified Amazonka.Core as Core
import Amazonka.Lambda.Types.LayerVersionsListItem
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LayersListItem = LayersListItem'
{
LayersListItem -> Maybe Text
layerName :: Prelude.Maybe Prelude.Text,
LayersListItem -> Maybe LayerVersionsListItem
latestMatchingVersion :: Prelude.Maybe LayerVersionsListItem,
LayersListItem -> Maybe Text
layerArn :: Prelude.Maybe Prelude.Text
}
deriving (LayersListItem -> LayersListItem -> Bool
(LayersListItem -> LayersListItem -> Bool)
-> (LayersListItem -> LayersListItem -> Bool) -> Eq LayersListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayersListItem -> LayersListItem -> Bool
$c/= :: LayersListItem -> LayersListItem -> Bool
== :: LayersListItem -> LayersListItem -> Bool
$c== :: LayersListItem -> LayersListItem -> Bool
Prelude.Eq, ReadPrec [LayersListItem]
ReadPrec LayersListItem
Int -> ReadS LayersListItem
ReadS [LayersListItem]
(Int -> ReadS LayersListItem)
-> ReadS [LayersListItem]
-> ReadPrec LayersListItem
-> ReadPrec [LayersListItem]
-> Read LayersListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LayersListItem]
$creadListPrec :: ReadPrec [LayersListItem]
readPrec :: ReadPrec LayersListItem
$creadPrec :: ReadPrec LayersListItem
readList :: ReadS [LayersListItem]
$creadList :: ReadS [LayersListItem]
readsPrec :: Int -> ReadS LayersListItem
$creadsPrec :: Int -> ReadS LayersListItem
Prelude.Read, Int -> LayersListItem -> ShowS
[LayersListItem] -> ShowS
LayersListItem -> String
(Int -> LayersListItem -> ShowS)
-> (LayersListItem -> String)
-> ([LayersListItem] -> ShowS)
-> Show LayersListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayersListItem] -> ShowS
$cshowList :: [LayersListItem] -> ShowS
show :: LayersListItem -> String
$cshow :: LayersListItem -> String
showsPrec :: Int -> LayersListItem -> ShowS
$cshowsPrec :: Int -> LayersListItem -> ShowS
Prelude.Show, (forall x. LayersListItem -> Rep LayersListItem x)
-> (forall x. Rep LayersListItem x -> LayersListItem)
-> Generic LayersListItem
forall x. Rep LayersListItem x -> LayersListItem
forall x. LayersListItem -> Rep LayersListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LayersListItem x -> LayersListItem
$cfrom :: forall x. LayersListItem -> Rep LayersListItem x
Prelude.Generic)
newLayersListItem ::
LayersListItem
newLayersListItem :: LayersListItem
newLayersListItem =
LayersListItem' :: Maybe Text
-> Maybe LayerVersionsListItem -> Maybe Text -> LayersListItem
LayersListItem'
{ $sel:layerName:LayersListItem' :: Maybe Text
layerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestMatchingVersion:LayersListItem' :: Maybe LayerVersionsListItem
latestMatchingVersion = Maybe LayerVersionsListItem
forall a. Maybe a
Prelude.Nothing,
$sel:layerArn:LayersListItem' :: Maybe Text
layerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
layersListItem_layerName :: Lens.Lens' LayersListItem (Prelude.Maybe Prelude.Text)
layersListItem_layerName :: (Maybe Text -> f (Maybe Text))
-> LayersListItem -> f LayersListItem
layersListItem_layerName = (LayersListItem -> Maybe Text)
-> (LayersListItem -> Maybe Text -> LayersListItem)
-> Lens LayersListItem LayersListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayersListItem' {Maybe Text
layerName :: Maybe Text
$sel:layerName:LayersListItem' :: LayersListItem -> Maybe Text
layerName} -> Maybe Text
layerName) (\s :: LayersListItem
s@LayersListItem' {} Maybe Text
a -> LayersListItem
s {$sel:layerName:LayersListItem' :: Maybe Text
layerName = Maybe Text
a} :: LayersListItem)
layersListItem_latestMatchingVersion :: Lens.Lens' LayersListItem (Prelude.Maybe LayerVersionsListItem)
layersListItem_latestMatchingVersion :: (Maybe LayerVersionsListItem -> f (Maybe LayerVersionsListItem))
-> LayersListItem -> f LayersListItem
layersListItem_latestMatchingVersion = (LayersListItem -> Maybe LayerVersionsListItem)
-> (LayersListItem
-> Maybe LayerVersionsListItem -> LayersListItem)
-> Lens
LayersListItem
LayersListItem
(Maybe LayerVersionsListItem)
(Maybe LayerVersionsListItem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayersListItem' {Maybe LayerVersionsListItem
latestMatchingVersion :: Maybe LayerVersionsListItem
$sel:latestMatchingVersion:LayersListItem' :: LayersListItem -> Maybe LayerVersionsListItem
latestMatchingVersion} -> Maybe LayerVersionsListItem
latestMatchingVersion) (\s :: LayersListItem
s@LayersListItem' {} Maybe LayerVersionsListItem
a -> LayersListItem
s {$sel:latestMatchingVersion:LayersListItem' :: Maybe LayerVersionsListItem
latestMatchingVersion = Maybe LayerVersionsListItem
a} :: LayersListItem)
layersListItem_layerArn :: Lens.Lens' LayersListItem (Prelude.Maybe Prelude.Text)
layersListItem_layerArn :: (Maybe Text -> f (Maybe Text))
-> LayersListItem -> f LayersListItem
layersListItem_layerArn = (LayersListItem -> Maybe Text)
-> (LayersListItem -> Maybe Text -> LayersListItem)
-> Lens LayersListItem LayersListItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayersListItem' {Maybe Text
layerArn :: Maybe Text
$sel:layerArn:LayersListItem' :: LayersListItem -> Maybe Text
layerArn} -> Maybe Text
layerArn) (\s :: LayersListItem
s@LayersListItem' {} Maybe Text
a -> LayersListItem
s {$sel:layerArn:LayersListItem' :: Maybe Text
layerArn = Maybe Text
a} :: LayersListItem)
instance Core.FromJSON LayersListItem where
parseJSON :: Value -> Parser LayersListItem
parseJSON =
String
-> (Object -> Parser LayersListItem)
-> Value
-> Parser LayersListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LayersListItem"
( \Object
x ->
Maybe Text
-> Maybe LayerVersionsListItem -> Maybe Text -> LayersListItem
LayersListItem'
(Maybe Text
-> Maybe LayerVersionsListItem -> Maybe Text -> LayersListItem)
-> Parser (Maybe Text)
-> Parser
(Maybe LayerVersionsListItem -> Maybe Text -> LayersListItem)
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
"LayerName")
Parser
(Maybe LayerVersionsListItem -> Maybe Text -> LayersListItem)
-> Parser (Maybe LayerVersionsListItem)
-> Parser (Maybe Text -> LayersListItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LayerVersionsListItem)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LatestMatchingVersion")
Parser (Maybe Text -> LayersListItem)
-> Parser (Maybe Text) -> Parser LayersListItem
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
"LayerArn")
)
instance Prelude.Hashable LayersListItem
instance Prelude.NFData LayersListItem