{-# 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.Greengrass.Types.DefinitionInformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DefinitionInformation = DefinitionInformation'
{
DefinitionInformation -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
DefinitionInformation -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
DefinitionInformation -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text
}
deriving (DefinitionInformation -> DefinitionInformation -> Bool
(DefinitionInformation -> DefinitionInformation -> Bool)
-> (DefinitionInformation -> DefinitionInformation -> Bool)
-> Eq DefinitionInformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefinitionInformation -> DefinitionInformation -> Bool
$c/= :: DefinitionInformation -> DefinitionInformation -> Bool
== :: DefinitionInformation -> DefinitionInformation -> Bool
$c== :: DefinitionInformation -> DefinitionInformation -> Bool
Prelude.Eq, ReadPrec [DefinitionInformation]
ReadPrec DefinitionInformation
Int -> ReadS DefinitionInformation
ReadS [DefinitionInformation]
(Int -> ReadS DefinitionInformation)
-> ReadS [DefinitionInformation]
-> ReadPrec DefinitionInformation
-> ReadPrec [DefinitionInformation]
-> Read DefinitionInformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefinitionInformation]
$creadListPrec :: ReadPrec [DefinitionInformation]
readPrec :: ReadPrec DefinitionInformation
$creadPrec :: ReadPrec DefinitionInformation
readList :: ReadS [DefinitionInformation]
$creadList :: ReadS [DefinitionInformation]
readsPrec :: Int -> ReadS DefinitionInformation
$creadsPrec :: Int -> ReadS DefinitionInformation
Prelude.Read, Int -> DefinitionInformation -> ShowS
[DefinitionInformation] -> ShowS
DefinitionInformation -> String
(Int -> DefinitionInformation -> ShowS)
-> (DefinitionInformation -> String)
-> ([DefinitionInformation] -> ShowS)
-> Show DefinitionInformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefinitionInformation] -> ShowS
$cshowList :: [DefinitionInformation] -> ShowS
show :: DefinitionInformation -> String
$cshow :: DefinitionInformation -> String
showsPrec :: Int -> DefinitionInformation -> ShowS
$cshowsPrec :: Int -> DefinitionInformation -> ShowS
Prelude.Show, (forall x. DefinitionInformation -> Rep DefinitionInformation x)
-> (forall x. Rep DefinitionInformation x -> DefinitionInformation)
-> Generic DefinitionInformation
forall x. Rep DefinitionInformation x -> DefinitionInformation
forall x. DefinitionInformation -> Rep DefinitionInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DefinitionInformation x -> DefinitionInformation
$cfrom :: forall x. DefinitionInformation -> Rep DefinitionInformation x
Prelude.Generic)
newDefinitionInformation ::
DefinitionInformation
newDefinitionInformation :: DefinitionInformation
newDefinitionInformation =
DefinitionInformation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation
DefinitionInformation'
{ $sel:latestVersionArn:DefinitionInformation' :: Maybe Text
latestVersionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DefinitionInformation' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DefinitionInformation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimestamp:DefinitionInformation' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:DefinitionInformation' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:DefinitionInformation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersion:DefinitionInformation' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:DefinitionInformation' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
definitionInformation_latestVersionArn :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_latestVersionArn :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_latestVersionArn = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
latestVersionArn :: Maybe Text
$sel:latestVersionArn:DefinitionInformation' :: DefinitionInformation -> Maybe Text
latestVersionArn} -> Maybe Text
latestVersionArn) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:latestVersionArn:DefinitionInformation' :: Maybe Text
latestVersionArn = Maybe Text
a} :: DefinitionInformation)
definitionInformation_arn :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_arn :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_arn = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
arn :: Maybe Text
$sel:arn:DefinitionInformation' :: DefinitionInformation -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:arn:DefinitionInformation' :: Maybe Text
arn = Maybe Text
a} :: DefinitionInformation)
definitionInformation_name :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_name :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_name = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
name :: Maybe Text
$sel:name:DefinitionInformation' :: DefinitionInformation -> Maybe Text
name} -> Maybe Text
name) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:name:DefinitionInformation' :: Maybe Text
name = Maybe Text
a} :: DefinitionInformation)
definitionInformation_creationTimestamp :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_creationTimestamp :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_creationTimestamp = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:DefinitionInformation' :: DefinitionInformation -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:creationTimestamp:DefinitionInformation' :: Maybe Text
creationTimestamp = Maybe Text
a} :: DefinitionInformation)
definitionInformation_id :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_id :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_id = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
id :: Maybe Text
$sel:id:DefinitionInformation' :: DefinitionInformation -> Maybe Text
id} -> Maybe Text
id) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:id:DefinitionInformation' :: Maybe Text
id = Maybe Text
a} :: DefinitionInformation)
definitionInformation_tags :: Lens.Lens' DefinitionInformation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
definitionInformation_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_tags = (DefinitionInformation -> Maybe (HashMap Text Text))
-> (DefinitionInformation
-> Maybe (HashMap Text Text) -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DefinitionInformation' :: DefinitionInformation -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe (HashMap Text Text)
a -> DefinitionInformation
s {$sel:tags:DefinitionInformation' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DefinitionInformation) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DefinitionInformation -> f DefinitionInformation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DefinitionInformation
-> f DefinitionInformation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
definitionInformation_latestVersion :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_latestVersion :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_latestVersion = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
latestVersion :: Maybe Text
$sel:latestVersion:DefinitionInformation' :: DefinitionInformation -> Maybe Text
latestVersion} -> Maybe Text
latestVersion) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:latestVersion:DefinitionInformation' :: Maybe Text
latestVersion = Maybe Text
a} :: DefinitionInformation)
definitionInformation_lastUpdatedTimestamp :: Lens.Lens' DefinitionInformation (Prelude.Maybe Prelude.Text)
definitionInformation_lastUpdatedTimestamp :: (Maybe Text -> f (Maybe Text))
-> DefinitionInformation -> f DefinitionInformation
definitionInformation_lastUpdatedTimestamp = (DefinitionInformation -> Maybe Text)
-> (DefinitionInformation -> Maybe Text -> DefinitionInformation)
-> Lens
DefinitionInformation
DefinitionInformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefinitionInformation' {Maybe Text
lastUpdatedTimestamp :: Maybe Text
$sel:lastUpdatedTimestamp:DefinitionInformation' :: DefinitionInformation -> Maybe Text
lastUpdatedTimestamp} -> Maybe Text
lastUpdatedTimestamp) (\s :: DefinitionInformation
s@DefinitionInformation' {} Maybe Text
a -> DefinitionInformation
s {$sel:lastUpdatedTimestamp:DefinitionInformation' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
a} :: DefinitionInformation)
instance Core.FromJSON DefinitionInformation where
parseJSON :: Value -> Parser DefinitionInformation
parseJSON =
String
-> (Object -> Parser DefinitionInformation)
-> Value
-> Parser DefinitionInformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DefinitionInformation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation
DefinitionInformation'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
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
"LatestVersionArn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
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
"Arn")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
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
"Name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
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
"CreationTimestamp")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text -> Maybe Text -> DefinitionInformation)
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
"Id")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text -> Maybe Text -> DefinitionInformation)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Text -> Maybe Text -> DefinitionInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Text -> Maybe Text -> DefinitionInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DefinitionInformation)
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
"LatestVersion")
Parser (Maybe Text -> DefinitionInformation)
-> Parser (Maybe Text) -> Parser DefinitionInformation
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
"LastUpdatedTimestamp")
)
instance Prelude.Hashable DefinitionInformation
instance Prelude.NFData DefinitionInformation