{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.CloudDirectory.CreateDirectory
-- 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)
--
-- Creates a Directory by copying the published schema into the directory.
-- A directory cannot be created without a schema.
--
-- You can also quickly create a directory using a managed schema, called
-- the @QuickStartSchema@. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/schemas_managed.html Managed Schema>
-- in the /Amazon Cloud Directory Developer Guide/.
module Amazonka.CloudDirectory.CreateDirectory
  ( -- * Creating a Request
    CreateDirectory (..),
    newCreateDirectory,

    -- * Request Lenses
    createDirectory_name,
    createDirectory_schemaArn,

    -- * Destructuring the Response
    CreateDirectoryResponse (..),
    newCreateDirectoryResponse,

    -- * Response Lenses
    createDirectoryResponse_httpStatus,
    createDirectoryResponse_directoryArn,
    createDirectoryResponse_name,
    createDirectoryResponse_objectIdentifier,
    createDirectoryResponse_appliedSchemaArn,
  )
where

import Amazonka.CloudDirectory.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateDirectory' smart constructor.
data CreateDirectory = CreateDirectory'
  { -- | The name of the Directory. Should be unique per account, per region.
    CreateDirectory -> Text
name :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the published schema that will be
    -- copied into the data Directory. For more information, see arns.
    CreateDirectory -> Text
schemaArn :: Prelude.Text
  }
  deriving (CreateDirectory -> CreateDirectory -> Bool
(CreateDirectory -> CreateDirectory -> Bool)
-> (CreateDirectory -> CreateDirectory -> Bool)
-> Eq CreateDirectory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDirectory -> CreateDirectory -> Bool
$c/= :: CreateDirectory -> CreateDirectory -> Bool
== :: CreateDirectory -> CreateDirectory -> Bool
$c== :: CreateDirectory -> CreateDirectory -> Bool
Prelude.Eq, ReadPrec [CreateDirectory]
ReadPrec CreateDirectory
Int -> ReadS CreateDirectory
ReadS [CreateDirectory]
(Int -> ReadS CreateDirectory)
-> ReadS [CreateDirectory]
-> ReadPrec CreateDirectory
-> ReadPrec [CreateDirectory]
-> Read CreateDirectory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDirectory]
$creadListPrec :: ReadPrec [CreateDirectory]
readPrec :: ReadPrec CreateDirectory
$creadPrec :: ReadPrec CreateDirectory
readList :: ReadS [CreateDirectory]
$creadList :: ReadS [CreateDirectory]
readsPrec :: Int -> ReadS CreateDirectory
$creadsPrec :: Int -> ReadS CreateDirectory
Prelude.Read, Int -> CreateDirectory -> ShowS
[CreateDirectory] -> ShowS
CreateDirectory -> String
(Int -> CreateDirectory -> ShowS)
-> (CreateDirectory -> String)
-> ([CreateDirectory] -> ShowS)
-> Show CreateDirectory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDirectory] -> ShowS
$cshowList :: [CreateDirectory] -> ShowS
show :: CreateDirectory -> String
$cshow :: CreateDirectory -> String
showsPrec :: Int -> CreateDirectory -> ShowS
$cshowsPrec :: Int -> CreateDirectory -> ShowS
Prelude.Show, (forall x. CreateDirectory -> Rep CreateDirectory x)
-> (forall x. Rep CreateDirectory x -> CreateDirectory)
-> Generic CreateDirectory
forall x. Rep CreateDirectory x -> CreateDirectory
forall x. CreateDirectory -> Rep CreateDirectory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDirectory x -> CreateDirectory
$cfrom :: forall x. CreateDirectory -> Rep CreateDirectory x
Prelude.Generic)

-- |
-- Create a value of 'CreateDirectory' 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:
--
-- 'name', 'createDirectory_name' - The name of the Directory. Should be unique per account, per region.
--
-- 'schemaArn', 'createDirectory_schemaArn' - The Amazon Resource Name (ARN) of the published schema that will be
-- copied into the data Directory. For more information, see arns.
newCreateDirectory ::
  -- | 'name'
  Prelude.Text ->
  -- | 'schemaArn'
  Prelude.Text ->
  CreateDirectory
newCreateDirectory :: Text -> Text -> CreateDirectory
newCreateDirectory Text
pName_ Text
pSchemaArn_ =
  CreateDirectory' :: Text -> Text -> CreateDirectory
CreateDirectory'
    { $sel:name:CreateDirectory' :: Text
name = Text
pName_,
      $sel:schemaArn:CreateDirectory' :: Text
schemaArn = Text
pSchemaArn_
    }

-- | The name of the Directory. Should be unique per account, per region.
createDirectory_name :: Lens.Lens' CreateDirectory Prelude.Text
createDirectory_name :: (Text -> f Text) -> CreateDirectory -> f CreateDirectory
createDirectory_name = (CreateDirectory -> Text)
-> (CreateDirectory -> Text -> CreateDirectory)
-> Lens CreateDirectory CreateDirectory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectory' {Text
name :: Text
$sel:name:CreateDirectory' :: CreateDirectory -> Text
name} -> Text
name) (\s :: CreateDirectory
s@CreateDirectory' {} Text
a -> CreateDirectory
s {$sel:name:CreateDirectory' :: Text
name = Text
a} :: CreateDirectory)

-- | The Amazon Resource Name (ARN) of the published schema that will be
-- copied into the data Directory. For more information, see arns.
createDirectory_schemaArn :: Lens.Lens' CreateDirectory Prelude.Text
createDirectory_schemaArn :: (Text -> f Text) -> CreateDirectory -> f CreateDirectory
createDirectory_schemaArn = (CreateDirectory -> Text)
-> (CreateDirectory -> Text -> CreateDirectory)
-> Lens CreateDirectory CreateDirectory Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectory' {Text
schemaArn :: Text
$sel:schemaArn:CreateDirectory' :: CreateDirectory -> Text
schemaArn} -> Text
schemaArn) (\s :: CreateDirectory
s@CreateDirectory' {} Text
a -> CreateDirectory
s {$sel:schemaArn:CreateDirectory' :: Text
schemaArn = Text
a} :: CreateDirectory)

instance Core.AWSRequest CreateDirectory where
  type
    AWSResponse CreateDirectory =
      CreateDirectoryResponse
  request :: CreateDirectory -> Request CreateDirectory
request = Service -> CreateDirectory -> Request CreateDirectory
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDirectory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDirectory)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateDirectory))
-> Logger
-> Service
-> Proxy CreateDirectory
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDirectory)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> Text -> Text -> Text -> Text -> CreateDirectoryResponse
CreateDirectoryResponse'
            (Int -> Text -> Text -> Text -> Text -> CreateDirectoryResponse)
-> Either String Int
-> Either
     String (Text -> Text -> Text -> Text -> CreateDirectoryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String (Text -> Text -> Text -> Text -> CreateDirectoryResponse)
-> Either String Text
-> Either String (Text -> Text -> Text -> CreateDirectoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DirectoryArn")
            Either String (Text -> Text -> Text -> CreateDirectoryResponse)
-> Either String Text
-> Either String (Text -> Text -> CreateDirectoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Name")
            Either String (Text -> Text -> CreateDirectoryResponse)
-> Either String Text
-> Either String (Text -> CreateDirectoryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ObjectIdentifier")
            Either String (Text -> CreateDirectoryResponse)
-> Either String Text -> Either String CreateDirectoryResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"AppliedSchemaArn")
      )

instance Prelude.Hashable CreateDirectory

instance Prelude.NFData CreateDirectory

instance Core.ToHeaders CreateDirectory where
  toHeaders :: CreateDirectory -> ResponseHeaders
toHeaders CreateDirectory' {Text
schemaArn :: Text
name :: Text
$sel:schemaArn:CreateDirectory' :: CreateDirectory -> Text
$sel:name:CreateDirectory' :: CreateDirectory -> Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [HeaderName
"x-amz-data-partition" HeaderName -> Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Text
schemaArn]

instance Core.ToJSON CreateDirectory where
  toJSON :: CreateDirectory -> Value
toJSON CreateDirectory' {Text
schemaArn :: Text
name :: Text
$sel:schemaArn:CreateDirectory' :: CreateDirectory -> Text
$sel:name:CreateDirectory' :: CreateDirectory -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
      )

instance Core.ToPath CreateDirectory where
  toPath :: CreateDirectory -> ByteString
toPath =
    ByteString -> CreateDirectory -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/amazonclouddirectory/2017-01-11/directory/create"

instance Core.ToQuery CreateDirectory where
  toQuery :: CreateDirectory -> QueryString
toQuery = QueryString -> CreateDirectory -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateDirectoryResponse' smart constructor.
data CreateDirectoryResponse = CreateDirectoryResponse'
  { -- | The response's http status code.
    CreateDirectoryResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ARN that is associated with the Directory. For more information, see
    -- arns.
    CreateDirectoryResponse -> Text
directoryArn :: Prelude.Text,
    -- | The name of the Directory.
    CreateDirectoryResponse -> Text
name :: Prelude.Text,
    -- | The root object node of the created directory.
    CreateDirectoryResponse -> Text
objectIdentifier :: Prelude.Text,
    -- | The ARN of the published schema in the Directory. Once a published
    -- schema is copied into the directory, it has its own ARN, which is
    -- referred to applied schema ARN. For more information, see arns.
    CreateDirectoryResponse -> Text
appliedSchemaArn :: Prelude.Text
  }
  deriving (CreateDirectoryResponse -> CreateDirectoryResponse -> Bool
(CreateDirectoryResponse -> CreateDirectoryResponse -> Bool)
-> (CreateDirectoryResponse -> CreateDirectoryResponse -> Bool)
-> Eq CreateDirectoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDirectoryResponse -> CreateDirectoryResponse -> Bool
$c/= :: CreateDirectoryResponse -> CreateDirectoryResponse -> Bool
== :: CreateDirectoryResponse -> CreateDirectoryResponse -> Bool
$c== :: CreateDirectoryResponse -> CreateDirectoryResponse -> Bool
Prelude.Eq, ReadPrec [CreateDirectoryResponse]
ReadPrec CreateDirectoryResponse
Int -> ReadS CreateDirectoryResponse
ReadS [CreateDirectoryResponse]
(Int -> ReadS CreateDirectoryResponse)
-> ReadS [CreateDirectoryResponse]
-> ReadPrec CreateDirectoryResponse
-> ReadPrec [CreateDirectoryResponse]
-> Read CreateDirectoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDirectoryResponse]
$creadListPrec :: ReadPrec [CreateDirectoryResponse]
readPrec :: ReadPrec CreateDirectoryResponse
$creadPrec :: ReadPrec CreateDirectoryResponse
readList :: ReadS [CreateDirectoryResponse]
$creadList :: ReadS [CreateDirectoryResponse]
readsPrec :: Int -> ReadS CreateDirectoryResponse
$creadsPrec :: Int -> ReadS CreateDirectoryResponse
Prelude.Read, Int -> CreateDirectoryResponse -> ShowS
[CreateDirectoryResponse] -> ShowS
CreateDirectoryResponse -> String
(Int -> CreateDirectoryResponse -> ShowS)
-> (CreateDirectoryResponse -> String)
-> ([CreateDirectoryResponse] -> ShowS)
-> Show CreateDirectoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDirectoryResponse] -> ShowS
$cshowList :: [CreateDirectoryResponse] -> ShowS
show :: CreateDirectoryResponse -> String
$cshow :: CreateDirectoryResponse -> String
showsPrec :: Int -> CreateDirectoryResponse -> ShowS
$cshowsPrec :: Int -> CreateDirectoryResponse -> ShowS
Prelude.Show, (forall x.
 CreateDirectoryResponse -> Rep CreateDirectoryResponse x)
-> (forall x.
    Rep CreateDirectoryResponse x -> CreateDirectoryResponse)
-> Generic CreateDirectoryResponse
forall x. Rep CreateDirectoryResponse x -> CreateDirectoryResponse
forall x. CreateDirectoryResponse -> Rep CreateDirectoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDirectoryResponse x -> CreateDirectoryResponse
$cfrom :: forall x. CreateDirectoryResponse -> Rep CreateDirectoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDirectoryResponse' 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:
--
-- 'httpStatus', 'createDirectoryResponse_httpStatus' - The response's http status code.
--
-- 'directoryArn', 'createDirectoryResponse_directoryArn' - The ARN that is associated with the Directory. For more information, see
-- arns.
--
-- 'name', 'createDirectoryResponse_name' - The name of the Directory.
--
-- 'objectIdentifier', 'createDirectoryResponse_objectIdentifier' - The root object node of the created directory.
--
-- 'appliedSchemaArn', 'createDirectoryResponse_appliedSchemaArn' - The ARN of the published schema in the Directory. Once a published
-- schema is copied into the directory, it has its own ARN, which is
-- referred to applied schema ARN. For more information, see arns.
newCreateDirectoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'directoryArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'objectIdentifier'
  Prelude.Text ->
  -- | 'appliedSchemaArn'
  Prelude.Text ->
  CreateDirectoryResponse
newCreateDirectoryResponse :: Int -> Text -> Text -> Text -> Text -> CreateDirectoryResponse
newCreateDirectoryResponse
  Int
pHttpStatus_
  Text
pDirectoryArn_
  Text
pName_
  Text
pObjectIdentifier_
  Text
pAppliedSchemaArn_ =
    CreateDirectoryResponse' :: Int -> Text -> Text -> Text -> Text -> CreateDirectoryResponse
CreateDirectoryResponse'
      { $sel:httpStatus:CreateDirectoryResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:directoryArn:CreateDirectoryResponse' :: Text
directoryArn = Text
pDirectoryArn_,
        $sel:name:CreateDirectoryResponse' :: Text
name = Text
pName_,
        $sel:objectIdentifier:CreateDirectoryResponse' :: Text
objectIdentifier = Text
pObjectIdentifier_,
        $sel:appliedSchemaArn:CreateDirectoryResponse' :: Text
appliedSchemaArn = Text
pAppliedSchemaArn_
      }

-- | The response's http status code.
createDirectoryResponse_httpStatus :: Lens.Lens' CreateDirectoryResponse Prelude.Int
createDirectoryResponse_httpStatus :: (Int -> f Int)
-> CreateDirectoryResponse -> f CreateDirectoryResponse
createDirectoryResponse_httpStatus = (CreateDirectoryResponse -> Int)
-> (CreateDirectoryResponse -> Int -> CreateDirectoryResponse)
-> Lens CreateDirectoryResponse CreateDirectoryResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDirectoryResponse' :: CreateDirectoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDirectoryResponse
s@CreateDirectoryResponse' {} Int
a -> CreateDirectoryResponse
s {$sel:httpStatus:CreateDirectoryResponse' :: Int
httpStatus = Int
a} :: CreateDirectoryResponse)

-- | The ARN that is associated with the Directory. For more information, see
-- arns.
createDirectoryResponse_directoryArn :: Lens.Lens' CreateDirectoryResponse Prelude.Text
createDirectoryResponse_directoryArn :: (Text -> f Text)
-> CreateDirectoryResponse -> f CreateDirectoryResponse
createDirectoryResponse_directoryArn = (CreateDirectoryResponse -> Text)
-> (CreateDirectoryResponse -> Text -> CreateDirectoryResponse)
-> Lens CreateDirectoryResponse CreateDirectoryResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectoryResponse' {Text
directoryArn :: Text
$sel:directoryArn:CreateDirectoryResponse' :: CreateDirectoryResponse -> Text
directoryArn} -> Text
directoryArn) (\s :: CreateDirectoryResponse
s@CreateDirectoryResponse' {} Text
a -> CreateDirectoryResponse
s {$sel:directoryArn:CreateDirectoryResponse' :: Text
directoryArn = Text
a} :: CreateDirectoryResponse)

-- | The name of the Directory.
createDirectoryResponse_name :: Lens.Lens' CreateDirectoryResponse Prelude.Text
createDirectoryResponse_name :: (Text -> f Text)
-> CreateDirectoryResponse -> f CreateDirectoryResponse
createDirectoryResponse_name = (CreateDirectoryResponse -> Text)
-> (CreateDirectoryResponse -> Text -> CreateDirectoryResponse)
-> Lens CreateDirectoryResponse CreateDirectoryResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectoryResponse' {Text
name :: Text
$sel:name:CreateDirectoryResponse' :: CreateDirectoryResponse -> Text
name} -> Text
name) (\s :: CreateDirectoryResponse
s@CreateDirectoryResponse' {} Text
a -> CreateDirectoryResponse
s {$sel:name:CreateDirectoryResponse' :: Text
name = Text
a} :: CreateDirectoryResponse)

-- | The root object node of the created directory.
createDirectoryResponse_objectIdentifier :: Lens.Lens' CreateDirectoryResponse Prelude.Text
createDirectoryResponse_objectIdentifier :: (Text -> f Text)
-> CreateDirectoryResponse -> f CreateDirectoryResponse
createDirectoryResponse_objectIdentifier = (CreateDirectoryResponse -> Text)
-> (CreateDirectoryResponse -> Text -> CreateDirectoryResponse)
-> Lens CreateDirectoryResponse CreateDirectoryResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectoryResponse' {Text
objectIdentifier :: Text
$sel:objectIdentifier:CreateDirectoryResponse' :: CreateDirectoryResponse -> Text
objectIdentifier} -> Text
objectIdentifier) (\s :: CreateDirectoryResponse
s@CreateDirectoryResponse' {} Text
a -> CreateDirectoryResponse
s {$sel:objectIdentifier:CreateDirectoryResponse' :: Text
objectIdentifier = Text
a} :: CreateDirectoryResponse)

-- | The ARN of the published schema in the Directory. Once a published
-- schema is copied into the directory, it has its own ARN, which is
-- referred to applied schema ARN. For more information, see arns.
createDirectoryResponse_appliedSchemaArn :: Lens.Lens' CreateDirectoryResponse Prelude.Text
createDirectoryResponse_appliedSchemaArn :: (Text -> f Text)
-> CreateDirectoryResponse -> f CreateDirectoryResponse
createDirectoryResponse_appliedSchemaArn = (CreateDirectoryResponse -> Text)
-> (CreateDirectoryResponse -> Text -> CreateDirectoryResponse)
-> Lens CreateDirectoryResponse CreateDirectoryResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDirectoryResponse' {Text
appliedSchemaArn :: Text
$sel:appliedSchemaArn:CreateDirectoryResponse' :: CreateDirectoryResponse -> Text
appliedSchemaArn} -> Text
appliedSchemaArn) (\s :: CreateDirectoryResponse
s@CreateDirectoryResponse' {} Text
a -> CreateDirectoryResponse
s {$sel:appliedSchemaArn:CreateDirectoryResponse' :: Text
appliedSchemaArn = Text
a} :: CreateDirectoryResponse)

instance Prelude.NFData CreateDirectoryResponse