{-# 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.ConnectionSummary where
import Amazonka.AppRunner.Types.ConnectionStatus
import Amazonka.AppRunner.Types.ProviderType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConnectionSummary = ConnectionSummary'
{
ConnectionSummary -> Maybe ConnectionStatus
status :: Prelude.Maybe ConnectionStatus,
ConnectionSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
ConnectionSummary -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
ConnectionSummary -> Maybe Text
connectionName :: Prelude.Maybe Prelude.Text,
ConnectionSummary -> Maybe Text
connectionArn :: Prelude.Maybe Prelude.Text
}
deriving (ConnectionSummary -> ConnectionSummary -> Bool
(ConnectionSummary -> ConnectionSummary -> Bool)
-> (ConnectionSummary -> ConnectionSummary -> Bool)
-> Eq ConnectionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionSummary -> ConnectionSummary -> Bool
$c/= :: ConnectionSummary -> ConnectionSummary -> Bool
== :: ConnectionSummary -> ConnectionSummary -> Bool
$c== :: ConnectionSummary -> ConnectionSummary -> Bool
Prelude.Eq, ReadPrec [ConnectionSummary]
ReadPrec ConnectionSummary
Int -> ReadS ConnectionSummary
ReadS [ConnectionSummary]
(Int -> ReadS ConnectionSummary)
-> ReadS [ConnectionSummary]
-> ReadPrec ConnectionSummary
-> ReadPrec [ConnectionSummary]
-> Read ConnectionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionSummary]
$creadListPrec :: ReadPrec [ConnectionSummary]
readPrec :: ReadPrec ConnectionSummary
$creadPrec :: ReadPrec ConnectionSummary
readList :: ReadS [ConnectionSummary]
$creadList :: ReadS [ConnectionSummary]
readsPrec :: Int -> ReadS ConnectionSummary
$creadsPrec :: Int -> ReadS ConnectionSummary
Prelude.Read, Int -> ConnectionSummary -> ShowS
[ConnectionSummary] -> ShowS
ConnectionSummary -> String
(Int -> ConnectionSummary -> ShowS)
-> (ConnectionSummary -> String)
-> ([ConnectionSummary] -> ShowS)
-> Show ConnectionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionSummary] -> ShowS
$cshowList :: [ConnectionSummary] -> ShowS
show :: ConnectionSummary -> String
$cshow :: ConnectionSummary -> String
showsPrec :: Int -> ConnectionSummary -> ShowS
$cshowsPrec :: Int -> ConnectionSummary -> ShowS
Prelude.Show, (forall x. ConnectionSummary -> Rep ConnectionSummary x)
-> (forall x. Rep ConnectionSummary x -> ConnectionSummary)
-> Generic ConnectionSummary
forall x. Rep ConnectionSummary x -> ConnectionSummary
forall x. ConnectionSummary -> Rep ConnectionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectionSummary x -> ConnectionSummary
$cfrom :: forall x. ConnectionSummary -> Rep ConnectionSummary x
Prelude.Generic)
newConnectionSummary ::
ConnectionSummary
newConnectionSummary :: ConnectionSummary
newConnectionSummary =
ConnectionSummary' :: Maybe ConnectionStatus
-> Maybe POSIX
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> ConnectionSummary
ConnectionSummary'
{ $sel:status:ConnectionSummary' :: Maybe ConnectionStatus
status = Maybe ConnectionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:ConnectionSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:providerType:ConnectionSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
forall a. Maybe a
Prelude.Nothing,
$sel:connectionName:ConnectionSummary' :: Maybe Text
connectionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionArn:ConnectionSummary' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
connectionSummary_status :: Lens.Lens' ConnectionSummary (Prelude.Maybe ConnectionStatus)
connectionSummary_status :: (Maybe ConnectionStatus -> f (Maybe ConnectionStatus))
-> ConnectionSummary -> f ConnectionSummary
connectionSummary_status = (ConnectionSummary -> Maybe ConnectionStatus)
-> (ConnectionSummary
-> Maybe ConnectionStatus -> ConnectionSummary)
-> Lens
ConnectionSummary
ConnectionSummary
(Maybe ConnectionStatus)
(Maybe ConnectionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionSummary' {Maybe ConnectionStatus
status :: Maybe ConnectionStatus
$sel:status:ConnectionSummary' :: ConnectionSummary -> Maybe ConnectionStatus
status} -> Maybe ConnectionStatus
status) (\s :: ConnectionSummary
s@ConnectionSummary' {} Maybe ConnectionStatus
a -> ConnectionSummary
s {$sel:status:ConnectionSummary' :: Maybe ConnectionStatus
status = Maybe ConnectionStatus
a} :: ConnectionSummary)
connectionSummary_createdAt :: Lens.Lens' ConnectionSummary (Prelude.Maybe Prelude.UTCTime)
connectionSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConnectionSummary -> f ConnectionSummary
connectionSummary_createdAt = (ConnectionSummary -> Maybe POSIX)
-> (ConnectionSummary -> Maybe POSIX -> ConnectionSummary)
-> Lens
ConnectionSummary ConnectionSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ConnectionSummary' :: ConnectionSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ConnectionSummary
s@ConnectionSummary' {} Maybe POSIX
a -> ConnectionSummary
s {$sel:createdAt:ConnectionSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ConnectionSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ConnectionSummary -> f ConnectionSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConnectionSummary
-> f ConnectionSummary
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
connectionSummary_providerType :: Lens.Lens' ConnectionSummary (Prelude.Maybe ProviderType)
connectionSummary_providerType :: (Maybe ProviderType -> f (Maybe ProviderType))
-> ConnectionSummary -> f ConnectionSummary
connectionSummary_providerType = (ConnectionSummary -> Maybe ProviderType)
-> (ConnectionSummary -> Maybe ProviderType -> ConnectionSummary)
-> Lens
ConnectionSummary
ConnectionSummary
(Maybe ProviderType)
(Maybe ProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionSummary' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:ConnectionSummary' :: ConnectionSummary -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: ConnectionSummary
s@ConnectionSummary' {} Maybe ProviderType
a -> ConnectionSummary
s {$sel:providerType:ConnectionSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: ConnectionSummary)
connectionSummary_connectionName :: Lens.Lens' ConnectionSummary (Prelude.Maybe Prelude.Text)
connectionSummary_connectionName :: (Maybe Text -> f (Maybe Text))
-> ConnectionSummary -> f ConnectionSummary
connectionSummary_connectionName = (ConnectionSummary -> Maybe Text)
-> (ConnectionSummary -> Maybe Text -> ConnectionSummary)
-> Lens
ConnectionSummary ConnectionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionSummary' {Maybe Text
connectionName :: Maybe Text
$sel:connectionName:ConnectionSummary' :: ConnectionSummary -> Maybe Text
connectionName} -> Maybe Text
connectionName) (\s :: ConnectionSummary
s@ConnectionSummary' {} Maybe Text
a -> ConnectionSummary
s {$sel:connectionName:ConnectionSummary' :: Maybe Text
connectionName = Maybe Text
a} :: ConnectionSummary)
connectionSummary_connectionArn :: Lens.Lens' ConnectionSummary (Prelude.Maybe Prelude.Text)
connectionSummary_connectionArn :: (Maybe Text -> f (Maybe Text))
-> ConnectionSummary -> f ConnectionSummary
connectionSummary_connectionArn = (ConnectionSummary -> Maybe Text)
-> (ConnectionSummary -> Maybe Text -> ConnectionSummary)
-> Lens
ConnectionSummary ConnectionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionSummary' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:ConnectionSummary' :: ConnectionSummary -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: ConnectionSummary
s@ConnectionSummary' {} Maybe Text
a -> ConnectionSummary
s {$sel:connectionArn:ConnectionSummary' :: Maybe Text
connectionArn = Maybe Text
a} :: ConnectionSummary)
instance Core.FromJSON ConnectionSummary where
parseJSON :: Value -> Parser ConnectionSummary
parseJSON =
String
-> (Object -> Parser ConnectionSummary)
-> Value
-> Parser ConnectionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectionSummary"
( \Object
x ->
Maybe ConnectionStatus
-> Maybe POSIX
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> ConnectionSummary
ConnectionSummary'
(Maybe ConnectionStatus
-> Maybe POSIX
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> ConnectionSummary)
-> Parser (Maybe ConnectionStatus)
-> Parser
(Maybe POSIX
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> ConnectionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ConnectionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe POSIX
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> ConnectionSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ProviderType
-> Maybe Text -> Maybe Text -> ConnectionSummary)
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 ProviderType
-> Maybe Text -> Maybe Text -> ConnectionSummary)
-> Parser (Maybe ProviderType)
-> Parser (Maybe Text -> Maybe Text -> ConnectionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProviderType")
Parser (Maybe Text -> Maybe Text -> ConnectionSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ConnectionSummary)
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
"ConnectionName")
Parser (Maybe Text -> ConnectionSummary)
-> Parser (Maybe Text) -> Parser ConnectionSummary
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
"ConnectionArn")
)
instance Prelude.Hashable ConnectionSummary
instance Prelude.NFData ConnectionSummary