{-# 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.Proton.CreateRepository
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Create and register a link to a repository. Proton uses the link to
-- repeatedly access the repository, to either push to it (self-managed
-- provisioning) or pull from it (template sync). You can share a linked
-- repository across multiple resources (like environments using
-- self-managed provisioning, or synced templates). When you create a
-- repository link, Proton creates a
-- <https://docs.aws.amazon.com/proton/latest/userguide/using-service-linked-roles.html service-linked role>
-- for you.
--
-- For more information, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/ag-works-prov-methods.html#ag-works-prov-methods-self Self-managed provisioning>,
-- <https://docs.aws.amazon.com/proton/latest/userguide/ag-template-authoring.html#ag-template-bundles Template bundles>,
-- and
-- <https://docs.aws.amazon.com/proton/latest/userguide/ag-template-sync-configs.html Template sync configurations>
-- in the /Proton User Guide/.
module Amazonka.Proton.CreateRepository
  ( -- * Creating a Request
    CreateRepository (..),
    newCreateRepository,

    -- * Request Lenses
    createRepository_encryptionKey,
    createRepository_tags,
    createRepository_connectionArn,
    createRepository_name,
    createRepository_provider,

    -- * Destructuring the Response
    CreateRepositoryResponse (..),
    newCreateRepositoryResponse,

    -- * Response Lenses
    createRepositoryResponse_httpStatus,
    createRepositoryResponse_repository,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateRepository' smart constructor.
data CreateRepository = CreateRepository'
  { -- | The ARN of your customer Amazon Web Services Key Management Service
    -- (Amazon Web Services KMS) key.
    CreateRepository -> Maybe Text
encryptionKey :: Prelude.Maybe Prelude.Text,
    -- | An optional list of metadata items that you can associate with the
    -- Proton repository. A tag is a key-value pair.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/proton/latest/userguide/resources.html Proton resources and tagging>
    -- in the /Proton User Guide/.
    CreateRepository -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The Amazon Resource Name (ARN) of your AWS CodeStar connection that
    -- connects Proton to your repository provider account. For more
    -- information, see
    -- <https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html Setting up for Proton>
    -- in the /Proton User Guide/.
    CreateRepository -> Text
connectionArn :: Prelude.Text,
    -- | The repository name (for example, @myrepos\/myrepo@).
    CreateRepository -> Text
name :: Prelude.Text,
    -- | The repository provider.
    CreateRepository -> RepositoryProvider
provider :: RepositoryProvider
  }
  deriving (CreateRepository -> CreateRepository -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRepository -> CreateRepository -> Bool
$c/= :: CreateRepository -> CreateRepository -> Bool
== :: CreateRepository -> CreateRepository -> Bool
$c== :: CreateRepository -> CreateRepository -> Bool
Prelude.Eq, ReadPrec [CreateRepository]
ReadPrec CreateRepository
Int -> ReadS CreateRepository
ReadS [CreateRepository]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRepository]
$creadListPrec :: ReadPrec [CreateRepository]
readPrec :: ReadPrec CreateRepository
$creadPrec :: ReadPrec CreateRepository
readList :: ReadS [CreateRepository]
$creadList :: ReadS [CreateRepository]
readsPrec :: Int -> ReadS CreateRepository
$creadsPrec :: Int -> ReadS CreateRepository
Prelude.Read, Int -> CreateRepository -> ShowS
[CreateRepository] -> ShowS
CreateRepository -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRepository] -> ShowS
$cshowList :: [CreateRepository] -> ShowS
show :: CreateRepository -> String
$cshow :: CreateRepository -> String
showsPrec :: Int -> CreateRepository -> ShowS
$cshowsPrec :: Int -> CreateRepository -> ShowS
Prelude.Show, forall x. Rep CreateRepository x -> CreateRepository
forall x. CreateRepository -> Rep CreateRepository x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRepository x -> CreateRepository
$cfrom :: forall x. CreateRepository -> Rep CreateRepository x
Prelude.Generic)

-- |
-- Create a value of 'CreateRepository' 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:
--
-- 'encryptionKey', 'createRepository_encryptionKey' - The ARN of your customer Amazon Web Services Key Management Service
-- (Amazon Web Services KMS) key.
--
-- 'tags', 'createRepository_tags' - An optional list of metadata items that you can associate with the
-- Proton repository. A tag is a key-value pair.
--
-- For more information, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/resources.html Proton resources and tagging>
-- in the /Proton User Guide/.
--
-- 'connectionArn', 'createRepository_connectionArn' - The Amazon Resource Name (ARN) of your AWS CodeStar connection that
-- connects Proton to your repository provider account. For more
-- information, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html Setting up for Proton>
-- in the /Proton User Guide/.
--
-- 'name', 'createRepository_name' - The repository name (for example, @myrepos\/myrepo@).
--
-- 'provider', 'createRepository_provider' - The repository provider.
newCreateRepository ::
  -- | 'connectionArn'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'provider'
  RepositoryProvider ->
  CreateRepository
newCreateRepository :: Text -> Text -> RepositoryProvider -> CreateRepository
newCreateRepository Text
pConnectionArn_ Text
pName_ RepositoryProvider
pProvider_ =
  CreateRepository'
    { $sel:encryptionKey:CreateRepository' :: Maybe Text
encryptionKey = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRepository' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionArn:CreateRepository' :: Text
connectionArn = Text
pConnectionArn_,
      $sel:name:CreateRepository' :: Text
name = Text
pName_,
      $sel:provider:CreateRepository' :: RepositoryProvider
provider = RepositoryProvider
pProvider_
    }

-- | The ARN of your customer Amazon Web Services Key Management Service
-- (Amazon Web Services KMS) key.
createRepository_encryptionKey :: Lens.Lens' CreateRepository (Prelude.Maybe Prelude.Text)
createRepository_encryptionKey :: Lens' CreateRepository (Maybe Text)
createRepository_encryptionKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepository' {Maybe Text
encryptionKey :: Maybe Text
$sel:encryptionKey:CreateRepository' :: CreateRepository -> Maybe Text
encryptionKey} -> Maybe Text
encryptionKey) (\s :: CreateRepository
s@CreateRepository' {} Maybe Text
a -> CreateRepository
s {$sel:encryptionKey:CreateRepository' :: Maybe Text
encryptionKey = Maybe Text
a} :: CreateRepository)

-- | An optional list of metadata items that you can associate with the
-- Proton repository. A tag is a key-value pair.
--
-- For more information, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/resources.html Proton resources and tagging>
-- in the /Proton User Guide/.
createRepository_tags :: Lens.Lens' CreateRepository (Prelude.Maybe [Tag])
createRepository_tags :: Lens' CreateRepository (Maybe [Tag])
createRepository_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepository' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateRepository' :: CreateRepository -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateRepository
s@CreateRepository' {} Maybe [Tag]
a -> CreateRepository
s {$sel:tags:CreateRepository' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateRepository) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of your AWS CodeStar connection that
-- connects Proton to your repository provider account. For more
-- information, see
-- <https://docs.aws.amazon.com/proton/latest/userguide/setting-up-for-service.html Setting up for Proton>
-- in the /Proton User Guide/.
createRepository_connectionArn :: Lens.Lens' CreateRepository Prelude.Text
createRepository_connectionArn :: Lens' CreateRepository Text
createRepository_connectionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepository' {Text
connectionArn :: Text
$sel:connectionArn:CreateRepository' :: CreateRepository -> Text
connectionArn} -> Text
connectionArn) (\s :: CreateRepository
s@CreateRepository' {} Text
a -> CreateRepository
s {$sel:connectionArn:CreateRepository' :: Text
connectionArn = Text
a} :: CreateRepository)

-- | The repository name (for example, @myrepos\/myrepo@).
createRepository_name :: Lens.Lens' CreateRepository Prelude.Text
createRepository_name :: Lens' CreateRepository Text
createRepository_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepository' {Text
name :: Text
$sel:name:CreateRepository' :: CreateRepository -> Text
name} -> Text
name) (\s :: CreateRepository
s@CreateRepository' {} Text
a -> CreateRepository
s {$sel:name:CreateRepository' :: Text
name = Text
a} :: CreateRepository)

-- | The repository provider.
createRepository_provider :: Lens.Lens' CreateRepository RepositoryProvider
createRepository_provider :: Lens' CreateRepository RepositoryProvider
createRepository_provider = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepository' {RepositoryProvider
provider :: RepositoryProvider
$sel:provider:CreateRepository' :: CreateRepository -> RepositoryProvider
provider} -> RepositoryProvider
provider) (\s :: CreateRepository
s@CreateRepository' {} RepositoryProvider
a -> CreateRepository
s {$sel:provider:CreateRepository' :: RepositoryProvider
provider = RepositoryProvider
a} :: CreateRepository)

instance Core.AWSRequest CreateRepository where
  type
    AWSResponse CreateRepository =
      CreateRepositoryResponse
  request :: (Service -> Service)
-> CreateRepository -> Request CreateRepository
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateRepository
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRepository)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> Repository -> CreateRepositoryResponse
CreateRepositoryResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"repository")
      )

instance Prelude.Hashable CreateRepository where
  hashWithSalt :: Int -> CreateRepository -> Int
hashWithSalt Int
_salt CreateRepository' {Maybe [Tag]
Maybe Text
Text
RepositoryProvider
provider :: RepositoryProvider
name :: Text
connectionArn :: Text
tags :: Maybe [Tag]
encryptionKey :: Maybe Text
$sel:provider:CreateRepository' :: CreateRepository -> RepositoryProvider
$sel:name:CreateRepository' :: CreateRepository -> Text
$sel:connectionArn:CreateRepository' :: CreateRepository -> Text
$sel:tags:CreateRepository' :: CreateRepository -> Maybe [Tag]
$sel:encryptionKey:CreateRepository' :: CreateRepository -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
encryptionKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectionArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RepositoryProvider
provider

instance Prelude.NFData CreateRepository where
  rnf :: CreateRepository -> ()
rnf CreateRepository' {Maybe [Tag]
Maybe Text
Text
RepositoryProvider
provider :: RepositoryProvider
name :: Text
connectionArn :: Text
tags :: Maybe [Tag]
encryptionKey :: Maybe Text
$sel:provider:CreateRepository' :: CreateRepository -> RepositoryProvider
$sel:name:CreateRepository' :: CreateRepository -> Text
$sel:connectionArn:CreateRepository' :: CreateRepository -> Text
$sel:tags:CreateRepository' :: CreateRepository -> Maybe [Tag]
$sel:encryptionKey:CreateRepository' :: CreateRepository -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
encryptionKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
connectionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RepositoryProvider
provider

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

instance Data.ToJSON CreateRepository where
  toJSON :: CreateRepository -> Value
toJSON CreateRepository' {Maybe [Tag]
Maybe Text
Text
RepositoryProvider
provider :: RepositoryProvider
name :: Text
connectionArn :: Text
tags :: Maybe [Tag]
encryptionKey :: Maybe Text
$sel:provider:CreateRepository' :: CreateRepository -> RepositoryProvider
$sel:name:CreateRepository' :: CreateRepository -> Text
$sel:connectionArn:CreateRepository' :: CreateRepository -> Text
$sel:tags:CreateRepository' :: CreateRepository -> Maybe [Tag]
$sel:encryptionKey:CreateRepository' :: CreateRepository -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"encryptionKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
encryptionKey,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"connectionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
connectionArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"provider" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RepositoryProvider
provider)
          ]
      )

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

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

-- | /See:/ 'newCreateRepositoryResponse' smart constructor.
data CreateRepositoryResponse = CreateRepositoryResponse'
  { -- | The response's http status code.
    CreateRepositoryResponse -> Int
httpStatus :: Prelude.Int,
    -- | The repository link\'s detail data that\'s returned by Proton.
    CreateRepositoryResponse -> Repository
repository :: Repository
  }
  deriving (CreateRepositoryResponse -> CreateRepositoryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRepositoryResponse -> CreateRepositoryResponse -> Bool
$c/= :: CreateRepositoryResponse -> CreateRepositoryResponse -> Bool
== :: CreateRepositoryResponse -> CreateRepositoryResponse -> Bool
$c== :: CreateRepositoryResponse -> CreateRepositoryResponse -> Bool
Prelude.Eq, ReadPrec [CreateRepositoryResponse]
ReadPrec CreateRepositoryResponse
Int -> ReadS CreateRepositoryResponse
ReadS [CreateRepositoryResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRepositoryResponse]
$creadListPrec :: ReadPrec [CreateRepositoryResponse]
readPrec :: ReadPrec CreateRepositoryResponse
$creadPrec :: ReadPrec CreateRepositoryResponse
readList :: ReadS [CreateRepositoryResponse]
$creadList :: ReadS [CreateRepositoryResponse]
readsPrec :: Int -> ReadS CreateRepositoryResponse
$creadsPrec :: Int -> ReadS CreateRepositoryResponse
Prelude.Read, Int -> CreateRepositoryResponse -> ShowS
[CreateRepositoryResponse] -> ShowS
CreateRepositoryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRepositoryResponse] -> ShowS
$cshowList :: [CreateRepositoryResponse] -> ShowS
show :: CreateRepositoryResponse -> String
$cshow :: CreateRepositoryResponse -> String
showsPrec :: Int -> CreateRepositoryResponse -> ShowS
$cshowsPrec :: Int -> CreateRepositoryResponse -> ShowS
Prelude.Show, forall x.
Rep CreateRepositoryResponse x -> CreateRepositoryResponse
forall x.
CreateRepositoryResponse -> Rep CreateRepositoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRepositoryResponse x -> CreateRepositoryResponse
$cfrom :: forall x.
CreateRepositoryResponse -> Rep CreateRepositoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRepositoryResponse' 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', 'createRepositoryResponse_httpStatus' - The response's http status code.
--
-- 'repository', 'createRepositoryResponse_repository' - The repository link\'s detail data that\'s returned by Proton.
newCreateRepositoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'repository'
  Repository ->
  CreateRepositoryResponse
newCreateRepositoryResponse :: Int -> Repository -> CreateRepositoryResponse
newCreateRepositoryResponse Int
pHttpStatus_ Repository
pRepository_ =
  CreateRepositoryResponse'
    { $sel:httpStatus:CreateRepositoryResponse' :: Int
httpStatus =
        Int
pHttpStatus_,
      $sel:repository:CreateRepositoryResponse' :: Repository
repository = Repository
pRepository_
    }

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

-- | The repository link\'s detail data that\'s returned by Proton.
createRepositoryResponse_repository :: Lens.Lens' CreateRepositoryResponse Repository
createRepositoryResponse_repository :: Lens' CreateRepositoryResponse Repository
createRepositoryResponse_repository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRepositoryResponse' {Repository
repository :: Repository
$sel:repository:CreateRepositoryResponse' :: CreateRepositoryResponse -> Repository
repository} -> Repository
repository) (\s :: CreateRepositoryResponse
s@CreateRepositoryResponse' {} Repository
a -> CreateRepositoryResponse
s {$sel:repository:CreateRepositoryResponse' :: Repository
repository = Repository
a} :: CreateRepositoryResponse)

instance Prelude.NFData CreateRepositoryResponse where
  rnf :: CreateRepositoryResponse -> ()
rnf CreateRepositoryResponse' {Int
Repository
repository :: Repository
httpStatus :: Int
$sel:repository:CreateRepositoryResponse' :: CreateRepositoryResponse -> Repository
$sel:httpStatus:CreateRepositoryResponse' :: CreateRepositoryResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Repository
repository