{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.ServiceStatus
data ServiceSummary = ServiceSummary'
{
ServiceSummary -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ServiceSummary -> Maybe (Sensitive Text)
statusMessage :: Prelude.Maybe (Data.Sensitive Prelude.Text),
ServiceSummary -> Text
arn :: Prelude.Text,
ServiceSummary -> POSIX
createdAt :: Data.POSIX,
ServiceSummary -> POSIX
lastModifiedAt :: Data.POSIX,
ServiceSummary -> Text
name :: Prelude.Text,
ServiceSummary -> ServiceStatus
status :: ServiceStatus,
ServiceSummary -> Text
templateName :: Prelude.Text
}
deriving (ServiceSummary -> ServiceSummary -> Bool
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
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. 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'
{ $sel:description:ServiceSummary' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:ServiceSummary' :: Maybe (Sensitive Text)
statusMessage = forall a. Maybe a
Prelude.Nothing,
$sel:arn:ServiceSummary' :: Text
arn = Text
pArn_,
$sel:createdAt:ServiceSummary' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:lastModifiedAt:ServiceSummary' :: POSIX
lastModifiedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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_description :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_description :: Lens' ServiceSummary (Maybe Text)
serviceSummary_description = 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) 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
serviceSummary_statusMessage :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_statusMessage :: Lens' ServiceSummary (Maybe Text)
serviceSummary_statusMessage = 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) 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
serviceSummary_arn :: Lens.Lens' ServiceSummary Prelude.Text
serviceSummary_arn :: Lens' ServiceSummary Text
serviceSummary_arn = 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 :: Lens' ServiceSummary UTCTime
serviceSummary_createdAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
serviceSummary_lastModifiedAt :: Lens.Lens' ServiceSummary Prelude.UTCTime
serviceSummary_lastModifiedAt :: Lens' ServiceSummary UTCTime
serviceSummary_lastModifiedAt = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
serviceSummary_name :: Lens.Lens' ServiceSummary Prelude.Text
serviceSummary_name :: Lens' ServiceSummary Text
serviceSummary_name = 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 :: Lens' ServiceSummary ServiceStatus
serviceSummary_status = 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 :: Lens' ServiceSummary Text
serviceSummary_templateName = 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 Data.FromJSON ServiceSummary where
parseJSON :: Value -> Parser ServiceSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceSummary"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> ServiceStatus
-> Text
-> ServiceSummary
ServiceSummary'
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
"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
"statusMessage")
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
"arn")
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
"createdAt")
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
"lastModifiedAt")
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")
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
"status")
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
"templateName")
)
instance Prelude.Hashable ServiceSummary where
hashWithSalt :: Int -> ServiceSummary -> Int
hashWithSalt Int
_salt ServiceSummary' {Maybe (Sensitive Text)
Text
POSIX
ServiceStatus
templateName :: Text
status :: ServiceStatus
name :: Text
lastModifiedAt :: POSIX
createdAt :: POSIX
arn :: Text
statusMessage :: Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:templateName:ServiceSummary' :: ServiceSummary -> Text
$sel:status:ServiceSummary' :: ServiceSummary -> ServiceStatus
$sel:name:ServiceSummary' :: ServiceSummary -> Text
$sel:lastModifiedAt:ServiceSummary' :: ServiceSummary -> POSIX
$sel:createdAt:ServiceSummary' :: ServiceSummary -> POSIX
$sel:arn:ServiceSummary' :: ServiceSummary -> Text
$sel:statusMessage:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
lastModifiedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ServiceStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
instance Prelude.NFData ServiceSummary where
rnf :: ServiceSummary -> ()
rnf ServiceSummary' {Maybe (Sensitive Text)
Text
POSIX
ServiceStatus
templateName :: Text
status :: ServiceStatus
name :: Text
lastModifiedAt :: POSIX
createdAt :: POSIX
arn :: Text
statusMessage :: Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:templateName:ServiceSummary' :: ServiceSummary -> Text
$sel:status:ServiceSummary' :: ServiceSummary -> ServiceStatus
$sel:name:ServiceSummary' :: ServiceSummary -> Text
$sel:lastModifiedAt:ServiceSummary' :: ServiceSummary -> POSIX
$sel:createdAt:ServiceSummary' :: ServiceSummary -> POSIX
$sel:arn:ServiceSummary' :: ServiceSummary -> Text
$sel:statusMessage:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
lastModifiedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ServiceStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName