{-# 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.ListEndpoints
(
ListEndpoints (..),
newListEndpoints,
listEndpoints_nameContains,
listEndpoints_lastModifiedTimeBefore,
listEndpoints_creationTimeAfter,
listEndpoints_nextToken,
listEndpoints_sortOrder,
listEndpoints_lastModifiedTimeAfter,
listEndpoints_creationTimeBefore,
listEndpoints_statusEquals,
listEndpoints_maxResults,
listEndpoints_sortBy,
ListEndpointsResponse (..),
newListEndpointsResponse,
listEndpointsResponse_nextToken,
listEndpointsResponse_httpStatus,
listEndpointsResponse_endpoints,
)
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 ListEndpoints = ListEndpoints'
{
ListEndpoints -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
ListEndpoints -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
ListEndpoints -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
ListEndpoints -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListEndpoints -> Maybe OrderKey
sortOrder :: Prelude.Maybe OrderKey,
ListEndpoints -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
ListEndpoints -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
ListEndpoints -> Maybe EndpointStatus
statusEquals :: Prelude.Maybe EndpointStatus,
ListEndpoints -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListEndpoints -> Maybe EndpointSortKey
sortBy :: Prelude.Maybe EndpointSortKey
}
deriving (ListEndpoints -> ListEndpoints -> Bool
(ListEndpoints -> ListEndpoints -> Bool)
-> (ListEndpoints -> ListEndpoints -> Bool) -> Eq ListEndpoints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpoints -> ListEndpoints -> Bool
$c/= :: ListEndpoints -> ListEndpoints -> Bool
== :: ListEndpoints -> ListEndpoints -> Bool
$c== :: ListEndpoints -> ListEndpoints -> Bool
Prelude.Eq, ReadPrec [ListEndpoints]
ReadPrec ListEndpoints
Int -> ReadS ListEndpoints
ReadS [ListEndpoints]
(Int -> ReadS ListEndpoints)
-> ReadS [ListEndpoints]
-> ReadPrec ListEndpoints
-> ReadPrec [ListEndpoints]
-> Read ListEndpoints
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpoints]
$creadListPrec :: ReadPrec [ListEndpoints]
readPrec :: ReadPrec ListEndpoints
$creadPrec :: ReadPrec ListEndpoints
readList :: ReadS [ListEndpoints]
$creadList :: ReadS [ListEndpoints]
readsPrec :: Int -> ReadS ListEndpoints
$creadsPrec :: Int -> ReadS ListEndpoints
Prelude.Read, Int -> ListEndpoints -> ShowS
[ListEndpoints] -> ShowS
ListEndpoints -> String
(Int -> ListEndpoints -> ShowS)
-> (ListEndpoints -> String)
-> ([ListEndpoints] -> ShowS)
-> Show ListEndpoints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpoints] -> ShowS
$cshowList :: [ListEndpoints] -> ShowS
show :: ListEndpoints -> String
$cshow :: ListEndpoints -> String
showsPrec :: Int -> ListEndpoints -> ShowS
$cshowsPrec :: Int -> ListEndpoints -> ShowS
Prelude.Show, (forall x. ListEndpoints -> Rep ListEndpoints x)
-> (forall x. Rep ListEndpoints x -> ListEndpoints)
-> Generic ListEndpoints
forall x. Rep ListEndpoints x -> ListEndpoints
forall x. ListEndpoints -> Rep ListEndpoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpoints x -> ListEndpoints
$cfrom :: forall x. ListEndpoints -> Rep ListEndpoints x
Prelude.Generic)
newListEndpoints ::
ListEndpoints
newListEndpoints :: ListEndpoints
newListEndpoints =
ListEndpoints' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe OrderKey
-> Maybe POSIX
-> Maybe POSIX
-> Maybe EndpointStatus
-> Maybe Natural
-> Maybe EndpointSortKey
-> ListEndpoints
ListEndpoints'
{ $sel:nameContains:ListEndpoints' :: Maybe Text
nameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTimeBefore:ListEndpoints' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeAfter:ListEndpoints' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListEndpoints' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListEndpoints' :: Maybe OrderKey
sortOrder = Maybe OrderKey
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTimeAfter:ListEndpoints' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeBefore:ListEndpoints' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:statusEquals:ListEndpoints' :: Maybe EndpointStatus
statusEquals = Maybe EndpointStatus
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListEndpoints' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListEndpoints' :: Maybe EndpointSortKey
sortBy = Maybe EndpointSortKey
forall a. Maybe a
Prelude.Nothing
}
listEndpoints_nameContains :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.Text)
listEndpoints_nameContains :: (Maybe Text -> f (Maybe Text)) -> ListEndpoints -> f ListEndpoints
listEndpoints_nameContains = (ListEndpoints -> Maybe Text)
-> (ListEndpoints -> Maybe Text -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListEndpoints' :: ListEndpoints -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe Text
a -> ListEndpoints
s {$sel:nameContains:ListEndpoints' :: Maybe Text
nameContains = Maybe Text
a} :: ListEndpoints)
listEndpoints_lastModifiedTimeBefore :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.UTCTime)
listEndpoints_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints -> f ListEndpoints
listEndpoints_lastModifiedTimeBefore = (ListEndpoints -> Maybe POSIX)
-> (ListEndpoints -> Maybe POSIX -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListEndpoints' :: ListEndpoints -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe POSIX
a -> ListEndpoints
s {$sel:lastModifiedTimeBefore:ListEndpoints' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListEndpoints) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpoints -> f ListEndpoints)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints
-> f ListEndpoints
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
listEndpoints_creationTimeAfter :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.UTCTime)
listEndpoints_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints -> f ListEndpoints
listEndpoints_creationTimeAfter = (ListEndpoints -> Maybe POSIX)
-> (ListEndpoints -> Maybe POSIX -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListEndpoints' :: ListEndpoints -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe POSIX
a -> ListEndpoints
s {$sel:creationTimeAfter:ListEndpoints' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListEndpoints) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpoints -> f ListEndpoints)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints
-> f ListEndpoints
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
listEndpoints_nextToken :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.Text)
listEndpoints_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListEndpoints -> f ListEndpoints
listEndpoints_nextToken = (ListEndpoints -> Maybe Text)
-> (ListEndpoints -> Maybe Text -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpoints' :: ListEndpoints -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe Text
a -> ListEndpoints
s {$sel:nextToken:ListEndpoints' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpoints)
listEndpoints_sortOrder :: Lens.Lens' ListEndpoints (Prelude.Maybe OrderKey)
listEndpoints_sortOrder :: (Maybe OrderKey -> f (Maybe OrderKey))
-> ListEndpoints -> f ListEndpoints
listEndpoints_sortOrder = (ListEndpoints -> Maybe OrderKey)
-> (ListEndpoints -> Maybe OrderKey -> ListEndpoints)
-> Lens
ListEndpoints ListEndpoints (Maybe OrderKey) (Maybe OrderKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe OrderKey
sortOrder :: Maybe OrderKey
$sel:sortOrder:ListEndpoints' :: ListEndpoints -> Maybe OrderKey
sortOrder} -> Maybe OrderKey
sortOrder) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe OrderKey
a -> ListEndpoints
s {$sel:sortOrder:ListEndpoints' :: Maybe OrderKey
sortOrder = Maybe OrderKey
a} :: ListEndpoints)
listEndpoints_lastModifiedTimeAfter :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.UTCTime)
listEndpoints_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints -> f ListEndpoints
listEndpoints_lastModifiedTimeAfter = (ListEndpoints -> Maybe POSIX)
-> (ListEndpoints -> Maybe POSIX -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListEndpoints' :: ListEndpoints -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe POSIX
a -> ListEndpoints
s {$sel:lastModifiedTimeAfter:ListEndpoints' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListEndpoints) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpoints -> f ListEndpoints)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints
-> f ListEndpoints
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
listEndpoints_creationTimeBefore :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.UTCTime)
listEndpoints_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints -> f ListEndpoints
listEndpoints_creationTimeBefore = (ListEndpoints -> Maybe POSIX)
-> (ListEndpoints -> Maybe POSIX -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListEndpoints' :: ListEndpoints -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe POSIX
a -> ListEndpoints
s {$sel:creationTimeBefore:ListEndpoints' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListEndpoints) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpoints -> f ListEndpoints)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpoints
-> f ListEndpoints
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
listEndpoints_statusEquals :: Lens.Lens' ListEndpoints (Prelude.Maybe EndpointStatus)
listEndpoints_statusEquals :: (Maybe EndpointStatus -> f (Maybe EndpointStatus))
-> ListEndpoints -> f ListEndpoints
listEndpoints_statusEquals = (ListEndpoints -> Maybe EndpointStatus)
-> (ListEndpoints -> Maybe EndpointStatus -> ListEndpoints)
-> Lens
ListEndpoints
ListEndpoints
(Maybe EndpointStatus)
(Maybe EndpointStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe EndpointStatus
statusEquals :: Maybe EndpointStatus
$sel:statusEquals:ListEndpoints' :: ListEndpoints -> Maybe EndpointStatus
statusEquals} -> Maybe EndpointStatus
statusEquals) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe EndpointStatus
a -> ListEndpoints
s {$sel:statusEquals:ListEndpoints' :: Maybe EndpointStatus
statusEquals = Maybe EndpointStatus
a} :: ListEndpoints)
listEndpoints_maxResults :: Lens.Lens' ListEndpoints (Prelude.Maybe Prelude.Natural)
listEndpoints_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEndpoints -> f ListEndpoints
listEndpoints_maxResults = (ListEndpoints -> Maybe Natural)
-> (ListEndpoints -> Maybe Natural -> ListEndpoints)
-> Lens ListEndpoints ListEndpoints (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEndpoints' :: ListEndpoints -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe Natural
a -> ListEndpoints
s {$sel:maxResults:ListEndpoints' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEndpoints)
listEndpoints_sortBy :: Lens.Lens' ListEndpoints (Prelude.Maybe EndpointSortKey)
listEndpoints_sortBy :: (Maybe EndpointSortKey -> f (Maybe EndpointSortKey))
-> ListEndpoints -> f ListEndpoints
listEndpoints_sortBy = (ListEndpoints -> Maybe EndpointSortKey)
-> (ListEndpoints -> Maybe EndpointSortKey -> ListEndpoints)
-> Lens
ListEndpoints
ListEndpoints
(Maybe EndpointSortKey)
(Maybe EndpointSortKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpoints' {Maybe EndpointSortKey
sortBy :: Maybe EndpointSortKey
$sel:sortBy:ListEndpoints' :: ListEndpoints -> Maybe EndpointSortKey
sortBy} -> Maybe EndpointSortKey
sortBy) (\s :: ListEndpoints
s@ListEndpoints' {} Maybe EndpointSortKey
a -> ListEndpoints
s {$sel:sortBy:ListEndpoints' :: Maybe EndpointSortKey
sortBy = Maybe EndpointSortKey
a} :: ListEndpoints)
instance Core.AWSPager ListEndpoints where
page :: ListEndpoints -> AWSResponse ListEndpoints -> Maybe ListEndpoints
page ListEndpoints
rq AWSResponse ListEndpoints
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListEndpoints
ListEndpointsResponse
rs
ListEndpointsResponse
-> Getting (First Text) ListEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse
Lens' ListEndpointsResponse (Maybe Text)
listEndpointsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointsResponse 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 ListEndpoints
forall a. Maybe a
Prelude.Nothing
| [EndpointSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
(AWSResponse ListEndpoints
ListEndpointsResponse
rs ListEndpointsResponse
-> Getting
[EndpointSummary] ListEndpointsResponse [EndpointSummary]
-> [EndpointSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [EndpointSummary] ListEndpointsResponse [EndpointSummary]
Lens' ListEndpointsResponse [EndpointSummary]
listEndpointsResponse_endpoints) =
Maybe ListEndpoints
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListEndpoints -> Maybe ListEndpoints
forall a. a -> Maybe a
Prelude.Just (ListEndpoints -> Maybe ListEndpoints)
-> ListEndpoints -> Maybe ListEndpoints
forall a b. (a -> b) -> a -> b
Prelude.$
ListEndpoints
rq
ListEndpoints -> (ListEndpoints -> ListEndpoints) -> ListEndpoints
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEndpoints -> Identity ListEndpoints
Lens ListEndpoints ListEndpoints (Maybe Text) (Maybe Text)
listEndpoints_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListEndpoints -> Identity ListEndpoints)
-> Maybe Text -> ListEndpoints -> ListEndpoints
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEndpoints
ListEndpointsResponse
rs
ListEndpointsResponse
-> Getting (First Text) ListEndpointsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse
Lens' ListEndpointsResponse (Maybe Text)
listEndpointsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointsResponse
-> Const (First Text) ListEndpointsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointsResponse 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 ListEndpoints where
type
AWSResponse ListEndpoints =
ListEndpointsResponse
request :: ListEndpoints -> Request ListEndpoints
request = Service -> ListEndpoints -> Request ListEndpoints
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEndpoints)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListEndpoints))
-> Logger
-> Service
-> Proxy ListEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEndpoints)))
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 -> [EndpointSummary] -> ListEndpointsResponse
ListEndpointsResponse'
(Maybe Text -> Int -> [EndpointSummary] -> ListEndpointsResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> [EndpointSummary] -> ListEndpointsResponse)
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 -> [EndpointSummary] -> ListEndpointsResponse)
-> Either String Int
-> Either String ([EndpointSummary] -> ListEndpointsResponse)
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 ([EndpointSummary] -> ListEndpointsResponse)
-> Either String [EndpointSummary]
-> Either String ListEndpointsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [EndpointSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Endpoints" Either String (Maybe [EndpointSummary])
-> [EndpointSummary] -> Either String [EndpointSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [EndpointSummary]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ListEndpoints
instance Prelude.NFData ListEndpoints
instance Core.ToHeaders ListEndpoints where
toHeaders :: ListEndpoints -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListEndpoints -> 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.ListEndpoints" :: 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 ListEndpoints where
toJSON :: ListEndpoints -> Value
toJSON ListEndpoints' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe EndpointSortKey
Maybe EndpointStatus
Maybe OrderKey
sortBy :: Maybe EndpointSortKey
maxResults :: Maybe Natural
statusEquals :: Maybe EndpointStatus
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe OrderKey
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
nameContains :: Maybe Text
$sel:sortBy:ListEndpoints' :: ListEndpoints -> Maybe EndpointSortKey
$sel:maxResults:ListEndpoints' :: ListEndpoints -> Maybe Natural
$sel:statusEquals:ListEndpoints' :: ListEndpoints -> Maybe EndpointStatus
$sel:creationTimeBefore:ListEndpoints' :: ListEndpoints -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListEndpoints' :: ListEndpoints -> Maybe POSIX
$sel:sortOrder:ListEndpoints' :: ListEndpoints -> Maybe OrderKey
$sel:nextToken:ListEndpoints' :: ListEndpoints -> Maybe Text
$sel:creationTimeAfter:ListEndpoints' :: ListEndpoints -> Maybe POSIX
$sel:lastModifiedTimeBefore:ListEndpoints' :: ListEndpoints -> Maybe POSIX
$sel:nameContains:ListEndpoints' :: ListEndpoints -> 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 -> OrderKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OrderKey -> Pair) -> Maybe OrderKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrderKey
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
"StatusEquals" Text -> EndpointStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EndpointStatus -> Pair) -> Maybe EndpointStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointStatus
statusEquals,
(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 -> EndpointSortKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EndpointSortKey -> Pair) -> Maybe EndpointSortKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointSortKey
sortBy
]
)
instance Core.ToPath ListEndpoints where
toPath :: ListEndpoints -> ByteString
toPath = ByteString -> ListEndpoints -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListEndpoints where
toQuery :: ListEndpoints -> QueryString
toQuery = QueryString -> ListEndpoints -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListEndpointsResponse = ListEndpointsResponse'
{
ListEndpointsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListEndpointsResponse -> Int
httpStatus :: Prelude.Int,
ListEndpointsResponse -> [EndpointSummary]
endpoints :: [EndpointSummary]
}
deriving (ListEndpointsResponse -> ListEndpointsResponse -> Bool
(ListEndpointsResponse -> ListEndpointsResponse -> Bool)
-> (ListEndpointsResponse -> ListEndpointsResponse -> Bool)
-> Eq ListEndpointsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
$c/= :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
== :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
$c== :: ListEndpointsResponse -> ListEndpointsResponse -> Bool
Prelude.Eq, ReadPrec [ListEndpointsResponse]
ReadPrec ListEndpointsResponse
Int -> ReadS ListEndpointsResponse
ReadS [ListEndpointsResponse]
(Int -> ReadS ListEndpointsResponse)
-> ReadS [ListEndpointsResponse]
-> ReadPrec ListEndpointsResponse
-> ReadPrec [ListEndpointsResponse]
-> Read ListEndpointsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointsResponse]
$creadListPrec :: ReadPrec [ListEndpointsResponse]
readPrec :: ReadPrec ListEndpointsResponse
$creadPrec :: ReadPrec ListEndpointsResponse
readList :: ReadS [ListEndpointsResponse]
$creadList :: ReadS [ListEndpointsResponse]
readsPrec :: Int -> ReadS ListEndpointsResponse
$creadsPrec :: Int -> ReadS ListEndpointsResponse
Prelude.Read, Int -> ListEndpointsResponse -> ShowS
[ListEndpointsResponse] -> ShowS
ListEndpointsResponse -> String
(Int -> ListEndpointsResponse -> ShowS)
-> (ListEndpointsResponse -> String)
-> ([ListEndpointsResponse] -> ShowS)
-> Show ListEndpointsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointsResponse] -> ShowS
$cshowList :: [ListEndpointsResponse] -> ShowS
show :: ListEndpointsResponse -> String
$cshow :: ListEndpointsResponse -> String
showsPrec :: Int -> ListEndpointsResponse -> ShowS
$cshowsPrec :: Int -> ListEndpointsResponse -> ShowS
Prelude.Show, (forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x)
-> (forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse)
-> Generic ListEndpointsResponse
forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse
forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpointsResponse x -> ListEndpointsResponse
$cfrom :: forall x. ListEndpointsResponse -> Rep ListEndpointsResponse x
Prelude.Generic)
newListEndpointsResponse ::
Prelude.Int ->
ListEndpointsResponse
newListEndpointsResponse :: Int -> ListEndpointsResponse
newListEndpointsResponse Int
pHttpStatus_ =
ListEndpointsResponse' :: Maybe Text -> Int -> [EndpointSummary] -> ListEndpointsResponse
ListEndpointsResponse'
{ $sel:nextToken:ListEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListEndpointsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:endpoints:ListEndpointsResponse' :: [EndpointSummary]
endpoints = [EndpointSummary]
forall a. Monoid a => a
Prelude.mempty
}
listEndpointsResponse_nextToken :: Lens.Lens' ListEndpointsResponse (Prelude.Maybe Prelude.Text)
listEndpointsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEndpointsResponse -> f ListEndpointsResponse
listEndpointsResponse_nextToken = (ListEndpointsResponse -> Maybe Text)
-> (ListEndpointsResponse -> Maybe Text -> ListEndpointsResponse)
-> Lens' ListEndpointsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointsResponse' :: ListEndpointsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointsResponse
s@ListEndpointsResponse' {} Maybe Text
a -> ListEndpointsResponse
s {$sel:nextToken:ListEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointsResponse)
listEndpointsResponse_httpStatus :: Lens.Lens' ListEndpointsResponse Prelude.Int
listEndpointsResponse_httpStatus :: (Int -> f Int) -> ListEndpointsResponse -> f ListEndpointsResponse
listEndpointsResponse_httpStatus = (ListEndpointsResponse -> Int)
-> (ListEndpointsResponse -> Int -> ListEndpointsResponse)
-> Lens ListEndpointsResponse ListEndpointsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListEndpointsResponse' :: ListEndpointsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListEndpointsResponse
s@ListEndpointsResponse' {} Int
a -> ListEndpointsResponse
s {$sel:httpStatus:ListEndpointsResponse' :: Int
httpStatus = Int
a} :: ListEndpointsResponse)
listEndpointsResponse_endpoints :: Lens.Lens' ListEndpointsResponse [EndpointSummary]
listEndpointsResponse_endpoints :: ([EndpointSummary] -> f [EndpointSummary])
-> ListEndpointsResponse -> f ListEndpointsResponse
listEndpointsResponse_endpoints = (ListEndpointsResponse -> [EndpointSummary])
-> (ListEndpointsResponse
-> [EndpointSummary] -> ListEndpointsResponse)
-> Lens' ListEndpointsResponse [EndpointSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointsResponse' {[EndpointSummary]
endpoints :: [EndpointSummary]
$sel:endpoints:ListEndpointsResponse' :: ListEndpointsResponse -> [EndpointSummary]
endpoints} -> [EndpointSummary]
endpoints) (\s :: ListEndpointsResponse
s@ListEndpointsResponse' {} [EndpointSummary]
a -> ListEndpointsResponse
s {$sel:endpoints:ListEndpointsResponse' :: [EndpointSummary]
endpoints = [EndpointSummary]
a} :: ListEndpointsResponse) (([EndpointSummary] -> f [EndpointSummary])
-> ListEndpointsResponse -> f ListEndpointsResponse)
-> (([EndpointSummary] -> f [EndpointSummary])
-> [EndpointSummary] -> f [EndpointSummary])
-> ([EndpointSummary] -> f [EndpointSummary])
-> ListEndpointsResponse
-> f ListEndpointsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EndpointSummary] -> f [EndpointSummary])
-> [EndpointSummary] -> f [EndpointSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListEndpointsResponse