{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Route53AutoNaming.Types.ServiceInfo
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Route53AutoNaming.Types.ServiceInfo 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

-- | A complex type that contains information about the specified service.
--
-- /See:/ 'newServiceInfo' smart constructor.
data ServiceInfo = ServiceInfo'
  { -- | The Amazon Resource Name (ARN) that Cloud Map assigns to the service
    -- when you create it.
    ServiceInfo -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the service was created, in Unix format and
    -- Coordinated Universal Time (UTC). The value of @CreateDate@ is accurate
    -- to milliseconds. For example, the value @1516925490.087@ represents
    -- Friday, January 26, 2018 12:11:30.087 AM.
    ServiceInfo -> Maybe POSIX
createDate :: Prelude.Maybe Data.POSIX,
    -- | A unique string that identifies the request and that allows failed
    -- requests to be retried without the risk of running the operation twice.
    -- @CreatorRequestId@ can be any unique string (for example, a
    -- date\/timestamp).
    ServiceInfo -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | The description of the service.
    ServiceInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A complex type that contains information about the Route 53 DNS records
    -- that you want Cloud Map to create when you register an instance.
    --
    -- The record types of a service can only be changed by deleting the
    -- service and recreating it with a new @Dnsconfig@.
    ServiceInfo -> Maybe DnsConfig
dnsConfig :: Prelude.Maybe DnsConfig,
    -- | /Public DNS and HTTP namespaces only./ A complex type that contains
    -- settings for an optional health check. If you specify settings for a
    -- health check, Cloud Map associates the health check with the records
    -- that you specify in @DnsConfig@.
    --
    -- For information about the charges for health checks, see
    -- <http://aws.amazon.com/route53/pricing/ Amazon Route 53 Pricing>.
    ServiceInfo -> Maybe HealthCheckConfig
healthCheckConfig :: Prelude.Maybe HealthCheckConfig,
    -- | A complex type that contains information about an optional custom health
    -- check.
    --
    -- If you specify a health check configuration, you can specify either
    -- @HealthCheckCustomConfig@ or @HealthCheckConfig@ but not both.
    ServiceInfo -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig :: Prelude.Maybe HealthCheckCustomConfig,
    -- | The ID that Cloud Map assigned to the service when you created it.
    ServiceInfo -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The number of instances that are currently associated with the service.
    -- Instances that were previously associated with the service but that are
    -- deleted aren\'t included in the count. The count might not reflect
    -- pending registrations and deregistrations.
    ServiceInfo -> Maybe Int
instanceCount :: Prelude.Maybe Prelude.Int,
    -- | The name of the service.
    ServiceInfo -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID of the namespace that was used to create the service.
    ServiceInfo -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
    -- | Describes the systems that can be used to discover the service
    -- instances.
    --
    -- [DNS_HTTP]
    --     The service instances can be discovered using either DNS queries or
    --     the @DiscoverInstances@ API operation.
    --
    -- [HTTP]
    --     The service instances can only be discovered using the
    --     @DiscoverInstances@ API operation.
    --
    -- [DNS]
    --     Reserved.
    ServiceInfo -> Maybe ServiceType
type' :: Prelude.Maybe ServiceType
  }
  deriving (ServiceInfo -> ServiceInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceInfo -> ServiceInfo -> Bool
$c/= :: ServiceInfo -> ServiceInfo -> Bool
== :: ServiceInfo -> ServiceInfo -> Bool
$c== :: ServiceInfo -> ServiceInfo -> Bool
Prelude.Eq, ReadPrec [ServiceInfo]
ReadPrec ServiceInfo
Int -> ReadS ServiceInfo
ReadS [ServiceInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceInfo]
$creadListPrec :: ReadPrec [ServiceInfo]
readPrec :: ReadPrec ServiceInfo
$creadPrec :: ReadPrec ServiceInfo
readList :: ReadS [ServiceInfo]
$creadList :: ReadS [ServiceInfo]
readsPrec :: Int -> ReadS ServiceInfo
$creadsPrec :: Int -> ReadS ServiceInfo
Prelude.Read, Int -> ServiceInfo -> ShowS
[ServiceInfo] -> ShowS
ServiceInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceInfo] -> ShowS
$cshowList :: [ServiceInfo] -> ShowS
show :: ServiceInfo -> String
$cshow :: ServiceInfo -> String
showsPrec :: Int -> ServiceInfo -> ShowS
$cshowsPrec :: Int -> ServiceInfo -> ShowS
Prelude.Show, forall x. Rep ServiceInfo x -> ServiceInfo
forall x. ServiceInfo -> Rep ServiceInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceInfo x -> ServiceInfo
$cfrom :: forall x. ServiceInfo -> Rep ServiceInfo x
Prelude.Generic)

-- |
-- Create a value of 'ServiceInfo' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'serviceInfo_arn' - The Amazon Resource Name (ARN) that Cloud Map assigns to the service
-- when you create it.
--
-- 'createDate', 'serviceInfo_createDate' - The date and time that the service was created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreateDate@ is accurate
-- to milliseconds. For example, the value @1516925490.087@ represents
-- Friday, January 26, 2018 12:11:30.087 AM.
--
-- 'creatorRequestId', 'serviceInfo_creatorRequestId' - A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running the operation twice.
-- @CreatorRequestId@ can be any unique string (for example, a
-- date\/timestamp).
--
-- 'description', 'serviceInfo_description' - The description of the service.
--
-- 'dnsConfig', 'serviceInfo_dnsConfig' - A complex type that contains information about the Route 53 DNS records
-- that you want Cloud Map to create when you register an instance.
--
-- The record types of a service can only be changed by deleting the
-- service and recreating it with a new @Dnsconfig@.
--
-- 'healthCheckConfig', 'serviceInfo_healthCheckConfig' - /Public DNS and HTTP namespaces only./ A complex type that contains
-- settings for an optional health check. If you specify settings for a
-- health check, Cloud Map associates the health check with the records
-- that you specify in @DnsConfig@.
--
-- For information about the charges for health checks, see
-- <http://aws.amazon.com/route53/pricing/ Amazon Route 53 Pricing>.
--
-- 'healthCheckCustomConfig', 'serviceInfo_healthCheckCustomConfig' - A complex type that contains information about an optional custom health
-- check.
--
-- If you specify a health check configuration, you can specify either
-- @HealthCheckCustomConfig@ or @HealthCheckConfig@ but not both.
--
-- 'id', 'serviceInfo_id' - The ID that Cloud Map assigned to the service when you created it.
--
-- 'instanceCount', 'serviceInfo_instanceCount' - The number of instances that are currently associated with the service.
-- Instances that were previously associated with the service but that are
-- deleted aren\'t included in the count. The count might not reflect
-- pending registrations and deregistrations.
--
-- 'name', 'serviceInfo_name' - The name of the service.
--
-- 'namespaceId', 'serviceInfo_namespaceId' - The ID of the namespace that was used to create the service.
--
-- 'type'', 'serviceInfo_type' - Describes the systems that can be used to discover the service
-- instances.
--
-- [DNS_HTTP]
--     The service instances can be discovered using either DNS queries or
--     the @DiscoverInstances@ API operation.
--
-- [HTTP]
--     The service instances can only be discovered using the
--     @DiscoverInstances@ API operation.
--
-- [DNS]
--     Reserved.
newServiceInfo ::
  ServiceInfo
newServiceInfo :: ServiceInfo
newServiceInfo =
  ServiceInfo'
    { $sel:arn:ServiceInfo' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:ServiceInfo' :: Maybe POSIX
createDate = forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:ServiceInfo' :: Maybe Text
creatorRequestId = forall a. Maybe a
Prelude.Nothing,
      $sel:description:ServiceInfo' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:dnsConfig:ServiceInfo' :: Maybe DnsConfig
dnsConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckConfig:ServiceInfo' :: Maybe HealthCheckConfig
healthCheckConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckCustomConfig:ServiceInfo' :: Maybe HealthCheckCustomConfig
healthCheckCustomConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:id:ServiceInfo' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceCount:ServiceInfo' :: Maybe Int
instanceCount = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ServiceInfo' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:namespaceId:ServiceInfo' :: Maybe Text
namespaceId = forall a. Maybe a
Prelude.Nothing,
      $sel:type':ServiceInfo' :: Maybe ServiceType
type' = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) that Cloud Map assigns to the service
-- when you create it.
serviceInfo_arn :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_arn :: Lens' ServiceInfo (Maybe Text)
serviceInfo_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
arn :: Maybe Text
$sel:arn:ServiceInfo' :: ServiceInfo -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:arn:ServiceInfo' :: Maybe Text
arn = Maybe Text
a} :: ServiceInfo)

-- | The date and time that the service was created, in Unix format and
-- Coordinated Universal Time (UTC). The value of @CreateDate@ is accurate
-- to milliseconds. For example, the value @1516925490.087@ represents
-- Friday, January 26, 2018 12:11:30.087 AM.
serviceInfo_createDate :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.UTCTime)
serviceInfo_createDate :: Lens' ServiceInfo (Maybe UTCTime)
serviceInfo_createDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:ServiceInfo' :: ServiceInfo -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe POSIX
a -> ServiceInfo
s {$sel:createDate:ServiceInfo' :: Maybe POSIX
createDate = Maybe POSIX
a} :: ServiceInfo) 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

-- | A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running the operation twice.
-- @CreatorRequestId@ can be any unique string (for example, a
-- date\/timestamp).
serviceInfo_creatorRequestId :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_creatorRequestId :: Lens' ServiceInfo (Maybe Text)
serviceInfo_creatorRequestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:ServiceInfo' :: ServiceInfo -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:creatorRequestId:ServiceInfo' :: Maybe Text
creatorRequestId = Maybe Text
a} :: ServiceInfo)

-- | The description of the service.
serviceInfo_description :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_description :: Lens' ServiceInfo (Maybe Text)
serviceInfo_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
description :: Maybe Text
$sel:description:ServiceInfo' :: ServiceInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:description:ServiceInfo' :: Maybe Text
description = Maybe Text
a} :: ServiceInfo)

-- | A complex type that contains information about the Route 53 DNS records
-- that you want Cloud Map to create when you register an instance.
--
-- The record types of a service can only be changed by deleting the
-- service and recreating it with a new @Dnsconfig@.
serviceInfo_dnsConfig :: Lens.Lens' ServiceInfo (Prelude.Maybe DnsConfig)
serviceInfo_dnsConfig :: Lens' ServiceInfo (Maybe DnsConfig)
serviceInfo_dnsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe DnsConfig
dnsConfig :: Maybe DnsConfig
$sel:dnsConfig:ServiceInfo' :: ServiceInfo -> Maybe DnsConfig
dnsConfig} -> Maybe DnsConfig
dnsConfig) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe DnsConfig
a -> ServiceInfo
s {$sel:dnsConfig:ServiceInfo' :: Maybe DnsConfig
dnsConfig = Maybe DnsConfig
a} :: ServiceInfo)

-- | /Public DNS and HTTP namespaces only./ A complex type that contains
-- settings for an optional health check. If you specify settings for a
-- health check, Cloud Map associates the health check with the records
-- that you specify in @DnsConfig@.
--
-- For information about the charges for health checks, see
-- <http://aws.amazon.com/route53/pricing/ Amazon Route 53 Pricing>.
serviceInfo_healthCheckConfig :: Lens.Lens' ServiceInfo (Prelude.Maybe HealthCheckConfig)
serviceInfo_healthCheckConfig :: Lens' ServiceInfo (Maybe HealthCheckConfig)
serviceInfo_healthCheckConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe HealthCheckConfig
healthCheckConfig :: Maybe HealthCheckConfig
$sel:healthCheckConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckConfig
healthCheckConfig} -> Maybe HealthCheckConfig
healthCheckConfig) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe HealthCheckConfig
a -> ServiceInfo
s {$sel:healthCheckConfig:ServiceInfo' :: Maybe HealthCheckConfig
healthCheckConfig = Maybe HealthCheckConfig
a} :: ServiceInfo)

-- | A complex type that contains information about an optional custom health
-- check.
--
-- If you specify a health check configuration, you can specify either
-- @HealthCheckCustomConfig@ or @HealthCheckConfig@ but not both.
serviceInfo_healthCheckCustomConfig :: Lens.Lens' ServiceInfo (Prelude.Maybe HealthCheckCustomConfig)
serviceInfo_healthCheckCustomConfig :: Lens' ServiceInfo (Maybe HealthCheckCustomConfig)
serviceInfo_healthCheckCustomConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe HealthCheckCustomConfig
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
$sel:healthCheckCustomConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig} -> Maybe HealthCheckCustomConfig
healthCheckCustomConfig) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe HealthCheckCustomConfig
a -> ServiceInfo
s {$sel:healthCheckCustomConfig:ServiceInfo' :: Maybe HealthCheckCustomConfig
healthCheckCustomConfig = Maybe HealthCheckCustomConfig
a} :: ServiceInfo)

-- | The ID that Cloud Map assigned to the service when you created it.
serviceInfo_id :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_id :: Lens' ServiceInfo (Maybe Text)
serviceInfo_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
id :: Maybe Text
$sel:id:ServiceInfo' :: ServiceInfo -> Maybe Text
id} -> Maybe Text
id) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:id:ServiceInfo' :: Maybe Text
id = Maybe Text
a} :: ServiceInfo)

-- | The number of instances that are currently associated with the service.
-- Instances that were previously associated with the service but that are
-- deleted aren\'t included in the count. The count might not reflect
-- pending registrations and deregistrations.
serviceInfo_instanceCount :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Int)
serviceInfo_instanceCount :: Lens' ServiceInfo (Maybe Int)
serviceInfo_instanceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Int
instanceCount :: Maybe Int
$sel:instanceCount:ServiceInfo' :: ServiceInfo -> Maybe Int
instanceCount} -> Maybe Int
instanceCount) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Int
a -> ServiceInfo
s {$sel:instanceCount:ServiceInfo' :: Maybe Int
instanceCount = Maybe Int
a} :: ServiceInfo)

-- | The name of the service.
serviceInfo_name :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_name :: Lens' ServiceInfo (Maybe Text)
serviceInfo_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
name :: Maybe Text
$sel:name:ServiceInfo' :: ServiceInfo -> Maybe Text
name} -> Maybe Text
name) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:name:ServiceInfo' :: Maybe Text
name = Maybe Text
a} :: ServiceInfo)

-- | The ID of the namespace that was used to create the service.
serviceInfo_namespaceId :: Lens.Lens' ServiceInfo (Prelude.Maybe Prelude.Text)
serviceInfo_namespaceId :: Lens' ServiceInfo (Maybe Text)
serviceInfo_namespaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:ServiceInfo' :: ServiceInfo -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: ServiceInfo
s@ServiceInfo' {} Maybe Text
a -> ServiceInfo
s {$sel:namespaceId:ServiceInfo' :: Maybe Text
namespaceId = Maybe Text
a} :: ServiceInfo)

-- | Describes the systems that can be used to discover the service
-- instances.
--
-- [DNS_HTTP]
--     The service instances can be discovered using either DNS queries or
--     the @DiscoverInstances@ API operation.
--
-- [HTTP]
--     The service instances can only be discovered using the
--     @DiscoverInstances@ API operation.
--
-- [DNS]
--     Reserved.
serviceInfo_type :: Lens.Lens' ServiceInfo (Prelude.Maybe ServiceType)
serviceInfo_type :: Lens' ServiceInfo (Maybe ServiceType)
serviceInfo_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceInfo' {Maybe ServiceType
type' :: Maybe ServiceType
$sel:type':ServiceInfo' :: ServiceInfo -> Maybe ServiceType
type'} -> Maybe ServiceType
type') (\s :: ServiceInfo
s@ServiceInfo' {} Maybe ServiceType
a -> ServiceInfo
s {$sel:type':ServiceInfo' :: Maybe ServiceType
type' = Maybe ServiceType
a} :: ServiceInfo)

instance Data.FromJSON ServiceInfo where
  parseJSON :: Value -> Parser ServiceInfo
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ServiceInfo"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe DnsConfig
-> Maybe HealthCheckConfig
-> Maybe HealthCheckCustomConfig
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ServiceType
-> ServiceInfo
ServiceInfo'
            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
"CreatorRequestId")
            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
"NamespaceId")
            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 ServiceInfo where
  hashWithSalt :: Int -> ServiceInfo -> Int
hashWithSalt Int
_salt ServiceInfo' {Maybe Int
Maybe Text
Maybe POSIX
Maybe HealthCheckCustomConfig
Maybe HealthCheckConfig
Maybe DnsConfig
Maybe ServiceType
type' :: Maybe ServiceType
namespaceId :: Maybe Text
name :: Maybe Text
instanceCount :: Maybe Int
id :: Maybe Text
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
healthCheckConfig :: Maybe HealthCheckConfig
dnsConfig :: Maybe DnsConfig
description :: Maybe Text
creatorRequestId :: Maybe Text
createDate :: Maybe POSIX
arn :: Maybe Text
$sel:type':ServiceInfo' :: ServiceInfo -> Maybe ServiceType
$sel:namespaceId:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:name:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:instanceCount:ServiceInfo' :: ServiceInfo -> Maybe Int
$sel:id:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:healthCheckCustomConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckCustomConfig
$sel:healthCheckConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckConfig
$sel:dnsConfig:ServiceInfo' :: ServiceInfo -> Maybe DnsConfig
$sel:description:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:creatorRequestId:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:createDate:ServiceInfo' :: ServiceInfo -> Maybe POSIX
$sel:arn:ServiceInfo' :: ServiceInfo -> 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
creatorRequestId
      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 Text
namespaceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceType
type'

instance Prelude.NFData ServiceInfo where
  rnf :: ServiceInfo -> ()
rnf ServiceInfo' {Maybe Int
Maybe Text
Maybe POSIX
Maybe HealthCheckCustomConfig
Maybe HealthCheckConfig
Maybe DnsConfig
Maybe ServiceType
type' :: Maybe ServiceType
namespaceId :: Maybe Text
name :: Maybe Text
instanceCount :: Maybe Int
id :: Maybe Text
healthCheckCustomConfig :: Maybe HealthCheckCustomConfig
healthCheckConfig :: Maybe HealthCheckConfig
dnsConfig :: Maybe DnsConfig
description :: Maybe Text
creatorRequestId :: Maybe Text
createDate :: Maybe POSIX
arn :: Maybe Text
$sel:type':ServiceInfo' :: ServiceInfo -> Maybe ServiceType
$sel:namespaceId:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:name:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:instanceCount:ServiceInfo' :: ServiceInfo -> Maybe Int
$sel:id:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:healthCheckCustomConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckCustomConfig
$sel:healthCheckConfig:ServiceInfo' :: ServiceInfo -> Maybe HealthCheckConfig
$sel:dnsConfig:ServiceInfo' :: ServiceInfo -> Maybe DnsConfig
$sel:description:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:creatorRequestId:ServiceInfo' :: ServiceInfo -> Maybe Text
$sel:createDate:ServiceInfo' :: ServiceInfo -> Maybe POSIX
$sel:arn:ServiceInfo' :: ServiceInfo -> 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
creatorRequestId
      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 Text
namespaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceType
type'