{-# 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.GroupInformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GroupInformation = GroupInformation'
{
GroupInformation -> Maybe Text
latestVersionArn :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
creationTimestamp :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
latestVersion :: Prelude.Maybe Prelude.Text,
GroupInformation -> Maybe Text
lastUpdatedTimestamp :: Prelude.Maybe Prelude.Text
}
deriving (GroupInformation -> GroupInformation -> Bool
(GroupInformation -> GroupInformation -> Bool)
-> (GroupInformation -> GroupInformation -> Bool)
-> Eq GroupInformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GroupInformation -> GroupInformation -> Bool
$c/= :: GroupInformation -> GroupInformation -> Bool
== :: GroupInformation -> GroupInformation -> Bool
$c== :: GroupInformation -> GroupInformation -> Bool
Prelude.Eq, ReadPrec [GroupInformation]
ReadPrec GroupInformation
Int -> ReadS GroupInformation
ReadS [GroupInformation]
(Int -> ReadS GroupInformation)
-> ReadS [GroupInformation]
-> ReadPrec GroupInformation
-> ReadPrec [GroupInformation]
-> Read GroupInformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GroupInformation]
$creadListPrec :: ReadPrec [GroupInformation]
readPrec :: ReadPrec GroupInformation
$creadPrec :: ReadPrec GroupInformation
readList :: ReadS [GroupInformation]
$creadList :: ReadS [GroupInformation]
readsPrec :: Int -> ReadS GroupInformation
$creadsPrec :: Int -> ReadS GroupInformation
Prelude.Read, Int -> GroupInformation -> ShowS
[GroupInformation] -> ShowS
GroupInformation -> String
(Int -> GroupInformation -> ShowS)
-> (GroupInformation -> String)
-> ([GroupInformation] -> ShowS)
-> Show GroupInformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GroupInformation] -> ShowS
$cshowList :: [GroupInformation] -> ShowS
show :: GroupInformation -> String
$cshow :: GroupInformation -> String
showsPrec :: Int -> GroupInformation -> ShowS
$cshowsPrec :: Int -> GroupInformation -> ShowS
Prelude.Show, (forall x. GroupInformation -> Rep GroupInformation x)
-> (forall x. Rep GroupInformation x -> GroupInformation)
-> Generic GroupInformation
forall x. Rep GroupInformation x -> GroupInformation
forall x. GroupInformation -> Rep GroupInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GroupInformation x -> GroupInformation
$cfrom :: forall x. GroupInformation -> Rep GroupInformation x
Prelude.Generic)
newGroupInformation ::
GroupInformation
newGroupInformation :: GroupInformation
newGroupInformation =
GroupInformation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GroupInformation
GroupInformation'
{ $sel:latestVersionArn:GroupInformation' :: Maybe Text
latestVersionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:GroupInformation' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:GroupInformation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimestamp:GroupInformation' :: Maybe Text
creationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:GroupInformation' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersion:GroupInformation' :: Maybe Text
latestVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedTimestamp:GroupInformation' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
groupInformation_latestVersionArn :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_latestVersionArn :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_latestVersionArn = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
latestVersionArn :: Maybe Text
$sel:latestVersionArn:GroupInformation' :: GroupInformation -> Maybe Text
latestVersionArn} -> Maybe Text
latestVersionArn) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:latestVersionArn:GroupInformation' :: Maybe Text
latestVersionArn = Maybe Text
a} :: GroupInformation)
groupInformation_arn :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_arn :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_arn = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
arn :: Maybe Text
$sel:arn:GroupInformation' :: GroupInformation -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:arn:GroupInformation' :: Maybe Text
arn = Maybe Text
a} :: GroupInformation)
groupInformation_name :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_name :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_name = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
name :: Maybe Text
$sel:name:GroupInformation' :: GroupInformation -> Maybe Text
name} -> Maybe Text
name) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:name:GroupInformation' :: Maybe Text
name = Maybe Text
a} :: GroupInformation)
groupInformation_creationTimestamp :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_creationTimestamp :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_creationTimestamp = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
creationTimestamp :: Maybe Text
$sel:creationTimestamp:GroupInformation' :: GroupInformation -> Maybe Text
creationTimestamp} -> Maybe Text
creationTimestamp) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:creationTimestamp:GroupInformation' :: Maybe Text
creationTimestamp = Maybe Text
a} :: GroupInformation)
groupInformation_id :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_id :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_id = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
id :: Maybe Text
$sel:id:GroupInformation' :: GroupInformation -> Maybe Text
id} -> Maybe Text
id) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:id:GroupInformation' :: Maybe Text
id = Maybe Text
a} :: GroupInformation)
groupInformation_latestVersion :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_latestVersion :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_latestVersion = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
latestVersion :: Maybe Text
$sel:latestVersion:GroupInformation' :: GroupInformation -> Maybe Text
latestVersion} -> Maybe Text
latestVersion) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:latestVersion:GroupInformation' :: Maybe Text
latestVersion = Maybe Text
a} :: GroupInformation)
groupInformation_lastUpdatedTimestamp :: Lens.Lens' GroupInformation (Prelude.Maybe Prelude.Text)
groupInformation_lastUpdatedTimestamp :: (Maybe Text -> f (Maybe Text))
-> GroupInformation -> f GroupInformation
groupInformation_lastUpdatedTimestamp = (GroupInformation -> Maybe Text)
-> (GroupInformation -> Maybe Text -> GroupInformation)
-> Lens GroupInformation GroupInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GroupInformation' {Maybe Text
lastUpdatedTimestamp :: Maybe Text
$sel:lastUpdatedTimestamp:GroupInformation' :: GroupInformation -> Maybe Text
lastUpdatedTimestamp} -> Maybe Text
lastUpdatedTimestamp) (\s :: GroupInformation
s@GroupInformation' {} Maybe Text
a -> GroupInformation
s {$sel:lastUpdatedTimestamp:GroupInformation' :: Maybe Text
lastUpdatedTimestamp = Maybe Text
a} :: GroupInformation)
instance Core.FromJSON GroupInformation where
parseJSON :: Value -> Parser GroupInformation
parseJSON =
String
-> (Object -> Parser GroupInformation)
-> Value
-> Parser GroupInformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GroupInformation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GroupInformation
GroupInformation'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GroupInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GroupInformation)
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 Text
-> Maybe Text
-> GroupInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> GroupInformation)
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 Text
-> Maybe Text
-> GroupInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> GroupInformation)
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 Text -> Maybe Text -> GroupInformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> GroupInformation)
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 Text -> Maybe Text -> GroupInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> GroupInformation)
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 Text -> Maybe Text -> GroupInformation)
-> Parser (Maybe Text) -> Parser (Maybe Text -> GroupInformation)
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 -> GroupInformation)
-> Parser (Maybe Text) -> Parser GroupInformation
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 GroupInformation
instance Prelude.NFData GroupInformation