{-# 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.Proton.Types.ServiceSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.ServiceStatus
data ServiceSummary = ServiceSummary'
{
ServiceSummary -> Maybe (Sensitive Text)
statusMessage :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ServiceSummary -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
ServiceSummary -> Text
arn :: Prelude.Text,
ServiceSummary -> POSIX
createdAt :: Core.POSIX,
ServiceSummary -> POSIX
lastModifiedAt :: Core.POSIX,
ServiceSummary -> Text
name :: Prelude.Text,
ServiceSummary -> ServiceStatus
status :: ServiceStatus,
ServiceSummary -> Text
templateName :: Prelude.Text
}
deriving (ServiceSummary -> ServiceSummary -> Bool
(ServiceSummary -> ServiceSummary -> Bool)
-> (ServiceSummary -> ServiceSummary -> Bool) -> Eq ServiceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceSummary -> ServiceSummary -> Bool
$c/= :: ServiceSummary -> ServiceSummary -> Bool
== :: ServiceSummary -> ServiceSummary -> Bool
$c== :: ServiceSummary -> ServiceSummary -> Bool
Prelude.Eq, Int -> ServiceSummary -> ShowS
[ServiceSummary] -> ShowS
ServiceSummary -> String
(Int -> ServiceSummary -> ShowS)
-> (ServiceSummary -> String)
-> ([ServiceSummary] -> ShowS)
-> Show ServiceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceSummary] -> ShowS
$cshowList :: [ServiceSummary] -> ShowS
show :: ServiceSummary -> String
$cshow :: ServiceSummary -> String
showsPrec :: Int -> ServiceSummary -> ShowS
$cshowsPrec :: Int -> ServiceSummary -> ShowS
Prelude.Show, (forall x. ServiceSummary -> Rep ServiceSummary x)
-> (forall x. Rep ServiceSummary x -> ServiceSummary)
-> Generic ServiceSummary
forall x. Rep ServiceSummary x -> ServiceSummary
forall x. ServiceSummary -> Rep ServiceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceSummary x -> ServiceSummary
$cfrom :: forall x. ServiceSummary -> Rep ServiceSummary x
Prelude.Generic)
newServiceSummary ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
ServiceStatus ->
Prelude.Text ->
ServiceSummary
newServiceSummary :: Text
-> UTCTime
-> UTCTime
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary
newServiceSummary
Text
pArn_
UTCTime
pCreatedAt_
UTCTime
pLastModifiedAt_
Text
pName_
ServiceStatus
pStatus_
Text
pTemplateName_ =
ServiceSummary' :: Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary
ServiceSummary'
{ $sel:statusMessage:ServiceSummary' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:arn:ServiceSummary' :: Text
arn = Text
pArn_,
$sel:createdAt:ServiceSummary' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastModifiedAt:ServiceSummary' :: POSIX
lastModifiedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedAt_,
$sel:name:ServiceSummary' :: Text
name = Text
pName_,
$sel:status:ServiceSummary' :: ServiceStatus
status = ServiceStatus
pStatus_,
$sel:templateName:ServiceSummary' :: Text
templateName = Text
pTemplateName_
}
serviceSummary_statusMessage :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_statusMessage = (ServiceSummary -> Maybe (Sensitive Text))
-> (ServiceSummary -> Maybe (Sensitive Text) -> ServiceSummary)
-> Lens
ServiceSummary
ServiceSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe (Sensitive Text)
statusMessage :: Maybe (Sensitive Text)
$sel:statusMessage:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
statusMessage} -> Maybe (Sensitive Text)
statusMessage) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe (Sensitive Text)
a -> ServiceSummary
s {$sel:statusMessage:ServiceSummary' :: Maybe (Sensitive Text)
statusMessage = Maybe (Sensitive Text)
a} :: ServiceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ServiceSummary -> f ServiceSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
serviceSummary_description :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_description :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_description = (ServiceSummary -> Maybe (Sensitive Text))
-> (ServiceSummary -> Maybe (Sensitive Text) -> ServiceSummary)
-> Lens
ServiceSummary
ServiceSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe (Sensitive Text)
a -> ServiceSummary
s {$sel:description:ServiceSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: ServiceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> ServiceSummary -> f ServiceSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
serviceSummary_arn :: Lens.Lens' ServiceSummary Prelude.Text
serviceSummary_arn :: (Text -> f Text) -> ServiceSummary -> f ServiceSummary
serviceSummary_arn = (ServiceSummary -> Text)
-> (ServiceSummary -> Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Text
arn :: Text
$sel:arn:ServiceSummary' :: ServiceSummary -> Text
arn} -> Text
arn) (\s :: ServiceSummary
s@ServiceSummary' {} Text
a -> ServiceSummary
s {$sel:arn:ServiceSummary' :: Text
arn = Text
a} :: ServiceSummary)
serviceSummary_createdAt :: Lens.Lens' ServiceSummary Prelude.UTCTime
serviceSummary_createdAt :: (UTCTime -> f UTCTime) -> ServiceSummary -> f ServiceSummary
serviceSummary_createdAt = (ServiceSummary -> POSIX)
-> (ServiceSummary -> POSIX -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:ServiceSummary' :: ServiceSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: ServiceSummary
s@ServiceSummary' {} POSIX
a -> ServiceSummary
s {$sel:createdAt:ServiceSummary' :: POSIX
createdAt = POSIX
a} :: ServiceSummary) ((POSIX -> f POSIX) -> ServiceSummary -> f ServiceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceSummary_lastModifiedAt :: Lens.Lens' ServiceSummary Prelude.UTCTime
serviceSummary_lastModifiedAt :: (UTCTime -> f UTCTime) -> ServiceSummary -> f ServiceSummary
serviceSummary_lastModifiedAt = (ServiceSummary -> POSIX)
-> (ServiceSummary -> POSIX -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {POSIX
lastModifiedAt :: POSIX
$sel:lastModifiedAt:ServiceSummary' :: ServiceSummary -> POSIX
lastModifiedAt} -> POSIX
lastModifiedAt) (\s :: ServiceSummary
s@ServiceSummary' {} POSIX
a -> ServiceSummary
s {$sel:lastModifiedAt:ServiceSummary' :: POSIX
lastModifiedAt = POSIX
a} :: ServiceSummary) ((POSIX -> f POSIX) -> ServiceSummary -> f ServiceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceSummary_name :: Lens.Lens' ServiceSummary Prelude.Text
serviceSummary_name :: (Text -> f Text) -> ServiceSummary -> f ServiceSummary
serviceSummary_name = (ServiceSummary -> Text)
-> (ServiceSummary -> Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Text
name :: Text
$sel:name:ServiceSummary' :: ServiceSummary -> Text
name} -> Text
name) (\s :: ServiceSummary
s@ServiceSummary' {} Text
a -> ServiceSummary
s {$sel:name:ServiceSummary' :: Text
name = Text
a} :: ServiceSummary)
serviceSummary_status :: Lens.Lens' ServiceSummary ServiceStatus
serviceSummary_status :: (ServiceStatus -> f ServiceStatus)
-> ServiceSummary -> f ServiceSummary
serviceSummary_status = (ServiceSummary -> ServiceStatus)
-> (ServiceSummary -> ServiceStatus -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary ServiceStatus ServiceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {ServiceStatus
status :: ServiceStatus
$sel:status:ServiceSummary' :: ServiceSummary -> ServiceStatus
status} -> ServiceStatus
status) (\s :: ServiceSummary
s@ServiceSummary' {} ServiceStatus
a -> ServiceSummary
s {$sel:status:ServiceSummary' :: ServiceStatus
status = ServiceStatus
a} :: ServiceSummary)
serviceSummary_templateName :: Lens.Lens' ServiceSummary Prelude.Text
serviceSummary_templateName :: (Text -> f Text) -> ServiceSummary -> f ServiceSummary
serviceSummary_templateName = (ServiceSummary -> Text)
-> (ServiceSummary -> Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Text
templateName :: Text
$sel:templateName:ServiceSummary' :: ServiceSummary -> Text
templateName} -> Text
templateName) (\s :: ServiceSummary
s@ServiceSummary' {} Text
a -> ServiceSummary
s {$sel:templateName:ServiceSummary' :: Text
templateName = Text
a} :: ServiceSummary)
instance Core.FromJSON ServiceSummary where
parseJSON :: Value -> Parser ServiceSummary
parseJSON =
String
-> (Object -> Parser ServiceSummary)
-> Value
-> Parser ServiceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceSummary"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary
ServiceSummary'
(Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusMessage")
Parser
(Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser
(Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary)
-> Parser Text
-> Parser
(POSIX -> POSIX -> Text -> ServiceStatus -> Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
Parser
(POSIX -> POSIX -> Text -> ServiceStatus -> Text -> ServiceSummary)
-> Parser POSIX
-> Parser
(POSIX -> Text -> ServiceStatus -> Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser (POSIX -> Text -> ServiceStatus -> Text -> ServiceSummary)
-> Parser POSIX
-> Parser (Text -> ServiceStatus -> Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"lastModifiedAt")
Parser (Text -> ServiceStatus -> Text -> ServiceSummary)
-> Parser Text -> Parser (ServiceStatus -> Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (ServiceStatus -> Text -> ServiceSummary)
-> Parser ServiceStatus -> Parser (Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ServiceStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> ServiceSummary)
-> Parser Text -> Parser ServiceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"templateName")
)
instance Prelude.Hashable ServiceSummary
instance Prelude.NFData ServiceSummary