{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data Application = Application'
{
Application -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Application -> Maybe ISO8601
creationTime :: Prelude.Maybe Data.ISO8601,
Application -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Application -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Application -> Maybe ISO8601
lastUpdateTime :: Prelude.Maybe Data.ISO8601,
Application -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Application -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Application -> Application -> Bool
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]
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
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. 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'
{ $sel:arn:Application' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:Application' :: Maybe ISO8601
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:description:Application' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:Application' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:Application' :: Maybe ISO8601
lastUpdateTime = forall a. Maybe a
Prelude.Nothing,
$sel:name:Application' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Application' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
application_arn :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_arn :: Lens' Application (Maybe Text)
application_arn = 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_creationTime :: Lens.Lens' Application (Prelude.Maybe Prelude.UTCTime)
application_creationTime :: Lens' Application (Maybe UTCTime)
application_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe ISO8601
creationTime :: Maybe ISO8601
$sel:creationTime:Application' :: Application -> Maybe ISO8601
creationTime} -> Maybe ISO8601
creationTime) (\s :: Application
s@Application' {} Maybe ISO8601
a -> Application
s {$sel:creationTime:Application' :: Maybe ISO8601
creationTime = Maybe ISO8601
a} :: Application) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
application_description :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_description :: Lens' Application (Maybe Text)
application_description = 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_id :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_id :: Lens' Application (Maybe Text)
application_id = 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 :: Lens' Application (Maybe UTCTime)
application_lastUpdateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe ISO8601
lastUpdateTime :: Maybe ISO8601
$sel:lastUpdateTime:Application' :: Application -> Maybe ISO8601
lastUpdateTime} -> Maybe ISO8601
lastUpdateTime) (\s :: Application
s@Application' {} Maybe ISO8601
a -> Application
s {$sel:lastUpdateTime:Application' :: Maybe ISO8601
lastUpdateTime = Maybe ISO8601
a} :: Application) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
application_name :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_name :: Lens' Application (Maybe Text)
application_name = 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_tags :: Lens.Lens' Application (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
application_tags :: Lens' Application (Maybe (HashMap Text Text))
application_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Application where
parseJSON :: Value -> Parser Application
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Application"
( \Object
x ->
Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Application
Application'
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
"creationTime")
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
"description")
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
"id")
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
"lastUpdateTime")
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
"name")
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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Application where
hashWithSalt :: Int -> Application -> Int
hashWithSalt Int
_salt Application' {Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
lastUpdateTime :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:tags:Application' :: Application -> Maybe (HashMap Text Text)
$sel:name:Application' :: Application -> Maybe Text
$sel:lastUpdateTime:Application' :: Application -> Maybe ISO8601
$sel:id:Application' :: Application -> Maybe Text
$sel:description:Application' :: Application -> Maybe Text
$sel:creationTime:Application' :: Application -> Maybe ISO8601
$sel:arn:Application' :: Application -> 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 ISO8601
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
lastUpdateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData Application where
rnf :: Application -> ()
rnf Application' {Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
tags :: Maybe (HashMap Text Text)
name :: Maybe Text
lastUpdateTime :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:tags:Application' :: Application -> Maybe (HashMap Text Text)
$sel:name:Application' :: Application -> Maybe Text
$sel:lastUpdateTime:Application' :: Application -> Maybe ISO8601
$sel:id:Application' :: Application -> Maybe Text
$sel:description:Application' :: Application -> Maybe Text
$sel:creationTime:Application' :: Application -> Maybe ISO8601
$sel:arn:Application' :: Application -> 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 ISO8601
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastUpdateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags