{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ComponentVersionListItem = ComponentVersionListItem'
{
ComponentVersionListItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ComponentVersionListItem -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text,
ComponentVersionListItem -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text
}
deriving (ComponentVersionListItem -> ComponentVersionListItem -> Bool
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]
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
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.
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'
{ $sel:arn:ComponentVersionListItem' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:componentName:ComponentVersionListItem' :: Maybe Text
componentName = forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:ComponentVersionListItem' :: Maybe Text
componentVersion = forall a. Maybe a
Prelude.Nothing
}
componentVersionListItem_arn :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_arn :: Lens' ComponentVersionListItem (Maybe Text)
componentVersionListItem_arn = 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_componentName :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_componentName :: Lens' ComponentVersionListItem (Maybe Text)
componentVersionListItem_componentName = 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)
componentVersionListItem_componentVersion :: Lens.Lens' ComponentVersionListItem (Prelude.Maybe Prelude.Text)
componentVersionListItem_componentVersion :: Lens' ComponentVersionListItem (Maybe Text)
componentVersionListItem_componentVersion = 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)
instance Data.FromJSON ComponentVersionListItem where
parseJSON :: Value -> Parser ComponentVersionListItem
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComponentVersionListItem"
( \Object
x ->
Maybe Text -> Maybe Text -> Maybe Text -> ComponentVersionListItem
ComponentVersionListItem'
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
"componentName")
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
"componentVersion")
)
instance Prelude.Hashable ComponentVersionListItem where
hashWithSalt :: Int -> ComponentVersionListItem -> Int
hashWithSalt Int
_salt ComponentVersionListItem' {Maybe Text
componentVersion :: Maybe Text
componentName :: Maybe Text
arn :: Maybe Text
$sel:componentVersion:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
$sel:componentName:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
$sel:arn:ComponentVersionListItem' :: ComponentVersionListItem -> 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 Text
componentName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentVersion
instance Prelude.NFData ComponentVersionListItem where
rnf :: ComponentVersionListItem -> ()
rnf ComponentVersionListItem' {Maybe Text
componentVersion :: Maybe Text
componentName :: Maybe Text
arn :: Maybe Text
$sel:componentVersion:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
$sel:componentName:ComponentVersionListItem' :: ComponentVersionListItem -> Maybe Text
$sel:arn:ComponentVersionListItem' :: ComponentVersionListItem -> 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 Text
componentName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentVersion