{-# 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.ListCodeRepositories
-- 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)
--
-- Gets a list of the Git repositories in your account.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListCodeRepositories
  ( -- * Creating a Request
    ListCodeRepositories (..),
    newListCodeRepositories,

    -- * Request Lenses
    listCodeRepositories_nameContains,
    listCodeRepositories_lastModifiedTimeBefore,
    listCodeRepositories_creationTimeAfter,
    listCodeRepositories_nextToken,
    listCodeRepositories_sortOrder,
    listCodeRepositories_lastModifiedTimeAfter,
    listCodeRepositories_creationTimeBefore,
    listCodeRepositories_maxResults,
    listCodeRepositories_sortBy,

    -- * Destructuring the Response
    ListCodeRepositoriesResponse (..),
    newListCodeRepositoriesResponse,

    -- * Response Lenses
    listCodeRepositoriesResponse_nextToken,
    listCodeRepositoriesResponse_httpStatus,
    listCodeRepositoriesResponse_codeRepositorySummaryList,
  )
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:/ 'newListCodeRepositories' smart constructor.
data ListCodeRepositories = ListCodeRepositories'
  { -- | A string in the Git repositories name. This filter returns only
    -- repositories whose name contains the specified string.
    ListCodeRepositories -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only Git repositories that were last modified
    -- before the specified time.
    ListCodeRepositories -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only Git repositories that were created after the
    -- specified time.
    ListCodeRepositories -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | If the result of a @ListCodeRepositoriesOutput@ request was truncated,
    -- the response includes a @NextToken@. To get the next set of Git
    -- repositories, use the token in the next request.
    ListCodeRepositories -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The sort order for results. The default is @Ascending@.
    ListCodeRepositories -> Maybe CodeRepositorySortOrder
sortOrder :: Prelude.Maybe CodeRepositorySortOrder,
    -- | A filter that returns only Git repositories that were last modified
    -- after the specified time.
    ListCodeRepositories -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only Git repositories that were created before the
    -- specified time.
    ListCodeRepositories -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | The maximum number of Git repositories to return in the response.
    ListCodeRepositories -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The field to sort results by. The default is @Name@.
    ListCodeRepositories -> Maybe CodeRepositorySortBy
sortBy :: Prelude.Maybe CodeRepositorySortBy
  }
  deriving (ListCodeRepositories -> ListCodeRepositories -> Bool
(ListCodeRepositories -> ListCodeRepositories -> Bool)
-> (ListCodeRepositories -> ListCodeRepositories -> Bool)
-> Eq ListCodeRepositories
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCodeRepositories -> ListCodeRepositories -> Bool
$c/= :: ListCodeRepositories -> ListCodeRepositories -> Bool
== :: ListCodeRepositories -> ListCodeRepositories -> Bool
$c== :: ListCodeRepositories -> ListCodeRepositories -> Bool
Prelude.Eq, ReadPrec [ListCodeRepositories]
ReadPrec ListCodeRepositories
Int -> ReadS ListCodeRepositories
ReadS [ListCodeRepositories]
(Int -> ReadS ListCodeRepositories)
-> ReadS [ListCodeRepositories]
-> ReadPrec ListCodeRepositories
-> ReadPrec [ListCodeRepositories]
-> Read ListCodeRepositories
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCodeRepositories]
$creadListPrec :: ReadPrec [ListCodeRepositories]
readPrec :: ReadPrec ListCodeRepositories
$creadPrec :: ReadPrec ListCodeRepositories
readList :: ReadS [ListCodeRepositories]
$creadList :: ReadS [ListCodeRepositories]
readsPrec :: Int -> ReadS ListCodeRepositories
$creadsPrec :: Int -> ReadS ListCodeRepositories
Prelude.Read, Int -> ListCodeRepositories -> ShowS
[ListCodeRepositories] -> ShowS
ListCodeRepositories -> String
(Int -> ListCodeRepositories -> ShowS)
-> (ListCodeRepositories -> String)
-> ([ListCodeRepositories] -> ShowS)
-> Show ListCodeRepositories
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCodeRepositories] -> ShowS
$cshowList :: [ListCodeRepositories] -> ShowS
show :: ListCodeRepositories -> String
$cshow :: ListCodeRepositories -> String
showsPrec :: Int -> ListCodeRepositories -> ShowS
$cshowsPrec :: Int -> ListCodeRepositories -> ShowS
Prelude.Show, (forall x. ListCodeRepositories -> Rep ListCodeRepositories x)
-> (forall x. Rep ListCodeRepositories x -> ListCodeRepositories)
-> Generic ListCodeRepositories
forall x. Rep ListCodeRepositories x -> ListCodeRepositories
forall x. ListCodeRepositories -> Rep ListCodeRepositories x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCodeRepositories x -> ListCodeRepositories
$cfrom :: forall x. ListCodeRepositories -> Rep ListCodeRepositories x
Prelude.Generic)

-- |
-- Create a value of 'ListCodeRepositories' 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:
--
-- 'nameContains', 'listCodeRepositories_nameContains' - A string in the Git repositories name. This filter returns only
-- repositories whose name contains the specified string.
--
-- 'lastModifiedTimeBefore', 'listCodeRepositories_lastModifiedTimeBefore' - A filter that returns only Git repositories that were last modified
-- before the specified time.
--
-- 'creationTimeAfter', 'listCodeRepositories_creationTimeAfter' - A filter that returns only Git repositories that were created after the
-- specified time.
--
-- 'nextToken', 'listCodeRepositories_nextToken' - If the result of a @ListCodeRepositoriesOutput@ request was truncated,
-- the response includes a @NextToken@. To get the next set of Git
-- repositories, use the token in the next request.
--
-- 'sortOrder', 'listCodeRepositories_sortOrder' - The sort order for results. The default is @Ascending@.
--
-- 'lastModifiedTimeAfter', 'listCodeRepositories_lastModifiedTimeAfter' - A filter that returns only Git repositories that were last modified
-- after the specified time.
--
-- 'creationTimeBefore', 'listCodeRepositories_creationTimeBefore' - A filter that returns only Git repositories that were created before the
-- specified time.
--
-- 'maxResults', 'listCodeRepositories_maxResults' - The maximum number of Git repositories to return in the response.
--
-- 'sortBy', 'listCodeRepositories_sortBy' - The field to sort results by. The default is @Name@.
newListCodeRepositories ::
  ListCodeRepositories
newListCodeRepositories :: ListCodeRepositories
newListCodeRepositories =
  ListCodeRepositories' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe CodeRepositorySortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Natural
-> Maybe CodeRepositorySortBy
-> ListCodeRepositories
ListCodeRepositories'
    { $sel:nameContains:ListCodeRepositories' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListCodeRepositories' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListCodeRepositories' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCodeRepositories' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListCodeRepositories' :: Maybe CodeRepositorySortOrder
sortOrder = Maybe CodeRepositorySortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListCodeRepositories' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListCodeRepositories' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCodeRepositories' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListCodeRepositories' :: Maybe CodeRepositorySortBy
sortBy = Maybe CodeRepositorySortBy
forall a. Maybe a
Prelude.Nothing
    }

-- | A string in the Git repositories name. This filter returns only
-- repositories whose name contains the specified string.
listCodeRepositories_nameContains :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.Text)
listCodeRepositories_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_nameContains = (ListCodeRepositories -> Maybe Text)
-> (ListCodeRepositories -> Maybe Text -> ListCodeRepositories)
-> Lens
     ListCodeRepositories ListCodeRepositories (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListCodeRepositories' :: ListCodeRepositories -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe Text
a -> ListCodeRepositories
s {$sel:nameContains:ListCodeRepositories' :: Maybe Text
nameContains = Maybe Text
a} :: ListCodeRepositories)

-- | A filter that returns only Git repositories that were last modified
-- before the specified time.
listCodeRepositories_lastModifiedTimeBefore :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.UTCTime)
listCodeRepositories_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_lastModifiedTimeBefore = (ListCodeRepositories -> Maybe POSIX)
-> (ListCodeRepositories -> Maybe POSIX -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe POSIX
a -> ListCodeRepositories
s {$sel:lastModifiedTimeBefore:ListCodeRepositories' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListCodeRepositories) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCodeRepositories -> f ListCodeRepositories)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories
-> f ListCodeRepositories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A filter that returns only Git repositories that were created after the
-- specified time.
listCodeRepositories_creationTimeAfter :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.UTCTime)
listCodeRepositories_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_creationTimeAfter = (ListCodeRepositories -> Maybe POSIX)
-> (ListCodeRepositories -> Maybe POSIX -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe POSIX
a -> ListCodeRepositories
s {$sel:creationTimeAfter:ListCodeRepositories' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListCodeRepositories) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCodeRepositories -> f ListCodeRepositories)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories
-> f ListCodeRepositories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | If the result of a @ListCodeRepositoriesOutput@ request was truncated,
-- the response includes a @NextToken@. To get the next set of Git
-- repositories, use the token in the next request.
listCodeRepositories_nextToken :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.Text)
listCodeRepositories_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_nextToken = (ListCodeRepositories -> Maybe Text)
-> (ListCodeRepositories -> Maybe Text -> ListCodeRepositories)
-> Lens
     ListCodeRepositories ListCodeRepositories (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCodeRepositories' :: ListCodeRepositories -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe Text
a -> ListCodeRepositories
s {$sel:nextToken:ListCodeRepositories' :: Maybe Text
nextToken = Maybe Text
a} :: ListCodeRepositories)

-- | The sort order for results. The default is @Ascending@.
listCodeRepositories_sortOrder :: Lens.Lens' ListCodeRepositories (Prelude.Maybe CodeRepositorySortOrder)
listCodeRepositories_sortOrder :: (Maybe CodeRepositorySortOrder
 -> f (Maybe CodeRepositorySortOrder))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_sortOrder = (ListCodeRepositories -> Maybe CodeRepositorySortOrder)
-> (ListCodeRepositories
    -> Maybe CodeRepositorySortOrder -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe CodeRepositorySortOrder)
     (Maybe CodeRepositorySortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe CodeRepositorySortOrder
sortOrder :: Maybe CodeRepositorySortOrder
$sel:sortOrder:ListCodeRepositories' :: ListCodeRepositories -> Maybe CodeRepositorySortOrder
sortOrder} -> Maybe CodeRepositorySortOrder
sortOrder) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe CodeRepositorySortOrder
a -> ListCodeRepositories
s {$sel:sortOrder:ListCodeRepositories' :: Maybe CodeRepositorySortOrder
sortOrder = Maybe CodeRepositorySortOrder
a} :: ListCodeRepositories)

-- | A filter that returns only Git repositories that were last modified
-- after the specified time.
listCodeRepositories_lastModifiedTimeAfter :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.UTCTime)
listCodeRepositories_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_lastModifiedTimeAfter = (ListCodeRepositories -> Maybe POSIX)
-> (ListCodeRepositories -> Maybe POSIX -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe POSIX
a -> ListCodeRepositories
s {$sel:lastModifiedTimeAfter:ListCodeRepositories' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListCodeRepositories) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCodeRepositories -> f ListCodeRepositories)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories
-> f ListCodeRepositories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A filter that returns only Git repositories that were created before the
-- specified time.
listCodeRepositories_creationTimeBefore :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.UTCTime)
listCodeRepositories_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_creationTimeBefore = (ListCodeRepositories -> Maybe POSIX)
-> (ListCodeRepositories -> Maybe POSIX -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe POSIX
a -> ListCodeRepositories
s {$sel:creationTimeBefore:ListCodeRepositories' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListCodeRepositories) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListCodeRepositories -> f ListCodeRepositories)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListCodeRepositories
-> f ListCodeRepositories
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The maximum number of Git repositories to return in the response.
listCodeRepositories_maxResults :: Lens.Lens' ListCodeRepositories (Prelude.Maybe Prelude.Natural)
listCodeRepositories_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_maxResults = (ListCodeRepositories -> Maybe Natural)
-> (ListCodeRepositories -> Maybe Natural -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCodeRepositories' :: ListCodeRepositories -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe Natural
a -> ListCodeRepositories
s {$sel:maxResults:ListCodeRepositories' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCodeRepositories)

-- | The field to sort results by. The default is @Name@.
listCodeRepositories_sortBy :: Lens.Lens' ListCodeRepositories (Prelude.Maybe CodeRepositorySortBy)
listCodeRepositories_sortBy :: (Maybe CodeRepositorySortBy -> f (Maybe CodeRepositorySortBy))
-> ListCodeRepositories -> f ListCodeRepositories
listCodeRepositories_sortBy = (ListCodeRepositories -> Maybe CodeRepositorySortBy)
-> (ListCodeRepositories
    -> Maybe CodeRepositorySortBy -> ListCodeRepositories)
-> Lens
     ListCodeRepositories
     ListCodeRepositories
     (Maybe CodeRepositorySortBy)
     (Maybe CodeRepositorySortBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositories' {Maybe CodeRepositorySortBy
sortBy :: Maybe CodeRepositorySortBy
$sel:sortBy:ListCodeRepositories' :: ListCodeRepositories -> Maybe CodeRepositorySortBy
sortBy} -> Maybe CodeRepositorySortBy
sortBy) (\s :: ListCodeRepositories
s@ListCodeRepositories' {} Maybe CodeRepositorySortBy
a -> ListCodeRepositories
s {$sel:sortBy:ListCodeRepositories' :: Maybe CodeRepositorySortBy
sortBy = Maybe CodeRepositorySortBy
a} :: ListCodeRepositories)

instance Core.AWSPager ListCodeRepositories where
  page :: ListCodeRepositories
-> AWSResponse ListCodeRepositories -> Maybe ListCodeRepositories
page ListCodeRepositories
rq AWSResponse ListCodeRepositories
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCodeRepositories
ListCodeRepositoriesResponse
rs
            ListCodeRepositoriesResponse
-> Getting (First Text) ListCodeRepositoriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCodeRepositoriesResponse
-> Const (First Text) ListCodeRepositoriesResponse
Lens' ListCodeRepositoriesResponse (Maybe Text)
listCodeRepositoriesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListCodeRepositoriesResponse
 -> Const (First Text) ListCodeRepositoriesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListCodeRepositoriesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListCodeRepositories
forall a. Maybe a
Prelude.Nothing
    | [CodeRepositorySummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCodeRepositories
ListCodeRepositoriesResponse
rs
            ListCodeRepositoriesResponse
-> Getting
     [CodeRepositorySummary]
     ListCodeRepositoriesResponse
     [CodeRepositorySummary]
-> [CodeRepositorySummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [CodeRepositorySummary]
  ListCodeRepositoriesResponse
  [CodeRepositorySummary]
Lens' ListCodeRepositoriesResponse [CodeRepositorySummary]
listCodeRepositoriesResponse_codeRepositorySummaryList
        ) =
      Maybe ListCodeRepositories
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListCodeRepositories -> Maybe ListCodeRepositories
forall a. a -> Maybe a
Prelude.Just (ListCodeRepositories -> Maybe ListCodeRepositories)
-> ListCodeRepositories -> Maybe ListCodeRepositories
forall a b. (a -> b) -> a -> b
Prelude.$
        ListCodeRepositories
rq
          ListCodeRepositories
-> (ListCodeRepositories -> ListCodeRepositories)
-> ListCodeRepositories
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListCodeRepositories -> Identity ListCodeRepositories
Lens
  ListCodeRepositories ListCodeRepositories (Maybe Text) (Maybe Text)
listCodeRepositories_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListCodeRepositories -> Identity ListCodeRepositories)
-> Maybe Text -> ListCodeRepositories -> ListCodeRepositories
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCodeRepositories
ListCodeRepositoriesResponse
rs
          ListCodeRepositoriesResponse
-> Getting (First Text) ListCodeRepositoriesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListCodeRepositoriesResponse
-> Const (First Text) ListCodeRepositoriesResponse
Lens' ListCodeRepositoriesResponse (Maybe Text)
listCodeRepositoriesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListCodeRepositoriesResponse
 -> Const (First Text) ListCodeRepositoriesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListCodeRepositoriesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListCodeRepositories where
  type
    AWSResponse ListCodeRepositories =
      ListCodeRepositoriesResponse
  request :: ListCodeRepositories -> Request ListCodeRepositories
request = Service -> ListCodeRepositories -> Request ListCodeRepositories
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListCodeRepositories
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListCodeRepositories)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListCodeRepositories))
-> Logger
-> Service
-> Proxy ListCodeRepositories
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListCodeRepositories)))
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
-> Int -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse
ListCodeRepositoriesResponse'
            (Maybe Text
 -> Int -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse)
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
"NextToken")
            Either
  String
  (Int -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse)
-> Either String Int
-> Either
     String ([CodeRepositorySummary] -> ListCodeRepositoriesResponse)
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))
            Either
  String ([CodeRepositorySummary] -> ListCodeRepositoriesResponse)
-> Either String [CodeRepositorySummary]
-> Either String ListCodeRepositoriesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [CodeRepositorySummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CodeRepositorySummaryList"
                            Either String (Maybe [CodeRepositorySummary])
-> [CodeRepositorySummary] -> Either String [CodeRepositorySummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [CodeRepositorySummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListCodeRepositories

instance Prelude.NFData ListCodeRepositories

instance Core.ToHeaders ListCodeRepositories where
  toHeaders :: ListCodeRepositories -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListCodeRepositories -> 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.ListCodeRepositories" ::
                          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 ListCodeRepositories where
  toJSON :: ListCodeRepositories -> Value
toJSON ListCodeRepositories' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe CodeRepositorySortBy
Maybe CodeRepositorySortOrder
sortBy :: Maybe CodeRepositorySortBy
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe CodeRepositorySortOrder
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
nameContains :: Maybe Text
$sel:sortBy:ListCodeRepositories' :: ListCodeRepositories -> Maybe CodeRepositorySortBy
$sel:maxResults:ListCodeRepositories' :: ListCodeRepositories -> Maybe Natural
$sel:creationTimeBefore:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
$sel:sortOrder:ListCodeRepositories' :: ListCodeRepositories -> Maybe CodeRepositorySortOrder
$sel:nextToken:ListCodeRepositories' :: ListCodeRepositories -> Maybe Text
$sel:creationTimeAfter:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
$sel:lastModifiedTimeBefore:ListCodeRepositories' :: ListCodeRepositories -> Maybe POSIX
$sel:nameContains:ListCodeRepositories' :: ListCodeRepositories -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NameContains" 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
nameContains,
            (Text
"LastModifiedTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeBefore,
            (Text
"CreationTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
            (Text
"NextToken" 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
nextToken,
            (Text
"SortOrder" Text -> CodeRepositorySortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CodeRepositorySortOrder -> Pair)
-> Maybe CodeRepositorySortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeRepositorySortOrder
sortOrder,
            (Text
"LastModifiedTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
lastModifiedTimeAfter,
            (Text
"CreationTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Text
"SortBy" Text -> CodeRepositorySortBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CodeRepositorySortBy -> Pair)
-> Maybe CodeRepositorySortBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeRepositorySortBy
sortBy
          ]
      )

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

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

-- | /See:/ 'newListCodeRepositoriesResponse' smart constructor.
data ListCodeRepositoriesResponse = ListCodeRepositoriesResponse'
  { -- | If the result of a @ListCodeRepositoriesOutput@ request was truncated,
    -- the response includes a @NextToken@. To get the next set of Git
    -- repositories, use the token in the next request.
    ListCodeRepositoriesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCodeRepositoriesResponse -> Int
httpStatus :: Prelude.Int,
    -- | Gets a list of summaries of the Git repositories. Each summary specifies
    -- the following values for the repository:
    --
    -- -   Name
    --
    -- -   Amazon Resource Name (ARN)
    --
    -- -   Creation time
    --
    -- -   Last modified time
    --
    -- -   Configuration information, including the URL location of the
    --     repository and the ARN of the Amazon Web Services Secrets Manager
    --     secret that contains the credentials used to access the repository.
    ListCodeRepositoriesResponse -> [CodeRepositorySummary]
codeRepositorySummaryList :: [CodeRepositorySummary]
  }
  deriving (ListCodeRepositoriesResponse
-> ListCodeRepositoriesResponse -> Bool
(ListCodeRepositoriesResponse
 -> ListCodeRepositoriesResponse -> Bool)
-> (ListCodeRepositoriesResponse
    -> ListCodeRepositoriesResponse -> Bool)
-> Eq ListCodeRepositoriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCodeRepositoriesResponse
-> ListCodeRepositoriesResponse -> Bool
$c/= :: ListCodeRepositoriesResponse
-> ListCodeRepositoriesResponse -> Bool
== :: ListCodeRepositoriesResponse
-> ListCodeRepositoriesResponse -> Bool
$c== :: ListCodeRepositoriesResponse
-> ListCodeRepositoriesResponse -> Bool
Prelude.Eq, ReadPrec [ListCodeRepositoriesResponse]
ReadPrec ListCodeRepositoriesResponse
Int -> ReadS ListCodeRepositoriesResponse
ReadS [ListCodeRepositoriesResponse]
(Int -> ReadS ListCodeRepositoriesResponse)
-> ReadS [ListCodeRepositoriesResponse]
-> ReadPrec ListCodeRepositoriesResponse
-> ReadPrec [ListCodeRepositoriesResponse]
-> Read ListCodeRepositoriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCodeRepositoriesResponse]
$creadListPrec :: ReadPrec [ListCodeRepositoriesResponse]
readPrec :: ReadPrec ListCodeRepositoriesResponse
$creadPrec :: ReadPrec ListCodeRepositoriesResponse
readList :: ReadS [ListCodeRepositoriesResponse]
$creadList :: ReadS [ListCodeRepositoriesResponse]
readsPrec :: Int -> ReadS ListCodeRepositoriesResponse
$creadsPrec :: Int -> ReadS ListCodeRepositoriesResponse
Prelude.Read, Int -> ListCodeRepositoriesResponse -> ShowS
[ListCodeRepositoriesResponse] -> ShowS
ListCodeRepositoriesResponse -> String
(Int -> ListCodeRepositoriesResponse -> ShowS)
-> (ListCodeRepositoriesResponse -> String)
-> ([ListCodeRepositoriesResponse] -> ShowS)
-> Show ListCodeRepositoriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCodeRepositoriesResponse] -> ShowS
$cshowList :: [ListCodeRepositoriesResponse] -> ShowS
show :: ListCodeRepositoriesResponse -> String
$cshow :: ListCodeRepositoriesResponse -> String
showsPrec :: Int -> ListCodeRepositoriesResponse -> ShowS
$cshowsPrec :: Int -> ListCodeRepositoriesResponse -> ShowS
Prelude.Show, (forall x.
 ListCodeRepositoriesResponse -> Rep ListCodeRepositoriesResponse x)
-> (forall x.
    Rep ListCodeRepositoriesResponse x -> ListCodeRepositoriesResponse)
-> Generic ListCodeRepositoriesResponse
forall x.
Rep ListCodeRepositoriesResponse x -> ListCodeRepositoriesResponse
forall x.
ListCodeRepositoriesResponse -> Rep ListCodeRepositoriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCodeRepositoriesResponse x -> ListCodeRepositoriesResponse
$cfrom :: forall x.
ListCodeRepositoriesResponse -> Rep ListCodeRepositoriesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCodeRepositoriesResponse' 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:
--
-- 'nextToken', 'listCodeRepositoriesResponse_nextToken' - If the result of a @ListCodeRepositoriesOutput@ request was truncated,
-- the response includes a @NextToken@. To get the next set of Git
-- repositories, use the token in the next request.
--
-- 'httpStatus', 'listCodeRepositoriesResponse_httpStatus' - The response's http status code.
--
-- 'codeRepositorySummaryList', 'listCodeRepositoriesResponse_codeRepositorySummaryList' - Gets a list of summaries of the Git repositories. Each summary specifies
-- the following values for the repository:
--
-- -   Name
--
-- -   Amazon Resource Name (ARN)
--
-- -   Creation time
--
-- -   Last modified time
--
-- -   Configuration information, including the URL location of the
--     repository and the ARN of the Amazon Web Services Secrets Manager
--     secret that contains the credentials used to access the repository.
newListCodeRepositoriesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCodeRepositoriesResponse
newListCodeRepositoriesResponse :: Int -> ListCodeRepositoriesResponse
newListCodeRepositoriesResponse Int
pHttpStatus_ =
  ListCodeRepositoriesResponse' :: Maybe Text
-> Int -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse
ListCodeRepositoriesResponse'
    { $sel:nextToken:ListCodeRepositoriesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCodeRepositoriesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:codeRepositorySummaryList:ListCodeRepositoriesResponse' :: [CodeRepositorySummary]
codeRepositorySummaryList = [CodeRepositorySummary]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If the result of a @ListCodeRepositoriesOutput@ request was truncated,
-- the response includes a @NextToken@. To get the next set of Git
-- repositories, use the token in the next request.
listCodeRepositoriesResponse_nextToken :: Lens.Lens' ListCodeRepositoriesResponse (Prelude.Maybe Prelude.Text)
listCodeRepositoriesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListCodeRepositoriesResponse -> f ListCodeRepositoriesResponse
listCodeRepositoriesResponse_nextToken = (ListCodeRepositoriesResponse -> Maybe Text)
-> (ListCodeRepositoriesResponse
    -> Maybe Text -> ListCodeRepositoriesResponse)
-> Lens' ListCodeRepositoriesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositoriesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCodeRepositoriesResponse' :: ListCodeRepositoriesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCodeRepositoriesResponse
s@ListCodeRepositoriesResponse' {} Maybe Text
a -> ListCodeRepositoriesResponse
s {$sel:nextToken:ListCodeRepositoriesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCodeRepositoriesResponse)

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

-- | Gets a list of summaries of the Git repositories. Each summary specifies
-- the following values for the repository:
--
-- -   Name
--
-- -   Amazon Resource Name (ARN)
--
-- -   Creation time
--
-- -   Last modified time
--
-- -   Configuration information, including the URL location of the
--     repository and the ARN of the Amazon Web Services Secrets Manager
--     secret that contains the credentials used to access the repository.
listCodeRepositoriesResponse_codeRepositorySummaryList :: Lens.Lens' ListCodeRepositoriesResponse [CodeRepositorySummary]
listCodeRepositoriesResponse_codeRepositorySummaryList :: ([CodeRepositorySummary] -> f [CodeRepositorySummary])
-> ListCodeRepositoriesResponse -> f ListCodeRepositoriesResponse
listCodeRepositoriesResponse_codeRepositorySummaryList = (ListCodeRepositoriesResponse -> [CodeRepositorySummary])
-> (ListCodeRepositoriesResponse
    -> [CodeRepositorySummary] -> ListCodeRepositoriesResponse)
-> Lens' ListCodeRepositoriesResponse [CodeRepositorySummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCodeRepositoriesResponse' {[CodeRepositorySummary]
codeRepositorySummaryList :: [CodeRepositorySummary]
$sel:codeRepositorySummaryList:ListCodeRepositoriesResponse' :: ListCodeRepositoriesResponse -> [CodeRepositorySummary]
codeRepositorySummaryList} -> [CodeRepositorySummary]
codeRepositorySummaryList) (\s :: ListCodeRepositoriesResponse
s@ListCodeRepositoriesResponse' {} [CodeRepositorySummary]
a -> ListCodeRepositoriesResponse
s {$sel:codeRepositorySummaryList:ListCodeRepositoriesResponse' :: [CodeRepositorySummary]
codeRepositorySummaryList = [CodeRepositorySummary]
a} :: ListCodeRepositoriesResponse) (([CodeRepositorySummary] -> f [CodeRepositorySummary])
 -> ListCodeRepositoriesResponse -> f ListCodeRepositoriesResponse)
-> (([CodeRepositorySummary] -> f [CodeRepositorySummary])
    -> [CodeRepositorySummary] -> f [CodeRepositorySummary])
-> ([CodeRepositorySummary] -> f [CodeRepositorySummary])
-> ListCodeRepositoriesResponse
-> f ListCodeRepositoriesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([CodeRepositorySummary] -> f [CodeRepositorySummary])
-> [CodeRepositorySummary] -> f [CodeRepositorySummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListCodeRepositoriesResponse