{-# 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.Glue.CreateRegistry
-- 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 new registry which may be used to hold a collection of
-- schemas.
module Amazonka.Glue.CreateRegistry
  ( -- * Creating a Request
    CreateRegistry (..),
    newCreateRegistry,

    -- * Request Lenses
    createRegistry_description,
    createRegistry_tags,
    createRegistry_registryName,

    -- * Destructuring the Response
    CreateRegistryResponse (..),
    newCreateRegistryResponse,

    -- * Response Lenses
    createRegistryResponse_registryName,
    createRegistryResponse_registryArn,
    createRegistryResponse_description,
    createRegistryResponse_tags,
    createRegistryResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
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:/ 'newCreateRegistry' smart constructor.
data CreateRegistry = CreateRegistry'
  { -- | A description of the registry. If description is not provided, there
    -- will not be any default value for this.
    CreateRegistry -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Amazon Web Services tags that contain a key value pair and may be
    -- searched by console, command line, or API.
    CreateRegistry -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Name of the registry to be created of max length of 255, and may only
    -- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
    -- No whitespace.
    CreateRegistry -> Text
registryName :: Prelude.Text
  }
  deriving (CreateRegistry -> CreateRegistry -> Bool
(CreateRegistry -> CreateRegistry -> Bool)
-> (CreateRegistry -> CreateRegistry -> Bool) -> Eq CreateRegistry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRegistry -> CreateRegistry -> Bool
$c/= :: CreateRegistry -> CreateRegistry -> Bool
== :: CreateRegistry -> CreateRegistry -> Bool
$c== :: CreateRegistry -> CreateRegistry -> Bool
Prelude.Eq, ReadPrec [CreateRegistry]
ReadPrec CreateRegistry
Int -> ReadS CreateRegistry
ReadS [CreateRegistry]
(Int -> ReadS CreateRegistry)
-> ReadS [CreateRegistry]
-> ReadPrec CreateRegistry
-> ReadPrec [CreateRegistry]
-> Read CreateRegistry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRegistry]
$creadListPrec :: ReadPrec [CreateRegistry]
readPrec :: ReadPrec CreateRegistry
$creadPrec :: ReadPrec CreateRegistry
readList :: ReadS [CreateRegistry]
$creadList :: ReadS [CreateRegistry]
readsPrec :: Int -> ReadS CreateRegistry
$creadsPrec :: Int -> ReadS CreateRegistry
Prelude.Read, Int -> CreateRegistry -> ShowS
[CreateRegistry] -> ShowS
CreateRegistry -> String
(Int -> CreateRegistry -> ShowS)
-> (CreateRegistry -> String)
-> ([CreateRegistry] -> ShowS)
-> Show CreateRegistry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRegistry] -> ShowS
$cshowList :: [CreateRegistry] -> ShowS
show :: CreateRegistry -> String
$cshow :: CreateRegistry -> String
showsPrec :: Int -> CreateRegistry -> ShowS
$cshowsPrec :: Int -> CreateRegistry -> ShowS
Prelude.Show, (forall x. CreateRegistry -> Rep CreateRegistry x)
-> (forall x. Rep CreateRegistry x -> CreateRegistry)
-> Generic CreateRegistry
forall x. Rep CreateRegistry x -> CreateRegistry
forall x. CreateRegistry -> Rep CreateRegistry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRegistry x -> CreateRegistry
$cfrom :: forall x. CreateRegistry -> Rep CreateRegistry x
Prelude.Generic)

-- |
-- Create a value of 'CreateRegistry' 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:
--
-- 'description', 'createRegistry_description' - A description of the registry. If description is not provided, there
-- will not be any default value for this.
--
-- 'tags', 'createRegistry_tags' - Amazon Web Services tags that contain a key value pair and may be
-- searched by console, command line, or API.
--
-- 'registryName', 'createRegistry_registryName' - Name of the registry to be created of max length of 255, and may only
-- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
-- No whitespace.
newCreateRegistry ::
  -- | 'registryName'
  Prelude.Text ->
  CreateRegistry
newCreateRegistry :: Text -> CreateRegistry
newCreateRegistry Text
pRegistryName_ =
  CreateRegistry' :: Maybe Text -> Maybe (HashMap Text Text) -> Text -> CreateRegistry
CreateRegistry'
    { $sel:description:CreateRegistry' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRegistry' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:registryName:CreateRegistry' :: Text
registryName = Text
pRegistryName_
    }

-- | A description of the registry. If description is not provided, there
-- will not be any default value for this.
createRegistry_description :: Lens.Lens' CreateRegistry (Prelude.Maybe Prelude.Text)
createRegistry_description :: (Maybe Text -> f (Maybe Text))
-> CreateRegistry -> f CreateRegistry
createRegistry_description = (CreateRegistry -> Maybe Text)
-> (CreateRegistry -> Maybe Text -> CreateRegistry)
-> Lens CreateRegistry CreateRegistry (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistry' {Maybe Text
description :: Maybe Text
$sel:description:CreateRegistry' :: CreateRegistry -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateRegistry
s@CreateRegistry' {} Maybe Text
a -> CreateRegistry
s {$sel:description:CreateRegistry' :: Maybe Text
description = Maybe Text
a} :: CreateRegistry)

-- | Amazon Web Services tags that contain a key value pair and may be
-- searched by console, command line, or API.
createRegistry_tags :: Lens.Lens' CreateRegistry (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRegistry_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRegistry -> f CreateRegistry
createRegistry_tags = (CreateRegistry -> Maybe (HashMap Text Text))
-> (CreateRegistry -> Maybe (HashMap Text Text) -> CreateRegistry)
-> Lens
     CreateRegistry
     CreateRegistry
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistry' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRegistry' :: CreateRegistry -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRegistry
s@CreateRegistry' {} Maybe (HashMap Text Text)
a -> CreateRegistry
s {$sel:tags:CreateRegistry' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRegistry) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRegistry -> f CreateRegistry)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRegistry
-> f CreateRegistry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Name of the registry to be created of max length of 255, and may only
-- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
-- No whitespace.
createRegistry_registryName :: Lens.Lens' CreateRegistry Prelude.Text
createRegistry_registryName :: (Text -> f Text) -> CreateRegistry -> f CreateRegistry
createRegistry_registryName = (CreateRegistry -> Text)
-> (CreateRegistry -> Text -> CreateRegistry)
-> Lens CreateRegistry CreateRegistry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistry' {Text
registryName :: Text
$sel:registryName:CreateRegistry' :: CreateRegistry -> Text
registryName} -> Text
registryName) (\s :: CreateRegistry
s@CreateRegistry' {} Text
a -> CreateRegistry
s {$sel:registryName:CreateRegistry' :: Text
registryName = Text
a} :: CreateRegistry)

instance Core.AWSRequest CreateRegistry where
  type
    AWSResponse CreateRegistry =
      CreateRegistryResponse
  request :: CreateRegistry -> Request CreateRegistry
request = Service -> CreateRegistry -> Request CreateRegistry
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateRegistry
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRegistry)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateRegistry))
-> Logger
-> Service
-> Proxy CreateRegistry
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRegistry)))
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 ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRegistryResponse
CreateRegistryResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateRegistryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRegistryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegistryName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRegistryResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> CreateRegistryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegistryArn")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> CreateRegistryResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateRegistryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either
  String (Maybe (HashMap Text Text) -> Int -> CreateRegistryResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateRegistryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateRegistryResponse)
-> Either String Int -> Either String CreateRegistryResponse
forall (f :: * -> *) a b. Applicative f => 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))
      )

instance Prelude.Hashable CreateRegistry

instance Prelude.NFData CreateRegistry

instance Core.ToHeaders CreateRegistry where
  toHeaders :: CreateRegistry -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRegistry -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.CreateRegistry" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateRegistry where
  toJSON :: CreateRegistry -> Value
toJSON CreateRegistry' {Maybe Text
Maybe (HashMap Text Text)
Text
registryName :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:registryName:CreateRegistry' :: CreateRegistry -> Text
$sel:tags:CreateRegistry' :: CreateRegistry -> Maybe (HashMap Text Text)
$sel:description:CreateRegistry' :: CreateRegistry -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RegistryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
registryName)
          ]
      )

instance Core.ToPath CreateRegistry where
  toPath :: CreateRegistry -> ByteString
toPath = ByteString -> CreateRegistry -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newCreateRegistryResponse' smart constructor.
data CreateRegistryResponse = CreateRegistryResponse'
  { -- | The name of the registry.
    CreateRegistryResponse -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the newly created registry.
    CreateRegistryResponse -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
    -- | A description of the registry.
    CreateRegistryResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags for the registry.
    CreateRegistryResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateRegistryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRegistryResponse -> CreateRegistryResponse -> Bool
(CreateRegistryResponse -> CreateRegistryResponse -> Bool)
-> (CreateRegistryResponse -> CreateRegistryResponse -> Bool)
-> Eq CreateRegistryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRegistryResponse -> CreateRegistryResponse -> Bool
$c/= :: CreateRegistryResponse -> CreateRegistryResponse -> Bool
== :: CreateRegistryResponse -> CreateRegistryResponse -> Bool
$c== :: CreateRegistryResponse -> CreateRegistryResponse -> Bool
Prelude.Eq, ReadPrec [CreateRegistryResponse]
ReadPrec CreateRegistryResponse
Int -> ReadS CreateRegistryResponse
ReadS [CreateRegistryResponse]
(Int -> ReadS CreateRegistryResponse)
-> ReadS [CreateRegistryResponse]
-> ReadPrec CreateRegistryResponse
-> ReadPrec [CreateRegistryResponse]
-> Read CreateRegistryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRegistryResponse]
$creadListPrec :: ReadPrec [CreateRegistryResponse]
readPrec :: ReadPrec CreateRegistryResponse
$creadPrec :: ReadPrec CreateRegistryResponse
readList :: ReadS [CreateRegistryResponse]
$creadList :: ReadS [CreateRegistryResponse]
readsPrec :: Int -> ReadS CreateRegistryResponse
$creadsPrec :: Int -> ReadS CreateRegistryResponse
Prelude.Read, Int -> CreateRegistryResponse -> ShowS
[CreateRegistryResponse] -> ShowS
CreateRegistryResponse -> String
(Int -> CreateRegistryResponse -> ShowS)
-> (CreateRegistryResponse -> String)
-> ([CreateRegistryResponse] -> ShowS)
-> Show CreateRegistryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRegistryResponse] -> ShowS
$cshowList :: [CreateRegistryResponse] -> ShowS
show :: CreateRegistryResponse -> String
$cshow :: CreateRegistryResponse -> String
showsPrec :: Int -> CreateRegistryResponse -> ShowS
$cshowsPrec :: Int -> CreateRegistryResponse -> ShowS
Prelude.Show, (forall x. CreateRegistryResponse -> Rep CreateRegistryResponse x)
-> (forall x.
    Rep CreateRegistryResponse x -> CreateRegistryResponse)
-> Generic CreateRegistryResponse
forall x. Rep CreateRegistryResponse x -> CreateRegistryResponse
forall x. CreateRegistryResponse -> Rep CreateRegistryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRegistryResponse x -> CreateRegistryResponse
$cfrom :: forall x. CreateRegistryResponse -> Rep CreateRegistryResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRegistryResponse' 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:
--
-- 'registryName', 'createRegistryResponse_registryName' - The name of the registry.
--
-- 'registryArn', 'createRegistryResponse_registryArn' - The Amazon Resource Name (ARN) of the newly created registry.
--
-- 'description', 'createRegistryResponse_description' - A description of the registry.
--
-- 'tags', 'createRegistryResponse_tags' - The tags for the registry.
--
-- 'httpStatus', 'createRegistryResponse_httpStatus' - The response's http status code.
newCreateRegistryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRegistryResponse
newCreateRegistryResponse :: Int -> CreateRegistryResponse
newCreateRegistryResponse Int
pHttpStatus_ =
  CreateRegistryResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRegistryResponse
CreateRegistryResponse'
    { $sel:registryName:CreateRegistryResponse' :: Maybe Text
registryName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:registryArn:CreateRegistryResponse' :: Maybe Text
registryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateRegistryResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRegistryResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRegistryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the registry.
createRegistryResponse_registryName :: Lens.Lens' CreateRegistryResponse (Prelude.Maybe Prelude.Text)
createRegistryResponse_registryName :: (Maybe Text -> f (Maybe Text))
-> CreateRegistryResponse -> f CreateRegistryResponse
createRegistryResponse_registryName = (CreateRegistryResponse -> Maybe Text)
-> (CreateRegistryResponse -> Maybe Text -> CreateRegistryResponse)
-> Lens
     CreateRegistryResponse
     CreateRegistryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistryResponse' {Maybe Text
registryName :: Maybe Text
$sel:registryName:CreateRegistryResponse' :: CreateRegistryResponse -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: CreateRegistryResponse
s@CreateRegistryResponse' {} Maybe Text
a -> CreateRegistryResponse
s {$sel:registryName:CreateRegistryResponse' :: Maybe Text
registryName = Maybe Text
a} :: CreateRegistryResponse)

-- | The Amazon Resource Name (ARN) of the newly created registry.
createRegistryResponse_registryArn :: Lens.Lens' CreateRegistryResponse (Prelude.Maybe Prelude.Text)
createRegistryResponse_registryArn :: (Maybe Text -> f (Maybe Text))
-> CreateRegistryResponse -> f CreateRegistryResponse
createRegistryResponse_registryArn = (CreateRegistryResponse -> Maybe Text)
-> (CreateRegistryResponse -> Maybe Text -> CreateRegistryResponse)
-> Lens
     CreateRegistryResponse
     CreateRegistryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistryResponse' {Maybe Text
registryArn :: Maybe Text
$sel:registryArn:CreateRegistryResponse' :: CreateRegistryResponse -> Maybe Text
registryArn} -> Maybe Text
registryArn) (\s :: CreateRegistryResponse
s@CreateRegistryResponse' {} Maybe Text
a -> CreateRegistryResponse
s {$sel:registryArn:CreateRegistryResponse' :: Maybe Text
registryArn = Maybe Text
a} :: CreateRegistryResponse)

-- | A description of the registry.
createRegistryResponse_description :: Lens.Lens' CreateRegistryResponse (Prelude.Maybe Prelude.Text)
createRegistryResponse_description :: (Maybe Text -> f (Maybe Text))
-> CreateRegistryResponse -> f CreateRegistryResponse
createRegistryResponse_description = (CreateRegistryResponse -> Maybe Text)
-> (CreateRegistryResponse -> Maybe Text -> CreateRegistryResponse)
-> Lens
     CreateRegistryResponse
     CreateRegistryResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistryResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateRegistryResponse' :: CreateRegistryResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateRegistryResponse
s@CreateRegistryResponse' {} Maybe Text
a -> CreateRegistryResponse
s {$sel:description:CreateRegistryResponse' :: Maybe Text
description = Maybe Text
a} :: CreateRegistryResponse)

-- | The tags for the registry.
createRegistryResponse_tags :: Lens.Lens' CreateRegistryResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRegistryResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRegistryResponse -> f CreateRegistryResponse
createRegistryResponse_tags = (CreateRegistryResponse -> Maybe (HashMap Text Text))
-> (CreateRegistryResponse
    -> Maybe (HashMap Text Text) -> CreateRegistryResponse)
-> Lens
     CreateRegistryResponse
     CreateRegistryResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRegistryResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRegistryResponse' :: CreateRegistryResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRegistryResponse
s@CreateRegistryResponse' {} Maybe (HashMap Text Text)
a -> CreateRegistryResponse
s {$sel:tags:CreateRegistryResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRegistryResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRegistryResponse -> f CreateRegistryResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRegistryResponse
-> f CreateRegistryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreateRegistryResponse