{-# 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.ResilienceHub.Types.App 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.ResilienceHub.Types.AppAssessmentScheduleType
import Amazonka.ResilienceHub.Types.AppComplianceStatusType
import Amazonka.ResilienceHub.Types.AppStatusType
data App = App'
{
App -> Maybe AppAssessmentScheduleType
assessmentSchedule :: Prelude.Maybe AppAssessmentScheduleType,
App -> Maybe AppComplianceStatusType
complianceStatus :: Prelude.Maybe AppComplianceStatusType,
App -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
App -> Maybe POSIX
lastAppComplianceEvaluationTime :: Prelude.Maybe Data.POSIX,
App -> Maybe POSIX
lastResiliencyScoreEvaluationTime :: Prelude.Maybe Data.POSIX,
App -> Maybe Text
policyArn :: Prelude.Maybe Prelude.Text,
App -> Maybe Double
resiliencyScore :: Prelude.Maybe Prelude.Double,
App -> Maybe AppStatusType
status :: Prelude.Maybe AppStatusType,
App -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
App -> Text
appArn :: Prelude.Text,
App -> POSIX
creationTime :: Data.POSIX,
App -> Text
name :: Prelude.Text
}
deriving (App -> App -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: App -> App -> Bool
$c/= :: App -> App -> Bool
== :: App -> App -> Bool
$c== :: App -> App -> Bool
Prelude.Eq, Int -> App -> ShowS
[App] -> ShowS
App -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [App] -> ShowS
$cshowList :: [App] -> ShowS
show :: App -> String
$cshow :: App -> String
showsPrec :: Int -> App -> ShowS
$cshowsPrec :: Int -> App -> ShowS
Prelude.Show, forall x. Rep App x -> App
forall x. App -> Rep App x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep App x -> App
$cfrom :: forall x. App -> Rep App x
Prelude.Generic)
newApp ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
App
newApp :: Text -> UTCTime -> Text -> App
newApp Text
pAppArn_ UTCTime
pCreationTime_ Text
pName_ =
App'
{ $sel:assessmentSchedule:App' :: Maybe AppAssessmentScheduleType
assessmentSchedule = forall a. Maybe a
Prelude.Nothing,
$sel:complianceStatus:App' :: Maybe AppComplianceStatusType
complianceStatus = forall a. Maybe a
Prelude.Nothing,
$sel:description:App' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastAppComplianceEvaluationTime:App' :: Maybe POSIX
lastAppComplianceEvaluationTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastResiliencyScoreEvaluationTime:App' :: Maybe POSIX
lastResiliencyScoreEvaluationTime = forall a. Maybe a
Prelude.Nothing,
$sel:policyArn:App' :: Maybe Text
policyArn = forall a. Maybe a
Prelude.Nothing,
$sel:resiliencyScore:App' :: Maybe Double
resiliencyScore = forall a. Maybe a
Prelude.Nothing,
$sel:status:App' :: Maybe AppStatusType
status = forall a. Maybe a
Prelude.Nothing,
$sel:tags:App' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
$sel:appArn:App' :: Text
appArn = Text
pAppArn_,
$sel:creationTime:App' :: POSIX
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
$sel:name:App' :: Text
name = Text
pName_
}
app_assessmentSchedule :: Lens.Lens' App (Prelude.Maybe AppAssessmentScheduleType)
app_assessmentSchedule :: Lens' App (Maybe AppAssessmentScheduleType)
app_assessmentSchedule = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe AppAssessmentScheduleType
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:assessmentSchedule:App' :: App -> Maybe AppAssessmentScheduleType
assessmentSchedule} -> Maybe AppAssessmentScheduleType
assessmentSchedule) (\s :: App
s@App' {} Maybe AppAssessmentScheduleType
a -> App
s {$sel:assessmentSchedule:App' :: Maybe AppAssessmentScheduleType
assessmentSchedule = Maybe AppAssessmentScheduleType
a} :: App)
app_complianceStatus :: Lens.Lens' App (Prelude.Maybe AppComplianceStatusType)
app_complianceStatus :: Lens' App (Maybe AppComplianceStatusType)
app_complianceStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe AppComplianceStatusType
complianceStatus :: Maybe AppComplianceStatusType
$sel:complianceStatus:App' :: App -> Maybe AppComplianceStatusType
complianceStatus} -> Maybe AppComplianceStatusType
complianceStatus) (\s :: App
s@App' {} Maybe AppComplianceStatusType
a -> App
s {$sel:complianceStatus:App' :: Maybe AppComplianceStatusType
complianceStatus = Maybe AppComplianceStatusType
a} :: App)
app_description :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_description :: Lens' App (Maybe Text)
app_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Text
description :: Maybe Text
$sel:description:App' :: App -> Maybe Text
description} -> Maybe Text
description) (\s :: App
s@App' {} Maybe Text
a -> App
s {$sel:description:App' :: Maybe Text
description = Maybe Text
a} :: App)
app_lastAppComplianceEvaluationTime :: Lens.Lens' App (Prelude.Maybe Prelude.UTCTime)
app_lastAppComplianceEvaluationTime :: Lens' App (Maybe UTCTime)
app_lastAppComplianceEvaluationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe POSIX
lastAppComplianceEvaluationTime :: Maybe POSIX
$sel:lastAppComplianceEvaluationTime:App' :: App -> Maybe POSIX
lastAppComplianceEvaluationTime} -> Maybe POSIX
lastAppComplianceEvaluationTime) (\s :: App
s@App' {} Maybe POSIX
a -> App
s {$sel:lastAppComplianceEvaluationTime:App' :: Maybe POSIX
lastAppComplianceEvaluationTime = Maybe POSIX
a} :: App) 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
app_lastResiliencyScoreEvaluationTime :: Lens.Lens' App (Prelude.Maybe Prelude.UTCTime)
app_lastResiliencyScoreEvaluationTime :: Lens' App (Maybe UTCTime)
app_lastResiliencyScoreEvaluationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe POSIX
lastResiliencyScoreEvaluationTime :: Maybe POSIX
$sel:lastResiliencyScoreEvaluationTime:App' :: App -> Maybe POSIX
lastResiliencyScoreEvaluationTime} -> Maybe POSIX
lastResiliencyScoreEvaluationTime) (\s :: App
s@App' {} Maybe POSIX
a -> App
s {$sel:lastResiliencyScoreEvaluationTime:App' :: Maybe POSIX
lastResiliencyScoreEvaluationTime = Maybe POSIX
a} :: App) 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
app_policyArn :: Lens.Lens' App (Prelude.Maybe Prelude.Text)
app_policyArn :: Lens' App (Maybe Text)
app_policyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Text
policyArn :: Maybe Text
$sel:policyArn:App' :: App -> Maybe Text
policyArn} -> Maybe Text
policyArn) (\s :: App
s@App' {} Maybe Text
a -> App
s {$sel:policyArn:App' :: Maybe Text
policyArn = Maybe Text
a} :: App)
app_resiliencyScore :: Lens.Lens' App (Prelude.Maybe Prelude.Double)
app_resiliencyScore :: Lens' App (Maybe Double)
app_resiliencyScore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe Double
resiliencyScore :: Maybe Double
$sel:resiliencyScore:App' :: App -> Maybe Double
resiliencyScore} -> Maybe Double
resiliencyScore) (\s :: App
s@App' {} Maybe Double
a -> App
s {$sel:resiliencyScore:App' :: Maybe Double
resiliencyScore = Maybe Double
a} :: App)
app_status :: Lens.Lens' App (Prelude.Maybe AppStatusType)
app_status :: Lens' App (Maybe AppStatusType)
app_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe AppStatusType
status :: Maybe AppStatusType
$sel:status:App' :: App -> Maybe AppStatusType
status} -> Maybe AppStatusType
status) (\s :: App
s@App' {} Maybe AppStatusType
a -> App
s {$sel:status:App' :: Maybe AppStatusType
status = Maybe AppStatusType
a} :: App)
app_tags :: Lens.Lens' App (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
app_tags :: Lens' App (Maybe (HashMap Text Text))
app_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:App' :: App -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: App
s@App' {} Maybe (Sensitive (HashMap Text Text))
a -> App
s {$sel:tags:App' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: App) 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. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
app_appArn :: Lens.Lens' App Prelude.Text
app_appArn :: Lens' App Text
app_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
appArn :: Text
$sel:appArn:App' :: App -> Text
appArn} -> Text
appArn) (\s :: App
s@App' {} Text
a -> App
s {$sel:appArn:App' :: Text
appArn = Text
a} :: App)
app_creationTime :: Lens.Lens' App Prelude.UTCTime
app_creationTime :: Lens' App UTCTime
app_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {POSIX
creationTime :: POSIX
$sel:creationTime:App' :: App -> POSIX
creationTime} -> POSIX
creationTime) (\s :: App
s@App' {} POSIX
a -> App
s {$sel:creationTime:App' :: POSIX
creationTime = POSIX
a} :: App) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
app_name :: Lens.Lens' App Prelude.Text
app_name :: Lens' App Text
app_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\App' {Text
name :: Text
$sel:name:App' :: App -> Text
name} -> Text
name) (\s :: App
s@App' {} Text
a -> App
s {$sel:name:App' :: Text
name = Text
a} :: App)
instance Data.FromJSON App where
parseJSON :: Value -> Parser App
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"App"
( \Object
x ->
Maybe AppAssessmentScheduleType
-> Maybe AppComplianceStatusType
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Double
-> Maybe AppStatusType
-> Maybe (Sensitive (HashMap Text Text))
-> Text
-> POSIX
-> Text
-> App
App'
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
"assessmentSchedule")
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
"complianceStatus")
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
"lastAppComplianceEvaluationTime")
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
"lastResiliencyScoreEvaluationTime")
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
"policyArn")
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
"resiliencyScore")
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
"tags" 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 a
Data..: Key
"appArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"name")
)
instance Prelude.Hashable App where
hashWithSalt :: Int -> App -> Int
hashWithSalt Int
_salt App' {Maybe Double
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe POSIX
Maybe AppAssessmentScheduleType
Maybe AppComplianceStatusType
Maybe AppStatusType
Text
POSIX
name :: Text
creationTime :: POSIX
appArn :: Text
tags :: Maybe (Sensitive (HashMap Text Text))
status :: Maybe AppStatusType
resiliencyScore :: Maybe Double
policyArn :: Maybe Text
lastResiliencyScoreEvaluationTime :: Maybe POSIX
lastAppComplianceEvaluationTime :: Maybe POSIX
description :: Maybe Text
complianceStatus :: Maybe AppComplianceStatusType
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:name:App' :: App -> Text
$sel:creationTime:App' :: App -> POSIX
$sel:appArn:App' :: App -> Text
$sel:tags:App' :: App -> Maybe (Sensitive (HashMap Text Text))
$sel:status:App' :: App -> Maybe AppStatusType
$sel:resiliencyScore:App' :: App -> Maybe Double
$sel:policyArn:App' :: App -> Maybe Text
$sel:lastResiliencyScoreEvaluationTime:App' :: App -> Maybe POSIX
$sel:lastAppComplianceEvaluationTime:App' :: App -> Maybe POSIX
$sel:description:App' :: App -> Maybe Text
$sel:complianceStatus:App' :: App -> Maybe AppComplianceStatusType
$sel:assessmentSchedule:App' :: App -> Maybe AppAssessmentScheduleType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppAssessmentScheduleType
assessmentSchedule
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppComplianceStatusType
complianceStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastAppComplianceEvaluationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastResiliencyScoreEvaluationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
policyArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
resiliencyScore
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppStatusType
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData App where
rnf :: App -> ()
rnf App' {Maybe Double
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe POSIX
Maybe AppAssessmentScheduleType
Maybe AppComplianceStatusType
Maybe AppStatusType
Text
POSIX
name :: Text
creationTime :: POSIX
appArn :: Text
tags :: Maybe (Sensitive (HashMap Text Text))
status :: Maybe AppStatusType
resiliencyScore :: Maybe Double
policyArn :: Maybe Text
lastResiliencyScoreEvaluationTime :: Maybe POSIX
lastAppComplianceEvaluationTime :: Maybe POSIX
description :: Maybe Text
complianceStatus :: Maybe AppComplianceStatusType
assessmentSchedule :: Maybe AppAssessmentScheduleType
$sel:name:App' :: App -> Text
$sel:creationTime:App' :: App -> POSIX
$sel:appArn:App' :: App -> Text
$sel:tags:App' :: App -> Maybe (Sensitive (HashMap Text Text))
$sel:status:App' :: App -> Maybe AppStatusType
$sel:resiliencyScore:App' :: App -> Maybe Double
$sel:policyArn:App' :: App -> Maybe Text
$sel:lastResiliencyScoreEvaluationTime:App' :: App -> Maybe POSIX
$sel:lastAppComplianceEvaluationTime:App' :: App -> Maybe POSIX
$sel:description:App' :: App -> Maybe Text
$sel:complianceStatus:App' :: App -> Maybe AppComplianceStatusType
$sel:assessmentSchedule:App' :: App -> Maybe AppAssessmentScheduleType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AppAssessmentScheduleType
assessmentSchedule
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AppComplianceStatusType
complianceStatus
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 POSIX
lastAppComplianceEvaluationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastResiliencyScoreEvaluationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
policyArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
resiliencyScore
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AppStatusType
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name