{-# 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.Namespace
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Route53AutoNaming.Types.Namespace where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53AutoNaming.Types.NamespaceProperties
import Amazonka.Route53AutoNaming.Types.NamespaceType

-- | A complex type that contains information about a specified namespace.
--
-- /See:/ 'newNamespace' smart constructor.
data Namespace = Namespace'
  { -- | The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace
    -- when you create it.
    Namespace -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A unique string that identifies the request and that allows failed
    -- requests to be retried without the risk of running an operation twice.
    Namespace -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | The date that the namespace was created, in Unix date\/time 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.
    Namespace -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | The number of services that are associated with the namespace.
    Namespace -> Maybe Int
serviceCount :: Prelude.Maybe Prelude.Int,
    -- | The name of the namespace, such as @example.com@.
    Namespace -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID of a namespace.
    Namespace -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The type of the namespace. The methods for discovering instances depends
    -- on the value that you specify:
    --
    -- [HTTP]
    --     Instances can be discovered only programmatically, using the Cloud
    --     Map @DiscoverInstances@ API.
    --
    -- [DNS_PUBLIC]
    --     Instances can be discovered using public DNS queries and using the
    --     @DiscoverInstances@ API.
    --
    -- [DNS_PRIVATE]
    --     Instances can be discovered using DNS queries in VPCs and using the
    --     @DiscoverInstances@ API.
    Namespace -> Maybe NamespaceType
type' :: Prelude.Maybe NamespaceType,
    -- | The description that you specify for the namespace when you create it.
    Namespace -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A complex type that contains information that\'s specific to the type of
    -- the namespace.
    Namespace -> Maybe NamespaceProperties
properties :: Prelude.Maybe NamespaceProperties
  }
  deriving (Namespace -> Namespace -> Bool
(Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool) -> Eq Namespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Namespace -> Namespace -> Bool
$c/= :: Namespace -> Namespace -> Bool
== :: Namespace -> Namespace -> Bool
$c== :: Namespace -> Namespace -> Bool
Prelude.Eq, ReadPrec [Namespace]
ReadPrec Namespace
Int -> ReadS Namespace
ReadS [Namespace]
(Int -> ReadS Namespace)
-> ReadS [Namespace]
-> ReadPrec Namespace
-> ReadPrec [Namespace]
-> Read Namespace
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Namespace]
$creadListPrec :: ReadPrec [Namespace]
readPrec :: ReadPrec Namespace
$creadPrec :: ReadPrec Namespace
readList :: ReadS [Namespace]
$creadList :: ReadS [Namespace]
readsPrec :: Int -> ReadS Namespace
$creadsPrec :: Int -> ReadS Namespace
Prelude.Read, Int -> Namespace -> ShowS
[Namespace] -> ShowS
Namespace -> String
(Int -> Namespace -> ShowS)
-> (Namespace -> String)
-> ([Namespace] -> ShowS)
-> Show Namespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Namespace] -> ShowS
$cshowList :: [Namespace] -> ShowS
show :: Namespace -> String
$cshow :: Namespace -> String
showsPrec :: Int -> Namespace -> ShowS
$cshowsPrec :: Int -> Namespace -> ShowS
Prelude.Show, (forall x. Namespace -> Rep Namespace x)
-> (forall x. Rep Namespace x -> Namespace) -> Generic Namespace
forall x. Rep Namespace x -> Namespace
forall x. Namespace -> Rep Namespace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Namespace x -> Namespace
$cfrom :: forall x. Namespace -> Rep Namespace x
Prelude.Generic)

-- |
-- Create a value of 'Namespace' 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', 'namespace_arn' - The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace
-- when you create it.
--
-- 'creatorRequestId', 'namespace_creatorRequestId' - A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running an operation twice.
--
-- 'createDate', 'namespace_createDate' - The date that the namespace was created, in Unix date\/time 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.
--
-- 'serviceCount', 'namespace_serviceCount' - The number of services that are associated with the namespace.
--
-- 'name', 'namespace_name' - The name of the namespace, such as @example.com@.
--
-- 'id', 'namespace_id' - The ID of a namespace.
--
-- 'type'', 'namespace_type' - The type of the namespace. The methods for discovering instances depends
-- on the value that you specify:
--
-- [HTTP]
--     Instances can be discovered only programmatically, using the Cloud
--     Map @DiscoverInstances@ API.
--
-- [DNS_PUBLIC]
--     Instances can be discovered using public DNS queries and using the
--     @DiscoverInstances@ API.
--
-- [DNS_PRIVATE]
--     Instances can be discovered using DNS queries in VPCs and using the
--     @DiscoverInstances@ API.
--
-- 'description', 'namespace_description' - The description that you specify for the namespace when you create it.
--
-- 'properties', 'namespace_properties' - A complex type that contains information that\'s specific to the type of
-- the namespace.
newNamespace ::
  Namespace
newNamespace :: Namespace
newNamespace =
  Namespace' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> Namespace
Namespace'
    { $sel:arn:Namespace' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:Namespace' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:Namespace' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceCount:Namespace' :: Maybe Int
serviceCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Namespace' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Namespace' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Namespace' :: Maybe NamespaceType
type' = Maybe NamespaceType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Namespace' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:properties:Namespace' :: Maybe NamespaceProperties
properties = Maybe NamespaceProperties
forall a. Maybe a
Prelude.Nothing
    }

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

-- | A unique string that identifies the request and that allows failed
-- requests to be retried without the risk of running an operation twice.
namespace_creatorRequestId :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)
namespace_creatorRequestId :: (Maybe Text -> f (Maybe Text)) -> Namespace -> f Namespace
namespace_creatorRequestId = (Namespace -> Maybe Text)
-> (Namespace -> Maybe Text -> Namespace)
-> Lens Namespace Namespace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:Namespace' :: Namespace -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: Namespace
s@Namespace' {} Maybe Text
a -> Namespace
s {$sel:creatorRequestId:Namespace' :: Maybe Text
creatorRequestId = Maybe Text
a} :: Namespace)

-- | The date that the namespace was created, in Unix date\/time 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.
namespace_createDate :: Lens.Lens' Namespace (Prelude.Maybe Prelude.UTCTime)
namespace_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Namespace -> f Namespace
namespace_createDate = (Namespace -> Maybe POSIX)
-> (Namespace -> Maybe POSIX -> Namespace)
-> Lens Namespace Namespace (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:Namespace' :: Namespace -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Namespace
s@Namespace' {} Maybe POSIX
a -> Namespace
s {$sel:createDate:Namespace' :: Maybe POSIX
createDate = Maybe POSIX
a} :: Namespace) ((Maybe POSIX -> f (Maybe POSIX)) -> Namespace -> f Namespace)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Namespace
-> f Namespace
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

-- | The number of services that are associated with the namespace.
namespace_serviceCount :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Int)
namespace_serviceCount :: (Maybe Int -> f (Maybe Int)) -> Namespace -> f Namespace
namespace_serviceCount = (Namespace -> Maybe Int)
-> (Namespace -> Maybe Int -> Namespace)
-> Lens Namespace Namespace (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe Int
serviceCount :: Maybe Int
$sel:serviceCount:Namespace' :: Namespace -> Maybe Int
serviceCount} -> Maybe Int
serviceCount) (\s :: Namespace
s@Namespace' {} Maybe Int
a -> Namespace
s {$sel:serviceCount:Namespace' :: Maybe Int
serviceCount = Maybe Int
a} :: Namespace)

-- | The name of the namespace, such as @example.com@.
namespace_name :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)
namespace_name :: (Maybe Text -> f (Maybe Text)) -> Namespace -> f Namespace
namespace_name = (Namespace -> Maybe Text)
-> (Namespace -> Maybe Text -> Namespace)
-> Lens Namespace Namespace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe Text
name :: Maybe Text
$sel:name:Namespace' :: Namespace -> Maybe Text
name} -> Maybe Text
name) (\s :: Namespace
s@Namespace' {} Maybe Text
a -> Namespace
s {$sel:name:Namespace' :: Maybe Text
name = Maybe Text
a} :: Namespace)

-- | The ID of a namespace.
namespace_id :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)
namespace_id :: (Maybe Text -> f (Maybe Text)) -> Namespace -> f Namespace
namespace_id = (Namespace -> Maybe Text)
-> (Namespace -> Maybe Text -> Namespace)
-> Lens Namespace Namespace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe Text
id :: Maybe Text
$sel:id:Namespace' :: Namespace -> Maybe Text
id} -> Maybe Text
id) (\s :: Namespace
s@Namespace' {} Maybe Text
a -> Namespace
s {$sel:id:Namespace' :: Maybe Text
id = Maybe Text
a} :: Namespace)

-- | The type of the namespace. The methods for discovering instances depends
-- on the value that you specify:
--
-- [HTTP]
--     Instances can be discovered only programmatically, using the Cloud
--     Map @DiscoverInstances@ API.
--
-- [DNS_PUBLIC]
--     Instances can be discovered using public DNS queries and using the
--     @DiscoverInstances@ API.
--
-- [DNS_PRIVATE]
--     Instances can be discovered using DNS queries in VPCs and using the
--     @DiscoverInstances@ API.
namespace_type :: Lens.Lens' Namespace (Prelude.Maybe NamespaceType)
namespace_type :: (Maybe NamespaceType -> f (Maybe NamespaceType))
-> Namespace -> f Namespace
namespace_type = (Namespace -> Maybe NamespaceType)
-> (Namespace -> Maybe NamespaceType -> Namespace)
-> Lens
     Namespace Namespace (Maybe NamespaceType) (Maybe NamespaceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe NamespaceType
type' :: Maybe NamespaceType
$sel:type':Namespace' :: Namespace -> Maybe NamespaceType
type'} -> Maybe NamespaceType
type') (\s :: Namespace
s@Namespace' {} Maybe NamespaceType
a -> Namespace
s {$sel:type':Namespace' :: Maybe NamespaceType
type' = Maybe NamespaceType
a} :: Namespace)

-- | The description that you specify for the namespace when you create it.
namespace_description :: Lens.Lens' Namespace (Prelude.Maybe Prelude.Text)
namespace_description :: (Maybe Text -> f (Maybe Text)) -> Namespace -> f Namespace
namespace_description = (Namespace -> Maybe Text)
-> (Namespace -> Maybe Text -> Namespace)
-> Lens Namespace Namespace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe Text
description :: Maybe Text
$sel:description:Namespace' :: Namespace -> Maybe Text
description} -> Maybe Text
description) (\s :: Namespace
s@Namespace' {} Maybe Text
a -> Namespace
s {$sel:description:Namespace' :: Maybe Text
description = Maybe Text
a} :: Namespace)

-- | A complex type that contains information that\'s specific to the type of
-- the namespace.
namespace_properties :: Lens.Lens' Namespace (Prelude.Maybe NamespaceProperties)
namespace_properties :: (Maybe NamespaceProperties -> f (Maybe NamespaceProperties))
-> Namespace -> f Namespace
namespace_properties = (Namespace -> Maybe NamespaceProperties)
-> (Namespace -> Maybe NamespaceProperties -> Namespace)
-> Lens
     Namespace
     Namespace
     (Maybe NamespaceProperties)
     (Maybe NamespaceProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Namespace' {Maybe NamespaceProperties
properties :: Maybe NamespaceProperties
$sel:properties:Namespace' :: Namespace -> Maybe NamespaceProperties
properties} -> Maybe NamespaceProperties
properties) (\s :: Namespace
s@Namespace' {} Maybe NamespaceProperties
a -> Namespace
s {$sel:properties:Namespace' :: Maybe NamespaceProperties
properties = Maybe NamespaceProperties
a} :: Namespace)

instance Core.FromJSON Namespace where
  parseJSON :: Value -> Parser Namespace
parseJSON =
    String -> (Object -> Parser Namespace) -> Value -> Parser Namespace
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Namespace"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe NamespaceType
-> Maybe Text
-> Maybe NamespaceProperties
-> Namespace
Namespace'
            (Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe NamespaceType
 -> Maybe Text
 -> Maybe NamespaceProperties
 -> Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe NamespaceType
      -> Maybe Text
      -> Maybe NamespaceProperties
      -> Namespace)
forall (f :: * -> *) a b. Functor 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
"Arn")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe NamespaceType
   -> Maybe Text
   -> Maybe NamespaceProperties
   -> Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe NamespaceType
      -> Maybe Text
      -> Maybe NamespaceProperties
      -> Namespace)
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
"CreatorRequestId")
            Parser
  (Maybe POSIX
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe NamespaceType
   -> Maybe Text
   -> Maybe NamespaceProperties
   -> Namespace)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe NamespaceType
      -> Maybe Text
      -> Maybe NamespaceProperties
      -> Namespace)
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
"CreateDate")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe NamespaceType
   -> Maybe Text
   -> Maybe NamespaceProperties
   -> Namespace)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe NamespaceType
      -> Maybe Text
      -> Maybe NamespaceProperties
      -> Namespace)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceCount")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe NamespaceType
   -> Maybe Text
   -> Maybe NamespaceProperties
   -> Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe NamespaceType
      -> Maybe Text
      -> Maybe NamespaceProperties
      -> Namespace)
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
"Name")
            Parser
  (Maybe Text
   -> Maybe NamespaceType
   -> Maybe Text
   -> Maybe NamespaceProperties
   -> Namespace)
-> Parser (Maybe Text)
-> Parser
     (Maybe NamespaceType
      -> Maybe Text -> Maybe NamespaceProperties -> Namespace)
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
"Id")
            Parser
  (Maybe NamespaceType
   -> Maybe Text -> Maybe NamespaceProperties -> Namespace)
-> Parser (Maybe NamespaceType)
-> Parser (Maybe Text -> Maybe NamespaceProperties -> Namespace)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser (Maybe Text -> Maybe NamespaceProperties -> Namespace)
-> Parser (Maybe Text)
-> Parser (Maybe NamespaceProperties -> Namespace)
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
"Description")
            Parser (Maybe NamespaceProperties -> Namespace)
-> Parser (Maybe NamespaceProperties) -> Parser Namespace
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NamespaceProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Properties")
      )

instance Prelude.Hashable Namespace

instance Prelude.NFData Namespace