{-# 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.ResolvedComponentVersion where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResolvedComponentVersion = ResolvedComponentVersion'
{
ResolvedComponentVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ResolvedComponentVersion -> Maybe Text
componentVersion :: Prelude.Maybe Prelude.Text,
ResolvedComponentVersion -> Maybe Base64
recipe :: Prelude.Maybe Core.Base64,
ResolvedComponentVersion -> Maybe Text
componentName :: Prelude.Maybe Prelude.Text
}
deriving (ResolvedComponentVersion -> ResolvedComponentVersion -> Bool
(ResolvedComponentVersion -> ResolvedComponentVersion -> Bool)
-> (ResolvedComponentVersion -> ResolvedComponentVersion -> Bool)
-> Eq ResolvedComponentVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResolvedComponentVersion -> ResolvedComponentVersion -> Bool
$c/= :: ResolvedComponentVersion -> ResolvedComponentVersion -> Bool
== :: ResolvedComponentVersion -> ResolvedComponentVersion -> Bool
$c== :: ResolvedComponentVersion -> ResolvedComponentVersion -> Bool
Prelude.Eq, ReadPrec [ResolvedComponentVersion]
ReadPrec ResolvedComponentVersion
Int -> ReadS ResolvedComponentVersion
ReadS [ResolvedComponentVersion]
(Int -> ReadS ResolvedComponentVersion)
-> ReadS [ResolvedComponentVersion]
-> ReadPrec ResolvedComponentVersion
-> ReadPrec [ResolvedComponentVersion]
-> Read ResolvedComponentVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResolvedComponentVersion]
$creadListPrec :: ReadPrec [ResolvedComponentVersion]
readPrec :: ReadPrec ResolvedComponentVersion
$creadPrec :: ReadPrec ResolvedComponentVersion
readList :: ReadS [ResolvedComponentVersion]
$creadList :: ReadS [ResolvedComponentVersion]
readsPrec :: Int -> ReadS ResolvedComponentVersion
$creadsPrec :: Int -> ReadS ResolvedComponentVersion
Prelude.Read, Int -> ResolvedComponentVersion -> ShowS
[ResolvedComponentVersion] -> ShowS
ResolvedComponentVersion -> String
(Int -> ResolvedComponentVersion -> ShowS)
-> (ResolvedComponentVersion -> String)
-> ([ResolvedComponentVersion] -> ShowS)
-> Show ResolvedComponentVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResolvedComponentVersion] -> ShowS
$cshowList :: [ResolvedComponentVersion] -> ShowS
show :: ResolvedComponentVersion -> String
$cshow :: ResolvedComponentVersion -> String
showsPrec :: Int -> ResolvedComponentVersion -> ShowS
$cshowsPrec :: Int -> ResolvedComponentVersion -> ShowS
Prelude.Show, (forall x.
ResolvedComponentVersion -> Rep ResolvedComponentVersion x)
-> (forall x.
Rep ResolvedComponentVersion x -> ResolvedComponentVersion)
-> Generic ResolvedComponentVersion
forall x.
Rep ResolvedComponentVersion x -> ResolvedComponentVersion
forall x.
ResolvedComponentVersion -> Rep ResolvedComponentVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResolvedComponentVersion x -> ResolvedComponentVersion
$cfrom :: forall x.
ResolvedComponentVersion -> Rep ResolvedComponentVersion x
Prelude.Generic)
newResolvedComponentVersion ::
ResolvedComponentVersion
newResolvedComponentVersion :: ResolvedComponentVersion
newResolvedComponentVersion =
ResolvedComponentVersion' :: Maybe Text
-> Maybe Text
-> Maybe Base64
-> Maybe Text
-> ResolvedComponentVersion
ResolvedComponentVersion'
{ $sel:arn:ResolvedComponentVersion' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentVersion:ResolvedComponentVersion' :: Maybe Text
componentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recipe:ResolvedComponentVersion' :: Maybe Base64
recipe = Maybe Base64
forall a. Maybe a
Prelude.Nothing,
$sel:componentName:ResolvedComponentVersion' :: Maybe Text
componentName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
resolvedComponentVersion_arn :: Lens.Lens' ResolvedComponentVersion (Prelude.Maybe Prelude.Text)
resolvedComponentVersion_arn :: (Maybe Text -> f (Maybe Text))
-> ResolvedComponentVersion -> f ResolvedComponentVersion
resolvedComponentVersion_arn = (ResolvedComponentVersion -> Maybe Text)
-> (ResolvedComponentVersion
-> Maybe Text -> ResolvedComponentVersion)
-> Lens
ResolvedComponentVersion
ResolvedComponentVersion
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedComponentVersion' {Maybe Text
arn :: Maybe Text
$sel:arn:ResolvedComponentVersion' :: ResolvedComponentVersion -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ResolvedComponentVersion
s@ResolvedComponentVersion' {} Maybe Text
a -> ResolvedComponentVersion
s {$sel:arn:ResolvedComponentVersion' :: Maybe Text
arn = Maybe Text
a} :: ResolvedComponentVersion)
resolvedComponentVersion_componentVersion :: Lens.Lens' ResolvedComponentVersion (Prelude.Maybe Prelude.Text)
resolvedComponentVersion_componentVersion :: (Maybe Text -> f (Maybe Text))
-> ResolvedComponentVersion -> f ResolvedComponentVersion
resolvedComponentVersion_componentVersion = (ResolvedComponentVersion -> Maybe Text)
-> (ResolvedComponentVersion
-> Maybe Text -> ResolvedComponentVersion)
-> Lens
ResolvedComponentVersion
ResolvedComponentVersion
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedComponentVersion' {Maybe Text
componentVersion :: Maybe Text
$sel:componentVersion:ResolvedComponentVersion' :: ResolvedComponentVersion -> Maybe Text
componentVersion} -> Maybe Text
componentVersion) (\s :: ResolvedComponentVersion
s@ResolvedComponentVersion' {} Maybe Text
a -> ResolvedComponentVersion
s {$sel:componentVersion:ResolvedComponentVersion' :: Maybe Text
componentVersion = Maybe Text
a} :: ResolvedComponentVersion)
resolvedComponentVersion_recipe :: Lens.Lens' ResolvedComponentVersion (Prelude.Maybe Prelude.ByteString)
resolvedComponentVersion_recipe :: (Maybe ByteString -> f (Maybe ByteString))
-> ResolvedComponentVersion -> f ResolvedComponentVersion
resolvedComponentVersion_recipe = (ResolvedComponentVersion -> Maybe Base64)
-> (ResolvedComponentVersion
-> Maybe Base64 -> ResolvedComponentVersion)
-> Lens
ResolvedComponentVersion
ResolvedComponentVersion
(Maybe Base64)
(Maybe Base64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedComponentVersion' {Maybe Base64
recipe :: Maybe Base64
$sel:recipe:ResolvedComponentVersion' :: ResolvedComponentVersion -> Maybe Base64
recipe} -> Maybe Base64
recipe) (\s :: ResolvedComponentVersion
s@ResolvedComponentVersion' {} Maybe Base64
a -> ResolvedComponentVersion
s {$sel:recipe:ResolvedComponentVersion' :: Maybe Base64
recipe = Maybe Base64
a} :: ResolvedComponentVersion) ((Maybe Base64 -> f (Maybe Base64))
-> ResolvedComponentVersion -> f ResolvedComponentVersion)
-> ((Maybe ByteString -> f (Maybe ByteString))
-> Maybe Base64 -> f (Maybe Base64))
-> (Maybe ByteString -> f (Maybe ByteString))
-> ResolvedComponentVersion
-> f ResolvedComponentVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso Base64 Base64 ByteString ByteString
-> Iso
(Maybe Base64) (Maybe Base64) (Maybe ByteString) (Maybe ByteString)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso Base64 Base64 ByteString ByteString
Iso' Base64 ByteString
Core._Base64
resolvedComponentVersion_componentName :: Lens.Lens' ResolvedComponentVersion (Prelude.Maybe Prelude.Text)
resolvedComponentVersion_componentName :: (Maybe Text -> f (Maybe Text))
-> ResolvedComponentVersion -> f ResolvedComponentVersion
resolvedComponentVersion_componentName = (ResolvedComponentVersion -> Maybe Text)
-> (ResolvedComponentVersion
-> Maybe Text -> ResolvedComponentVersion)
-> Lens
ResolvedComponentVersion
ResolvedComponentVersion
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResolvedComponentVersion' {Maybe Text
componentName :: Maybe Text
$sel:componentName:ResolvedComponentVersion' :: ResolvedComponentVersion -> Maybe Text
componentName} -> Maybe Text
componentName) (\s :: ResolvedComponentVersion
s@ResolvedComponentVersion' {} Maybe Text
a -> ResolvedComponentVersion
s {$sel:componentName:ResolvedComponentVersion' :: Maybe Text
componentName = Maybe Text
a} :: ResolvedComponentVersion)
instance Core.FromJSON ResolvedComponentVersion where
parseJSON :: Value -> Parser ResolvedComponentVersion
parseJSON =
String
-> (Object -> Parser ResolvedComponentVersion)
-> Value
-> Parser ResolvedComponentVersion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResolvedComponentVersion"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Base64
-> Maybe Text
-> ResolvedComponentVersion
ResolvedComponentVersion'
(Maybe Text
-> Maybe Text
-> Maybe Base64
-> Maybe Text
-> ResolvedComponentVersion)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Base64 -> Maybe Text -> ResolvedComponentVersion)
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 Base64 -> Maybe Text -> ResolvedComponentVersion)
-> Parser (Maybe Text)
-> Parser (Maybe Base64 -> Maybe Text -> ResolvedComponentVersion)
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 Base64 -> Maybe Text -> ResolvedComponentVersion)
-> Parser (Maybe Base64)
-> Parser (Maybe Text -> ResolvedComponentVersion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Base64)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"recipe")
Parser (Maybe Text -> ResolvedComponentVersion)
-> Parser (Maybe Text) -> Parser ResolvedComponentVersion
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 ResolvedComponentVersion
instance Prelude.NFData ResolvedComponentVersion