{-# 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.SageMaker.CreateCodeRepository
-- 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 Git repository as a resource in your Amazon SageMaker account.
-- You can associate the repository with notebook instances so that you can
-- use Git source control for the notebooks you create. The Git repository
-- is a resource in your Amazon SageMaker account, so it can be associated
-- with more than one notebook instance, and it persists independently from
-- the lifecycle of any notebook instances it is associated with.
--
-- The repository can be hosted either in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository.
module Amazonka.SageMaker.CreateCodeRepository
  ( -- * Creating a Request
    CreateCodeRepository (..),
    newCreateCodeRepository,

    -- * Request Lenses
    createCodeRepository_tags,
    createCodeRepository_codeRepositoryName,
    createCodeRepository_gitConfig,

    -- * Destructuring the Response
    CreateCodeRepositoryResponse (..),
    newCreateCodeRepositoryResponse,

    -- * Response Lenses
    createCodeRepositoryResponse_httpStatus,
    createCodeRepositoryResponse_codeRepositoryArn,
  )
where

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
import Amazonka.SageMaker.Types

-- | /See:/ 'newCreateCodeRepository' smart constructor.
data CreateCodeRepository = CreateCodeRepository'
  { -- | An array of key-value pairs. You can use tags to categorize your Amazon
    -- Web Services resources in different ways, for example, by purpose,
    -- owner, or environment. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>.
    CreateCodeRepository -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the Git repository. The name must have 1 to 63 characters.
    -- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
    CreateCodeRepository -> Text
codeRepositoryName :: Prelude.Text,
    -- | Specifies details about the repository, including the URL where the
    -- repository is located, the default branch, and credentials to use to
    -- access the repository.
    CreateCodeRepository -> GitConfig
gitConfig :: GitConfig
  }
  deriving (CreateCodeRepository -> CreateCodeRepository -> Bool
(CreateCodeRepository -> CreateCodeRepository -> Bool)
-> (CreateCodeRepository -> CreateCodeRepository -> Bool)
-> Eq CreateCodeRepository
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCodeRepository -> CreateCodeRepository -> Bool
$c/= :: CreateCodeRepository -> CreateCodeRepository -> Bool
== :: CreateCodeRepository -> CreateCodeRepository -> Bool
$c== :: CreateCodeRepository -> CreateCodeRepository -> Bool
Prelude.Eq, ReadPrec [CreateCodeRepository]
ReadPrec CreateCodeRepository
Int -> ReadS CreateCodeRepository
ReadS [CreateCodeRepository]
(Int -> ReadS CreateCodeRepository)
-> ReadS [CreateCodeRepository]
-> ReadPrec CreateCodeRepository
-> ReadPrec [CreateCodeRepository]
-> Read CreateCodeRepository
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCodeRepository]
$creadListPrec :: ReadPrec [CreateCodeRepository]
readPrec :: ReadPrec CreateCodeRepository
$creadPrec :: ReadPrec CreateCodeRepository
readList :: ReadS [CreateCodeRepository]
$creadList :: ReadS [CreateCodeRepository]
readsPrec :: Int -> ReadS CreateCodeRepository
$creadsPrec :: Int -> ReadS CreateCodeRepository
Prelude.Read, Int -> CreateCodeRepository -> ShowS
[CreateCodeRepository] -> ShowS
CreateCodeRepository -> String
(Int -> CreateCodeRepository -> ShowS)
-> (CreateCodeRepository -> String)
-> ([CreateCodeRepository] -> ShowS)
-> Show CreateCodeRepository
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCodeRepository] -> ShowS
$cshowList :: [CreateCodeRepository] -> ShowS
show :: CreateCodeRepository -> String
$cshow :: CreateCodeRepository -> String
showsPrec :: Int -> CreateCodeRepository -> ShowS
$cshowsPrec :: Int -> CreateCodeRepository -> ShowS
Prelude.Show, (forall x. CreateCodeRepository -> Rep CreateCodeRepository x)
-> (forall x. Rep CreateCodeRepository x -> CreateCodeRepository)
-> Generic CreateCodeRepository
forall x. Rep CreateCodeRepository x -> CreateCodeRepository
forall x. CreateCodeRepository -> Rep CreateCodeRepository x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCodeRepository x -> CreateCodeRepository
$cfrom :: forall x. CreateCodeRepository -> Rep CreateCodeRepository x
Prelude.Generic)

-- |
-- Create a value of 'CreateCodeRepository' 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:
--
-- 'tags', 'createCodeRepository_tags' - An array of key-value pairs. You can use tags to categorize your Amazon
-- Web Services resources in different ways, for example, by purpose,
-- owner, or environment. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>.
--
-- 'codeRepositoryName', 'createCodeRepository_codeRepositoryName' - The name of the Git repository. The name must have 1 to 63 characters.
-- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
--
-- 'gitConfig', 'createCodeRepository_gitConfig' - Specifies details about the repository, including the URL where the
-- repository is located, the default branch, and credentials to use to
-- access the repository.
newCreateCodeRepository ::
  -- | 'codeRepositoryName'
  Prelude.Text ->
  -- | 'gitConfig'
  GitConfig ->
  CreateCodeRepository
newCreateCodeRepository :: Text -> GitConfig -> CreateCodeRepository
newCreateCodeRepository
  Text
pCodeRepositoryName_
  GitConfig
pGitConfig_ =
    CreateCodeRepository' :: Maybe [Tag] -> Text -> GitConfig -> CreateCodeRepository
CreateCodeRepository'
      { $sel:tags:CreateCodeRepository' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:codeRepositoryName:CreateCodeRepository' :: Text
codeRepositoryName = Text
pCodeRepositoryName_,
        $sel:gitConfig:CreateCodeRepository' :: GitConfig
gitConfig = GitConfig
pGitConfig_
      }

-- | An array of key-value pairs. You can use tags to categorize your Amazon
-- Web Services resources in different ways, for example, by purpose,
-- owner, or environment. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tagging Amazon Web Services Resources>.
createCodeRepository_tags :: Lens.Lens' CreateCodeRepository (Prelude.Maybe [Tag])
createCodeRepository_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCodeRepository -> f CreateCodeRepository
createCodeRepository_tags = (CreateCodeRepository -> Maybe [Tag])
-> (CreateCodeRepository -> Maybe [Tag] -> CreateCodeRepository)
-> Lens
     CreateCodeRepository
     CreateCodeRepository
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCodeRepository' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateCodeRepository' :: CreateCodeRepository -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateCodeRepository
s@CreateCodeRepository' {} Maybe [Tag]
a -> CreateCodeRepository
s {$sel:tags:CreateCodeRepository' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateCodeRepository) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateCodeRepository -> f CreateCodeRepository)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateCodeRepository
-> f CreateCodeRepository
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Git repository. The name must have 1 to 63 characters.
-- Valid characters are a-z, A-Z, 0-9, and - (hyphen).
createCodeRepository_codeRepositoryName :: Lens.Lens' CreateCodeRepository Prelude.Text
createCodeRepository_codeRepositoryName :: (Text -> f Text) -> CreateCodeRepository -> f CreateCodeRepository
createCodeRepository_codeRepositoryName = (CreateCodeRepository -> Text)
-> (CreateCodeRepository -> Text -> CreateCodeRepository)
-> Lens CreateCodeRepository CreateCodeRepository Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCodeRepository' {Text
codeRepositoryName :: Text
$sel:codeRepositoryName:CreateCodeRepository' :: CreateCodeRepository -> Text
codeRepositoryName} -> Text
codeRepositoryName) (\s :: CreateCodeRepository
s@CreateCodeRepository' {} Text
a -> CreateCodeRepository
s {$sel:codeRepositoryName:CreateCodeRepository' :: Text
codeRepositoryName = Text
a} :: CreateCodeRepository)

-- | Specifies details about the repository, including the URL where the
-- repository is located, the default branch, and credentials to use to
-- access the repository.
createCodeRepository_gitConfig :: Lens.Lens' CreateCodeRepository GitConfig
createCodeRepository_gitConfig :: (GitConfig -> f GitConfig)
-> CreateCodeRepository -> f CreateCodeRepository
createCodeRepository_gitConfig = (CreateCodeRepository -> GitConfig)
-> (CreateCodeRepository -> GitConfig -> CreateCodeRepository)
-> Lens
     CreateCodeRepository CreateCodeRepository GitConfig GitConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCodeRepository' {GitConfig
gitConfig :: GitConfig
$sel:gitConfig:CreateCodeRepository' :: CreateCodeRepository -> GitConfig
gitConfig} -> GitConfig
gitConfig) (\s :: CreateCodeRepository
s@CreateCodeRepository' {} GitConfig
a -> CreateCodeRepository
s {$sel:gitConfig:CreateCodeRepository' :: GitConfig
gitConfig = GitConfig
a} :: CreateCodeRepository)

instance Core.AWSRequest CreateCodeRepository where
  type
    AWSResponse CreateCodeRepository =
      CreateCodeRepositoryResponse
  request :: CreateCodeRepository -> Request CreateCodeRepository
request = Service -> CreateCodeRepository -> Request CreateCodeRepository
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCodeRepository
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCodeRepository)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateCodeRepository))
-> Logger
-> Service
-> Proxy CreateCodeRepository
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCodeRepository)))
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 -> CreateCodeRepositoryResponse
CreateCodeRepositoryResponse'
            (Int -> Text -> CreateCodeRepositoryResponse)
-> Either String Int
-> Either String (Text -> CreateCodeRepositoryResponse)
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 -> CreateCodeRepositoryResponse)
-> Either String Text -> Either String CreateCodeRepositoryResponse
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
"CodeRepositoryArn")
      )

instance Prelude.Hashable CreateCodeRepository

instance Prelude.NFData CreateCodeRepository

instance Core.ToHeaders CreateCodeRepository where
  toHeaders :: CreateCodeRepository -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateCodeRepository -> 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
"SageMaker.CreateCodeRepository" ::
                          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 CreateCodeRepository where
  toJSON :: CreateCodeRepository -> Value
toJSON CreateCodeRepository' {Maybe [Tag]
Text
GitConfig
gitConfig :: GitConfig
codeRepositoryName :: Text
tags :: Maybe [Tag]
$sel:gitConfig:CreateCodeRepository' :: CreateCodeRepository -> GitConfig
$sel:codeRepositoryName:CreateCodeRepository' :: CreateCodeRepository -> Text
$sel:tags:CreateCodeRepository' :: CreateCodeRepository -> Maybe [Tag]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CodeRepositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
codeRepositoryName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GitConfig" Text -> GitConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= GitConfig
gitConfig)
          ]
      )

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

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

-- | /See:/ 'newCreateCodeRepositoryResponse' smart constructor.
data CreateCodeRepositoryResponse = CreateCodeRepositoryResponse'
  { -- | The response's http status code.
    CreateCodeRepositoryResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the new repository.
    CreateCodeRepositoryResponse -> Text
codeRepositoryArn :: Prelude.Text
  }
  deriving (CreateCodeRepositoryResponse
-> CreateCodeRepositoryResponse -> Bool
(CreateCodeRepositoryResponse
 -> CreateCodeRepositoryResponse -> Bool)
-> (CreateCodeRepositoryResponse
    -> CreateCodeRepositoryResponse -> Bool)
-> Eq CreateCodeRepositoryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCodeRepositoryResponse
-> CreateCodeRepositoryResponse -> Bool
$c/= :: CreateCodeRepositoryResponse
-> CreateCodeRepositoryResponse -> Bool
== :: CreateCodeRepositoryResponse
-> CreateCodeRepositoryResponse -> Bool
$c== :: CreateCodeRepositoryResponse
-> CreateCodeRepositoryResponse -> Bool
Prelude.Eq, ReadPrec [CreateCodeRepositoryResponse]
ReadPrec CreateCodeRepositoryResponse
Int -> ReadS CreateCodeRepositoryResponse
ReadS [CreateCodeRepositoryResponse]
(Int -> ReadS CreateCodeRepositoryResponse)
-> ReadS [CreateCodeRepositoryResponse]
-> ReadPrec CreateCodeRepositoryResponse
-> ReadPrec [CreateCodeRepositoryResponse]
-> Read CreateCodeRepositoryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCodeRepositoryResponse]
$creadListPrec :: ReadPrec [CreateCodeRepositoryResponse]
readPrec :: ReadPrec CreateCodeRepositoryResponse
$creadPrec :: ReadPrec CreateCodeRepositoryResponse
readList :: ReadS [CreateCodeRepositoryResponse]
$creadList :: ReadS [CreateCodeRepositoryResponse]
readsPrec :: Int -> ReadS CreateCodeRepositoryResponse
$creadsPrec :: Int -> ReadS CreateCodeRepositoryResponse
Prelude.Read, Int -> CreateCodeRepositoryResponse -> ShowS
[CreateCodeRepositoryResponse] -> ShowS
CreateCodeRepositoryResponse -> String
(Int -> CreateCodeRepositoryResponse -> ShowS)
-> (CreateCodeRepositoryResponse -> String)
-> ([CreateCodeRepositoryResponse] -> ShowS)
-> Show CreateCodeRepositoryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCodeRepositoryResponse] -> ShowS
$cshowList :: [CreateCodeRepositoryResponse] -> ShowS
show :: CreateCodeRepositoryResponse -> String
$cshow :: CreateCodeRepositoryResponse -> String
showsPrec :: Int -> CreateCodeRepositoryResponse -> ShowS
$cshowsPrec :: Int -> CreateCodeRepositoryResponse -> ShowS
Prelude.Show, (forall x.
 CreateCodeRepositoryResponse -> Rep CreateCodeRepositoryResponse x)
-> (forall x.
    Rep CreateCodeRepositoryResponse x -> CreateCodeRepositoryResponse)
-> Generic CreateCodeRepositoryResponse
forall x.
Rep CreateCodeRepositoryResponse x -> CreateCodeRepositoryResponse
forall x.
CreateCodeRepositoryResponse -> Rep CreateCodeRepositoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCodeRepositoryResponse x -> CreateCodeRepositoryResponse
$cfrom :: forall x.
CreateCodeRepositoryResponse -> Rep CreateCodeRepositoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateCodeRepositoryResponse' 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', 'createCodeRepositoryResponse_httpStatus' - The response's http status code.
--
-- 'codeRepositoryArn', 'createCodeRepositoryResponse_codeRepositoryArn' - The Amazon Resource Name (ARN) of the new repository.
newCreateCodeRepositoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'codeRepositoryArn'
  Prelude.Text ->
  CreateCodeRepositoryResponse
newCreateCodeRepositoryResponse :: Int -> Text -> CreateCodeRepositoryResponse
newCreateCodeRepositoryResponse
  Int
pHttpStatus_
  Text
pCodeRepositoryArn_ =
    CreateCodeRepositoryResponse' :: Int -> Text -> CreateCodeRepositoryResponse
CreateCodeRepositoryResponse'
      { $sel:httpStatus:CreateCodeRepositoryResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:codeRepositoryArn:CreateCodeRepositoryResponse' :: Text
codeRepositoryArn = Text
pCodeRepositoryArn_
      }

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

-- | The Amazon Resource Name (ARN) of the new repository.
createCodeRepositoryResponse_codeRepositoryArn :: Lens.Lens' CreateCodeRepositoryResponse Prelude.Text
createCodeRepositoryResponse_codeRepositoryArn :: (Text -> f Text)
-> CreateCodeRepositoryResponse -> f CreateCodeRepositoryResponse
createCodeRepositoryResponse_codeRepositoryArn = (CreateCodeRepositoryResponse -> Text)
-> (CreateCodeRepositoryResponse
    -> Text -> CreateCodeRepositoryResponse)
-> Lens
     CreateCodeRepositoryResponse CreateCodeRepositoryResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCodeRepositoryResponse' {Text
codeRepositoryArn :: Text
$sel:codeRepositoryArn:CreateCodeRepositoryResponse' :: CreateCodeRepositoryResponse -> Text
codeRepositoryArn} -> Text
codeRepositoryArn) (\s :: CreateCodeRepositoryResponse
s@CreateCodeRepositoryResponse' {} Text
a -> CreateCodeRepositoryResponse
s {$sel:codeRepositoryArn:CreateCodeRepositoryResponse' :: Text
codeRepositoryArn = Text
a} :: CreateCodeRepositoryResponse)

instance Prelude.NFData CreateCodeRepositoryResponse