{-# 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.Route53AutoNaming.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.Route53AutoNaming.Types.DnsConfig
import Amazonka.Route53AutoNaming.Types.HealthCheckConfig
import Amazonka.Route53AutoNaming.Types.HealthCheckCustomConfig
import Amazonka.Route53AutoNaming.Types.ServiceType
data ServiceSummary = ServiceSummary'
{
ServiceSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe POSIX
createDate :: Prelude.Maybe Data.POSIX,
ServiceSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe DnsConfig
dnsConfig :: Prelude.Maybe DnsConfig,
ServiceSummary -> Maybe HealthCheckConfig
healthCheckConfig :: Prelude.Maybe HealthCheckConfig,
ServiceSummary -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig :: Prelude.Maybe HealthCheckCustomConfig,
ServiceSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe Int
instanceCount :: Prelude.Maybe Prelude.Int,
ServiceSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ServiceSummary -> Maybe ServiceType
type' :: Prelude.Maybe ServiceType
}
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, ReadPrec [ServiceSummary]
ReadPrec ServiceSummary
Int -> ReadS ServiceSummary
ReadS [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
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 ::
ServiceSummary
newServiceSummary :: ServiceSummary
newServiceSummary =
ServiceSummary'
{ $sel:arn:ServiceSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createDate:ServiceSummary' :: Maybe POSIX
createDate = forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:dnsConfig:ServiceSummary' :: Maybe DnsConfig
dnsConfig = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckConfig:ServiceSummary' :: Maybe HealthCheckConfig
healthCheckConfig = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckCustomConfig:ServiceSummary' :: Maybe HealthCheckCustomConfig
healthCheckCustomConfig = forall a. Maybe a
Prelude.Nothing,
$sel:id:ServiceSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:instanceCount:ServiceSummary' :: Maybe Int
instanceCount = forall a. Maybe a
Prelude.Nothing,
$sel:name:ServiceSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:type':ServiceSummary' :: Maybe ServiceType
type' = forall a. Maybe a
Prelude.Nothing
}
serviceSummary_arn :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_arn :: Lens' ServiceSummary (Maybe Text)
serviceSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ServiceSummary' :: ServiceSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:arn:ServiceSummary' :: Maybe Text
arn = Maybe Text
a} :: ServiceSummary)
serviceSummary_createDate :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.UTCTime)
serviceSummary_createDate :: Lens' ServiceSummary (Maybe UTCTime)
serviceSummary_createDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:ServiceSummary' :: ServiceSummary -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe POSIX
a -> ServiceSummary
s {$sel:createDate:ServiceSummary' :: Maybe POSIX
createDate = Maybe POSIX
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 :: Format). Iso' (Time a) UTCTime
Data._Time
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 Text
description :: Maybe Text
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:description:ServiceSummary' :: Maybe Text
description = Maybe Text
a} :: ServiceSummary)
serviceSummary_dnsConfig :: Lens.Lens' ServiceSummary (Prelude.Maybe DnsConfig)
serviceSummary_dnsConfig :: Lens' ServiceSummary (Maybe DnsConfig)
serviceSummary_dnsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe DnsConfig
dnsConfig :: Maybe DnsConfig
$sel:dnsConfig:ServiceSummary' :: ServiceSummary -> Maybe DnsConfig
dnsConfig} -> Maybe DnsConfig
dnsConfig) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe DnsConfig
a -> ServiceSummary
s {$sel:dnsConfig:ServiceSummary' :: Maybe DnsConfig
dnsConfig = Maybe DnsConfig
a} :: ServiceSummary)
serviceSummary_healthCheckConfig :: Lens.Lens' ServiceSummary (Prelude.Maybe HealthCheckConfig)
serviceSummary_healthCheckConfig :: Lens' ServiceSummary (Maybe HealthCheckConfig)
serviceSummary_healthCheckConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe HealthCheckConfig
healthCheckConfig :: Maybe HealthCheckConfig
$sel:healthCheckConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckConfig
healthCheckConfig} -> Maybe HealthCheckConfig
healthCheckConfig) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe HealthCheckConfig
a -> ServiceSummary
s {$sel:healthCheckConfig:ServiceSummary' :: Maybe HealthCheckConfig
healthCheckConfig = Maybe HealthCheckConfig
a} :: ServiceSummary)
serviceSummary_healthCheckCustomConfig :: Lens.Lens' ServiceSummary (Prelude.Maybe HealthCheckCustomConfig)
serviceSummary_healthCheckCustomConfig :: Lens' ServiceSummary (Maybe HealthCheckCustomConfig)
serviceSummary_healthCheckCustomConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe HealthCheckCustomConfig
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
$sel:healthCheckCustomConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig} -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe HealthCheckCustomConfig
a -> ServiceSummary
s {$sel:healthCheckCustomConfig:ServiceSummary' :: Maybe HealthCheckCustomConfig
healthCheckCustomConfig = Maybe HealthCheckCustomConfig
a} :: ServiceSummary)
serviceSummary_id :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_id :: Lens' ServiceSummary (Maybe Text)
serviceSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
id :: Maybe Text
$sel:id:ServiceSummary' :: ServiceSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:id:ServiceSummary' :: Maybe Text
id = Maybe Text
a} :: ServiceSummary)
serviceSummary_instanceCount :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Int)
serviceSummary_instanceCount :: Lens' ServiceSummary (Maybe Int)
serviceSummary_instanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Int
instanceCount :: Maybe Int
$sel:instanceCount:ServiceSummary' :: ServiceSummary -> Maybe Int
instanceCount} -> Maybe Int
instanceCount) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Int
a -> ServiceSummary
s {$sel:instanceCount:ServiceSummary' :: Maybe Int
instanceCount = Maybe Int
a} :: ServiceSummary)
serviceSummary_name :: Lens.Lens' ServiceSummary (Prelude.Maybe Prelude.Text)
serviceSummary_name :: Lens' ServiceSummary (Maybe Text)
serviceSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe Text
name :: Maybe Text
$sel:name:ServiceSummary' :: ServiceSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ServiceSummary
s@ServiceSummary' {} Maybe Text
a -> ServiceSummary
s {$sel:name:ServiceSummary' :: Maybe Text
name = Maybe Text
a} :: ServiceSummary)
serviceSummary_type :: Lens.Lens' ServiceSummary (Prelude.Maybe ServiceType)
serviceSummary_type :: Lens' ServiceSummary (Maybe ServiceType)
serviceSummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceSummary' {Maybe ServiceType
type' :: Maybe ServiceType
$sel:type':ServiceSummary' :: ServiceSummary -> Maybe ServiceType
type'} -> Maybe ServiceType
type') (\s :: ServiceSummary
s@ServiceSummary' {} Maybe ServiceType
a -> ServiceSummary
s {$sel:type':ServiceSummary' :: Maybe ServiceType
type' = Maybe ServiceType
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 Text
-> Maybe POSIX
-> Maybe Text
-> Maybe DnsConfig
-> Maybe HealthCheckConfig
-> Maybe HealthCheckCustomConfig
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ServiceType
-> 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
"Arn")
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
"CreateDate")
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
"DnsConfig")
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
"HealthCheckConfig")
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
"HealthCheckCustomConfig")
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
"Id")
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
"InstanceCount")
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
"Name")
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
"Type")
)
instance Prelude.Hashable ServiceSummary where
hashWithSalt :: Int -> ServiceSummary -> Int
hashWithSalt Int
_salt ServiceSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe HealthCheckCustomConfig
Maybe HealthCheckConfig
Maybe DnsConfig
Maybe ServiceType
type' :: Maybe ServiceType
name :: Maybe Text
instanceCount :: Maybe Int
id :: Maybe Text
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
healthCheckConfig :: Maybe HealthCheckConfig
dnsConfig :: Maybe DnsConfig
description :: Maybe Text
createDate :: Maybe POSIX
arn :: Maybe Text
$sel:type':ServiceSummary' :: ServiceSummary -> Maybe ServiceType
$sel:name:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:instanceCount:ServiceSummary' :: ServiceSummary -> Maybe Int
$sel:id:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:healthCheckCustomConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckCustomConfig
$sel:healthCheckConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckConfig
$sel:dnsConfig:ServiceSummary' :: ServiceSummary -> Maybe DnsConfig
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:createDate:ServiceSummary' :: ServiceSummary -> Maybe POSIX
$sel:arn:ServiceSummary' :: ServiceSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DnsConfig
dnsConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HealthCheckConfig
healthCheckConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HealthCheckCustomConfig
healthCheckCustomConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
instanceCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceType
type'
instance Prelude.NFData ServiceSummary where
rnf :: ServiceSummary -> ()
rnf ServiceSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe HealthCheckCustomConfig
Maybe HealthCheckConfig
Maybe DnsConfig
Maybe ServiceType
type' :: Maybe ServiceType
name :: Maybe Text
instanceCount :: Maybe Int
id :: Maybe Text
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
healthCheckConfig :: Maybe HealthCheckConfig
dnsConfig :: Maybe DnsConfig
description :: Maybe Text
createDate :: Maybe POSIX
arn :: Maybe Text
$sel:type':ServiceSummary' :: ServiceSummary -> Maybe ServiceType
$sel:name:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:instanceCount:ServiceSummary' :: ServiceSummary -> Maybe Int
$sel:id:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:healthCheckCustomConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckCustomConfig
$sel:healthCheckConfig:ServiceSummary' :: ServiceSummary -> Maybe HealthCheckConfig
$sel:dnsConfig:ServiceSummary' :: ServiceSummary -> Maybe DnsConfig
$sel:description:ServiceSummary' :: ServiceSummary -> Maybe Text
$sel:createDate:ServiceSummary' :: ServiceSummary -> Maybe POSIX
$sel:arn:ServiceSummary' :: ServiceSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createDate
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 DnsConfig
dnsConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HealthCheckConfig
healthCheckConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HealthCheckCustomConfig
healthCheckCustomConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
instanceCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceType
type'