{-# 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.GreengrassV2.Types.ComponentVersionListItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ComponentVersionListItem = ComponentVersionListItem'
{
ComponentVersionListItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ComponentVersionListItem -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
ComponentVersionListItem -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text
}
deriving (ComponentVersionListItem -> ComponentVersionListItem -> Bool
(ComponentVersionListItem -> ComponentVersionListItem -> Bool)
-> (ComponentVersionListItem -> ComponentVersionListItem -> Bool)
-> Eq ComponentVersionListItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentVersionListItem -> ComponentVersionListItem -> Bool
$c/= :: ComponentVersionListItem -> ComponentVersionListItem -> Bool
== :: ComponentVersionListItem -> ComponentVersionListItem -> Bool
$c== :: ComponentVersionListItem -> ComponentVersionListItem -> Bool
Prelude.Eq, ReadPrec [ComponentVersionListItem]
ReadPrec ComponentVersionListItem
Int -> ReadS ComponentVersionListItem
ReadS [ComponentVersionListItem]
(Int -> ReadS ComponentVersionListItem)
-> ReadS [ComponentVersionListItem]
-> ReadPrec ComponentVersionListItem
-> ReadPrec [ComponentVersionListItem]
-> Read ComponentVersionListItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentVersionListItem]
$creadListPrec :: ReadPrec [ComponentVersionListItem]
readPrec :: ReadPrec ComponentVersionListItem
$creadPrec :: ReadPrec ComponentVersionListItem
readList :: ReadS [ComponentVersionListItem]
$creadList :: ReadS [ComponentVersionListItem]
readsPrec :: Int -> ReadS ComponentVersionListItem
$creadsPrec :: Int -> ReadS ComponentVersionListItem
Prelude.Read, Int -> ComponentVersionListItem -> ShowS
[ComponentVersionListItem] -> ShowS
ComponentVersionListItem -> String
(Int -> ComponentVersionListItem -> ShowS)
-> (ComponentVersionListItem -> String)
-> ([ComponentVersionListItem] -> ShowS)
-> Show ComponentVersionListItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentVersionListItem] -> ShowS
$cshowList :: [ComponentVersionListItem] -> ShowS
show :: ComponentVersionListItem -> String
$cshow :: ComponentVersionListItem -> String
showsPrec :: Int -> ComponentVersionListItem -> ShowS
$cshowsPrec :: Int -> ComponentVersionListItem -> ShowS
Prelude.Show, (forall x.
ComponentVersionListItem -> Rep ComponentVersionListItem x)
-> (forall x.
Rep ComponentVersionListItem x -> ComponentVersionListItem)
-> Generic ComponentVersionListItem
forall x.
Rep ComponentVersionListItem x -> ComponentVersionListItem
forall x.
ComponentVersionListItem -> Rep ComponentVersionListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ComponentVersionListItem x -> ComponentVersionListItem
$cfrom :: forall x.
ComponentVersionListItem -> Rep ComponentVersionListItem x
Prelude.Generic)
newComponentVersionListItem ::
ComponentVersionListItem
newComponentVersionListItem :: ComponentVersionListItem
newComponentVersionListItem =
ComponentVersionListItem' :: Maybe Text -> Maybe Text -> Maybe Text -> ComponentVersionListItem
ComponentVersionListItem'
{ $sel:arn:ComponentVersionListItem' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:ComponentVersionListItem' :: Maybe Text
componentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentName:ComponentVersionListItem' :: Maybe Text
componentName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
componentVersionListItem_arn :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_arn :: (Maybe Text -> f (Maybe Text))
-> ComponentVersionListItem -> f ComponentVersionListItem
componentVersionListItem_arn = (ComponentVersionListItem -> Maybe Text)
-> (ComponentVersionListItem
-> Maybe Text -> ComponentVersionListItem)
-> Lens
ComponentVersionListItem
ComponentVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersionListItem' {Maybe Text
arn :: Maybe Text
$sel:arn:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ComponentVersionListItem
s@ComponentVersionListItem' {} Maybe Text
a -> ComponentVersionListItem
s {$sel:arn:ComponentVersionListItem' :: Maybe Text
arn = Maybe Text
a} :: ComponentVersionListItem)
componentVersionListItem_componentVersion :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_componentVersion :: (Maybe Text -> f (Maybe Text))
-> ComponentVersionListItem -> f ComponentVersionListItem
componentVersionListItem_componentVersion = (ComponentVersionListItem -> Maybe Text)
-> (ComponentVersionListItem
-> Maybe Text -> ComponentVersionListItem)
-> Lens
ComponentVersionListItem
ComponentVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersionListItem' {Maybe Text
componentVersion :: Maybe Text
$sel:componentVersion:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
componentVersion} -> Maybe Text
componentVersion) (\s :: ComponentVersionListItem
s@ComponentVersionListItem' {} Maybe Text
a -> ComponentVersionListItem
s {$sel:componentVersion:ComponentVersionListItem' :: Maybe Text
componentVersion = Maybe Text
a} :: ComponentVersionListItem)
componentVersionListItem_componentName :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_componentName :: (Maybe Text -> f (Maybe Text))
-> ComponentVersionListItem -> f ComponentVersionListItem
componentVersionListItem_componentName = (ComponentVersionListItem -> Maybe Text)
-> (ComponentVersionListItem
-> Maybe Text -> ComponentVersionListItem)
-> Lens
ComponentVersionListItem
ComponentVersionListItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersionListItem' {Maybe Text
componentName :: Maybe Text
$sel:componentName:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: ComponentVersionListItem
s@ComponentVersionListItem' {} Maybe Text
a -> ComponentVersionListItem
s {$sel:componentName:ComponentVersionListItem' :: Maybe Text
componentName = Maybe Text
a} :: ComponentVersionListItem)
instance Core.FromJSON ComponentVersionListItem where
parseJSON :: Value -> Parser ComponentVersionListItem
parseJSON =
String
-> (Object -> Parser ComponentVersionListItem)
-> Value
-> Parser ComponentVersionListItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ComponentVersionListItem"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ComponentVersionListItem
ComponentVersionListItem'
(Maybe Text
-> Maybe Text -> Maybe Text -> ComponentVersionListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ComponentVersionListItem)
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
"arn")
Parser (Maybe Text -> Maybe Text -> ComponentVersionListItem)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ComponentVersionListItem)
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
"componentVersion")
Parser (Maybe Text -> ComponentVersionListItem)
-> Parser (Maybe Text) -> Parser ComponentVersionListItem
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
"componentName")
)
instance Prelude.Hashable ComponentVersionListItem
instance Prelude.NFData ComponentVersionListItem