{-# 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 #-}
module Amazonka.SageMaker.ListCodeRepositories
(
ListCodeRepositories (..),
newListCodeRepositories,
listCodeRepositories_nameContains,
listCodeRepositories_lastModifiedTimeBefore,
listCodeRepositories_creationTimeAfter,
listCodeRepositories_nextToken,
listCodeRepositories_sortOrder,
listCodeRepositories_lastModifiedTimeAfter,
listCodeRepositories_creationTimeBefore,
listCodeRepositories_maxResults,
listCodeRepositories_sortBy,
ListCodeRepositoriesResponse (..),
newListCodeRepositoriesResponse,
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
data ListCodeRepositories = ListCodeRepositories'
{
ListCodeRepositories -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
ListCodeRepositories -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
ListCodeRepositories -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
ListCodeRepositories -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCodeRepositories -> Maybe CodeRepositorySortOrder
sortOrder :: Prelude.Maybe CodeRepositorySortOrder,
ListCodeRepositories -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
ListCodeRepositories -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
ListCodeRepositories -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
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)
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
}
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)
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
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
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)
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)
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
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
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)
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
data ListCodeRepositoriesResponse = ListCodeRepositoriesResponse'
{
ListCodeRepositoriesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListCodeRepositoriesResponse -> Int
httpStatus :: Prelude.Int,
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)
newListCodeRepositoriesResponse ::
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
}
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)
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)
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