{-# 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.ServiceCatalogAppRegistry.Types.Application where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Application = Application'
{
Application -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
Application -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Application -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Application -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Application -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
Application -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Application -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Application -> Application -> Bool
(Application -> Application -> Bool)
-> (Application -> Application -> Bool) -> Eq Application
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Application -> Application -> Bool
$c/= :: Application -> Application -> Bool
== :: Application -> Application -> Bool
$c== :: Application -> Application -> Bool
Prelude.Eq, ReadPrec [Application]
ReadPrec Application
Int -> ReadS Application
ReadS [Application]
(Int -> ReadS Application)
-> ReadS [Application]
-> ReadPrec Application
-> ReadPrec [Application]
-> Read Application
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Application]
$creadListPrec :: ReadPrec [Application]
readPrec :: ReadPrec Application
$creadPrec :: ReadPrec Application
readList :: ReadS [Application]
$creadList :: ReadS [Application]
readsPrec :: Int -> ReadS Application
$creadsPrec :: Int -> ReadS Application
Prelude.Read, Int -> Application -> ShowS
[Application] -> ShowS
Application -> String
(Int -> Application -> ShowS)
-> (Application -> String)
-> ([Application] -> ShowS)
-> Show Application
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Application] -> ShowS
$cshowList :: [Application] -> ShowS
show :: Application -> String
$cshow :: Application -> String
showsPrec :: Int -> Application -> ShowS
$cshowsPrec :: Int -> Application -> ShowS
Prelude.Show, (forall x. Application -> Rep Application x)
-> (forall x. Rep Application x -> Application)
-> Generic Application
forall x. Rep Application x -> Application
forall x. Application -> Rep Application x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Application x -> Application
$cfrom :: forall x. Application -> Rep Application x
Prelude.Generic)
newApplication ::
Application
newApplication :: Application
newApplication =
Application' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application
Application'
{ $sel:creationTime:Application' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Application' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:Application' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:Application' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:Application' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:Application' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Application' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
application_creationTime :: Lens.Lens' Application (Prelude.Maybe Prelude.UTCTime)
application_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> Application -> f Application
application_creationTime = (Application -> Maybe POSIX)
-> (Application -> Maybe POSIX -> Application)
-> Lens Application Application (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Application' :: Application -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Application
s@Application' {} Maybe POSIX
a -> Application
s {$sel:creationTime:Application' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Application) ((Maybe POSIX -> f (Maybe POSIX)) -> Application -> f Application)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Application
-> f Application
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
application_arn :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_arn :: (Maybe Text -> f (Maybe Text)) -> Application -> f Application
application_arn = (Application -> Maybe Text)
-> (Application -> Maybe Text -> Application)
-> Lens Application Application (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
arn :: Maybe Text
$sel:arn:Application' :: Application -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:arn:Application' :: Maybe Text
arn = Maybe Text
a} :: Application)
application_name :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_name :: (Maybe Text -> f (Maybe Text)) -> Application -> f Application
application_name = (Application -> Maybe Text)
-> (Application -> Maybe Text -> Application)
-> Lens Application Application (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
name :: Maybe Text
$sel:name:Application' :: Application -> Maybe Text
name} -> Maybe Text
name) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:name:Application' :: Maybe Text
name = Maybe Text
a} :: Application)
application_id :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_id :: (Maybe Text -> f (Maybe Text)) -> Application -> f Application
application_id = (Application -> Maybe Text)
-> (Application -> Maybe Text -> Application)
-> Lens Application Application (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
id :: Maybe Text
$sel:id:Application' :: Application -> Maybe Text
id} -> Maybe Text
id) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:id:Application' :: Maybe Text
id = Maybe Text
a} :: Application)
application_lastUpdateTime :: Lens.Lens' Application (Prelude.Maybe Prelude.UTCTime)
application_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> Application -> f Application
application_lastUpdateTime = (Application -> Maybe POSIX)
-> (Application -> Maybe POSIX -> Application)
-> Lens Application Application (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:Application' :: Application -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: Application
s@Application' {} Maybe POSIX
a -> Application
s {$sel:lastUpdateTime:Application' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: Application) ((Maybe POSIX -> f (Maybe POSIX)) -> Application -> f Application)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Application
-> f Application
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
application_description :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_description :: (Maybe Text -> f (Maybe Text)) -> Application -> f Application
application_description = (Application -> Maybe Text)
-> (Application -> Maybe Text -> Application)
-> Lens Application Application (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
description :: Maybe Text
$sel:description:Application' :: Application -> Maybe Text
description} -> Maybe Text
description) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:description:Application' :: Maybe Text
description = Maybe Text
a} :: Application)
application_tags :: Lens.Lens' Application (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
application_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Application -> f Application
application_tags = (Application -> Maybe (HashMap Text Text))
-> (Application -> Maybe (HashMap Text Text) -> Application)
-> Lens
Application
Application
(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 (\Application' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Application' :: Application -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Application
s@Application' {} Maybe (HashMap Text Text)
a -> Application
s {$sel:tags:Application' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Application) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Application -> f Application)
-> ((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)))
-> Application
-> f Application
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
instance Core.FromJSON Application where
parseJSON :: Value -> Parser Application
parseJSON =
String
-> (Object -> Parser Application) -> Value -> Parser Application
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Application"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application
Application'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
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 POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
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 POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe (HashMap Text Text) -> Application)
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 POSIX
-> Maybe Text -> Maybe (HashMap Text Text) -> Application)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Application)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdateTime")
Parser (Maybe Text -> Maybe (HashMap Text Text) -> Application)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Application)
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
"description")
Parser (Maybe (HashMap Text Text) -> Application)
-> Parser (Maybe (HashMap Text Text)) -> Parser Application
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)
)
instance Prelude.Hashable Application
instance Prelude.NFData Application