{-# 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.AppRunner.Types.ServiceSummary where
import Amazonka.AppRunner.Types.ServiceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServiceSummary = ServiceSummary'
{
ServiceSummary -> Maybe ServiceStatus
status :: Prelude.Maybe ServiceStatus,
ServiceSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
ServiceSummary -> Maybe Text
serviceUrl :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
ServiceSummary -> Maybe Text
serviceArn :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe Text
serviceId :: Prelude.Maybe 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, ReadPrec [ServiceSummary]
ReadPrec ServiceSummary
Int -> ReadS ServiceSummary
ReadS [ServiceSummary]
(Int -> ReadS ServiceSummary)
-> ReadS [ServiceSummary]
-> ReadPrec ServiceSummary
-> ReadPrec [ServiceSummary]
-> Read ServiceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceSummary]
$creadListPrec :: ReadPrec [ServiceSummary]
readPrec :: ReadPrec ServiceSummary
$creadPrec :: ReadPrec ServiceSummary
readList :: ReadS [ServiceSummary]
$creadList :: ReadS [ServiceSummary]
readsPrec :: Int -> ReadS ServiceSummary
$creadsPrec :: Int -> ReadS ServiceSummary
Prelude.Read, 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 ::
ServiceSummary
newServiceSummary :: ServiceSummary
newServiceSummary =
ServiceSummary' :: Maybe ServiceStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary
ServiceSummary'
{ $sel:status:ServiceSummary' :: Maybe ServiceStatus
status = Maybe ServiceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:ServiceSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:serviceUrl:ServiceSummary' :: Maybe Text
serviceUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:ServiceSummary' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:ServiceSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:serviceArn:ServiceSummary' :: Maybe Text
serviceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceId:ServiceSummary' :: Maybe Text
serviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serviceSummary_status :: Lens.Lens' ServiceSummary (Prelude.Maybe ServiceStatus)
serviceSummary_status :: (Maybe ServiceStatus -> f (Maybe ServiceStatus))
-> ServiceSummary -> f ServiceSummary
serviceSummary_status = (ServiceSummary -> Maybe ServiceStatus)
-> (ServiceSummary -> Maybe ServiceStatus -> ServiceSummary)
-> Lens
ServiceSummary
ServiceSummary
(Maybe ServiceStatus)
(Maybe ServiceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe ServiceStatus
status :: Maybe ServiceStatus
$sel:status:ServiceSummary' :: ServiceSummary -> Maybe ServiceStatus
status} -> Maybe ServiceStatus
status) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe ServiceStatus
a -> ServiceSummary
s {$sel:status:ServiceSummary' :: Maybe ServiceStatus
status = Maybe ServiceStatus
a} :: ServiceSummary)
serviceSummary_createdAt :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.UTCTime)
serviceSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSummary -> f ServiceSummary
serviceSummary_createdAt = (ServiceSummary -> Maybe POSIX)
-> (ServiceSummary -> Maybe POSIX -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ServiceSummary' :: ServiceSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe POSIX
a -> ServiceSummary
s {$sel:createdAt:ServiceSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ServiceSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ServiceSummary -> f ServiceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceSummary_serviceUrl :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_serviceUrl :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_serviceUrl = (ServiceSummary -> Maybe Text)
-> (ServiceSummary -> Maybe Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
serviceUrl :: Maybe Text
$sel:serviceUrl:ServiceSummary' :: ServiceSummary -> Maybe Text
serviceUrl} -> Maybe Text
serviceUrl) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:serviceUrl:ServiceSummary' :: Maybe Text
serviceUrl = Maybe Text
a} :: ServiceSummary)
serviceSummary_serviceName :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_serviceName :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_serviceName = (ServiceSummary -> Maybe Text)
-> (ServiceSummary -> Maybe Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:ServiceSummary' :: ServiceSummary -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:serviceName:ServiceSummary' :: Maybe Text
serviceName = Maybe Text
a} :: ServiceSummary)
serviceSummary_updatedAt :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.UTCTime)
serviceSummary_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSummary -> f ServiceSummary
serviceSummary_updatedAt = (ServiceSummary -> Maybe POSIX)
-> (ServiceSummary -> Maybe POSIX -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:ServiceSummary' :: ServiceSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe POSIX
a -> ServiceSummary
s {$sel:updatedAt:ServiceSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: ServiceSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ServiceSummary -> f ServiceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ServiceSummary
-> f ServiceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
serviceSummary_serviceArn :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_serviceArn :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_serviceArn = (ServiceSummary -> Maybe Text)
-> (ServiceSummary -> Maybe Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
serviceArn :: Maybe Text
$sel:serviceArn:ServiceSummary' :: ServiceSummary -> Maybe Text
serviceArn} -> Maybe Text
serviceArn) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:serviceArn:ServiceSummary' :: Maybe Text
serviceArn = Maybe Text
a} :: ServiceSummary)
serviceSummary_serviceId :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_serviceId :: (Maybe Text -> f (Maybe Text))
-> ServiceSummary -> f ServiceSummary
serviceSummary_serviceId = (ServiceSummary -> Maybe Text)
-> (ServiceSummary -> Maybe Text -> ServiceSummary)
-> Lens ServiceSummary ServiceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
serviceId :: Maybe Text
$sel:serviceId:ServiceSummary' :: ServiceSummary -> Maybe Text
serviceId} -> Maybe Text
serviceId) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:serviceId:ServiceSummary' :: Maybe Text
serviceId = Maybe 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 ServiceStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary
ServiceSummary'
(Maybe ServiceStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary)
-> Parser (Maybe ServiceStatus)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ServiceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ServiceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceUrl")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> ServiceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe Text -> Maybe Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceName")
Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> ServiceSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdatedAt")
Parser (Maybe Text -> Maybe Text -> ServiceSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ServiceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceArn")
Parser (Maybe Text -> ServiceSummary)
-> Parser (Maybe Text) -> Parser ServiceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceId")
)
instance Prelude.Hashable ServiceSummary
instance Prelude.NFData ServiceSummary