{-# 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.SSMSAP.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
import Amazonka.SSMSAP.Types.ApplicationStatus
import Amazonka.SSMSAP.Types.ApplicationType
data Application = Application'
{ Application -> Maybe Text
appRegistryArn :: Prelude.Maybe Prelude.Text,
Application -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Application -> Maybe [Text]
components :: Prelude.Maybe [Prelude.Text],
Application -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Application -> Maybe POSIX
lastUpdated :: Prelude.Maybe Data.POSIX,
Application -> Maybe ApplicationStatus
status :: Prelude.Maybe ApplicationStatus,
Application -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
Application -> Maybe ApplicationType
type' :: Prelude.Maybe ApplicationType
}
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:appRegistryArn:Application' :: Maybe Text
appRegistryArn = forall a. Maybe a
Prelude.Nothing,
$sel:arn:Application' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:components:Application' :: Maybe [Text]
components = forall a. Maybe a
Prelude.Nothing,
$sel:id:Application' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:Application' :: Maybe POSIX
lastUpdated = forall a. Maybe a
Prelude.Nothing,
$sel:status:Application' :: Maybe ApplicationStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:Application' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
$sel:type':Application' :: Maybe ApplicationType
type' = forall a. Maybe a
Prelude.Nothing
}
application_appRegistryArn :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_appRegistryArn :: Lens' Application (Maybe Text)
application_appRegistryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
appRegistryArn :: Maybe Text
$sel:appRegistryArn:Application' :: Application -> Maybe Text
appRegistryArn} -> Maybe Text
appRegistryArn) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:appRegistryArn:Application' :: Maybe Text
appRegistryArn = Maybe Text
a} :: Application)
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_components :: Lens.Lens' Application (Prelude.Maybe [Prelude.Text])
application_components :: Lens' Application (Maybe [Text])
application_components = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe [Text]
components :: Maybe [Text]
$sel:components:Application' :: Application -> Maybe [Text]
components} -> Maybe [Text]
components) (\s :: Application
s@Application' {} Maybe [Text]
a -> Application
s {$sel:components:Application' :: Maybe [Text]
components = Maybe [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
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_lastUpdated :: Lens.Lens' Application (Prelude.Maybe Prelude.UTCTime)
application_lastUpdated :: Lens' Application (Maybe UTCTime)
application_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:Application' :: Application -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: Application
s@Application' {} Maybe POSIX
a -> Application
s {$sel:lastUpdated:Application' :: Maybe POSIX
lastUpdated = Maybe POSIX
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_status :: Lens.Lens' Application (Prelude.Maybe ApplicationStatus)
application_status :: Lens' Application (Maybe ApplicationStatus)
application_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe ApplicationStatus
status :: Maybe ApplicationStatus
$sel:status:Application' :: Application -> Maybe ApplicationStatus
status} -> Maybe ApplicationStatus
status) (\s :: Application
s@Application' {} Maybe ApplicationStatus
a -> Application
s {$sel:status:Application' :: Maybe ApplicationStatus
status = Maybe ApplicationStatus
a} :: Application)
application_statusMessage :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_statusMessage :: Lens' Application (Maybe Text)
application_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:Application' :: Application -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:statusMessage:Application' :: Maybe Text
statusMessage = Maybe Text
a} :: Application)
application_type :: Lens.Lens' Application (Prelude.Maybe ApplicationType)
application_type :: Lens' Application (Maybe ApplicationType)
application_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe ApplicationType
type' :: Maybe ApplicationType
$sel:type':Application' :: Application -> Maybe ApplicationType
type'} -> Maybe ApplicationType
type') (\s :: Application
s@Application' {} Maybe ApplicationType
a -> Application
s {$sel:type':Application' :: Maybe ApplicationType
type' = Maybe ApplicationType
a} :: Application)
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 Text
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe ApplicationStatus
-> Maybe Text
-> Maybe ApplicationType
-> 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
"AppRegistryArn")
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
"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
"Components" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"LastUpdated")
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
"Status")
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
"StatusMessage")
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
"Type")
)
instance Prelude.Hashable Application where
hashWithSalt :: Int -> Application -> Int
hashWithSalt Int
_salt Application' {Maybe [Text]
Maybe Text
Maybe POSIX
Maybe ApplicationStatus
Maybe ApplicationType
type' :: Maybe ApplicationType
statusMessage :: Maybe Text
status :: Maybe ApplicationStatus
lastUpdated :: Maybe POSIX
id :: Maybe Text
components :: Maybe [Text]
arn :: Maybe Text
appRegistryArn :: Maybe Text
$sel:type':Application' :: Application -> Maybe ApplicationType
$sel:statusMessage:Application' :: Application -> Maybe Text
$sel:status:Application' :: Application -> Maybe ApplicationStatus
$sel:lastUpdated:Application' :: Application -> Maybe POSIX
$sel:id:Application' :: Application -> Maybe Text
$sel:components:Application' :: Application -> Maybe [Text]
$sel:arn:Application' :: Application -> Maybe Text
$sel:appRegistryArn:Application' :: Application -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
appRegistryArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
components
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ApplicationStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ApplicationType
type'
instance Prelude.NFData Application where
rnf :: Application -> ()
rnf Application' {Maybe [Text]
Maybe Text
Maybe POSIX
Maybe ApplicationStatus
Maybe ApplicationType
type' :: Maybe ApplicationType
statusMessage :: Maybe Text
status :: Maybe ApplicationStatus
lastUpdated :: Maybe POSIX
id :: Maybe Text
components :: Maybe [Text]
arn :: Maybe Text
appRegistryArn :: Maybe Text
$sel:type':Application' :: Application -> Maybe ApplicationType
$sel:statusMessage:Application' :: Application -> Maybe Text
$sel:status:Application' :: Application -> Maybe ApplicationStatus
$sel:lastUpdated:Application' :: Application -> Maybe POSIX
$sel:id:Application' :: Application -> Maybe Text
$sel:components:Application' :: Application -> Maybe [Text]
$sel:arn:Application' :: Application -> Maybe Text
$sel:appRegistryArn:Application' :: Application -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appRegistryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [Text]
components
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 POSIX
lastUpdated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ApplicationStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ApplicationType
type'