{-# 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.ListEndpointConfigs
(
ListEndpointConfigs (..),
newListEndpointConfigs,
listEndpointConfigs_nameContains,
listEndpointConfigs_creationTimeAfter,
listEndpointConfigs_nextToken,
listEndpointConfigs_sortOrder,
listEndpointConfigs_creationTimeBefore,
listEndpointConfigs_maxResults,
listEndpointConfigs_sortBy,
ListEndpointConfigsResponse (..),
newListEndpointConfigsResponse,
listEndpointConfigsResponse_nextToken,
listEndpointConfigsResponse_httpStatus,
listEndpointConfigsResponse_endpointConfigs,
)
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 ListEndpointConfigs = ListEndpointConfigs'
{
ListEndpointConfigs -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
ListEndpointConfigs -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
ListEndpointConfigs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListEndpointConfigs -> Maybe OrderKey
sortOrder :: Prelude.Maybe OrderKey,
ListEndpointConfigs -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
ListEndpointConfigs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListEndpointConfigs -> Maybe EndpointConfigSortKey
sortBy :: Prelude.Maybe EndpointConfigSortKey
}
deriving (ListEndpointConfigs -> ListEndpointConfigs -> Bool
(ListEndpointConfigs -> ListEndpointConfigs -> Bool)
-> (ListEndpointConfigs -> ListEndpointConfigs -> Bool)
-> Eq ListEndpointConfigs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointConfigs -> ListEndpointConfigs -> Bool
$c/= :: ListEndpointConfigs -> ListEndpointConfigs -> Bool
== :: ListEndpointConfigs -> ListEndpointConfigs -> Bool
$c== :: ListEndpointConfigs -> ListEndpointConfigs -> Bool
Prelude.Eq, ReadPrec [ListEndpointConfigs]
ReadPrec ListEndpointConfigs
Int -> ReadS ListEndpointConfigs
ReadS [ListEndpointConfigs]
(Int -> ReadS ListEndpointConfigs)
-> ReadS [ListEndpointConfigs]
-> ReadPrec ListEndpointConfigs
-> ReadPrec [ListEndpointConfigs]
-> Read ListEndpointConfigs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointConfigs]
$creadListPrec :: ReadPrec [ListEndpointConfigs]
readPrec :: ReadPrec ListEndpointConfigs
$creadPrec :: ReadPrec ListEndpointConfigs
readList :: ReadS [ListEndpointConfigs]
$creadList :: ReadS [ListEndpointConfigs]
readsPrec :: Int -> ReadS ListEndpointConfigs
$creadsPrec :: Int -> ReadS ListEndpointConfigs
Prelude.Read, Int -> ListEndpointConfigs -> ShowS
[ListEndpointConfigs] -> ShowS
ListEndpointConfigs -> String
(Int -> ListEndpointConfigs -> ShowS)
-> (ListEndpointConfigs -> String)
-> ([ListEndpointConfigs] -> ShowS)
-> Show ListEndpointConfigs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointConfigs] -> ShowS
$cshowList :: [ListEndpointConfigs] -> ShowS
show :: ListEndpointConfigs -> String
$cshow :: ListEndpointConfigs -> String
showsPrec :: Int -> ListEndpointConfigs -> ShowS
$cshowsPrec :: Int -> ListEndpointConfigs -> ShowS
Prelude.Show, (forall x. ListEndpointConfigs -> Rep ListEndpointConfigs x)
-> (forall x. Rep ListEndpointConfigs x -> ListEndpointConfigs)
-> Generic ListEndpointConfigs
forall x. Rep ListEndpointConfigs x -> ListEndpointConfigs
forall x. ListEndpointConfigs -> Rep ListEndpointConfigs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEndpointConfigs x -> ListEndpointConfigs
$cfrom :: forall x. ListEndpointConfigs -> Rep ListEndpointConfigs x
Prelude.Generic)
newListEndpointConfigs ::
ListEndpointConfigs
newListEndpointConfigs :: ListEndpointConfigs
newListEndpointConfigs =
ListEndpointConfigs' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OrderKey
-> Maybe POSIX
-> Maybe Natural
-> Maybe EndpointConfigSortKey
-> ListEndpointConfigs
ListEndpointConfigs'
{ $sel:nameContains:ListEndpointConfigs' :: Maybe Text
nameContains =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeAfter:ListEndpointConfigs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListEndpointConfigs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListEndpointConfigs' :: Maybe OrderKey
sortOrder = Maybe OrderKey
forall a. Maybe a
Prelude.Nothing,
$sel:creationTimeBefore:ListEndpointConfigs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListEndpointConfigs' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListEndpointConfigs' :: Maybe EndpointConfigSortKey
sortBy = Maybe EndpointConfigSortKey
forall a. Maybe a
Prelude.Nothing
}
listEndpointConfigs_nameContains :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe Prelude.Text)
listEndpointConfigs_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_nameContains = (ListEndpointConfigs -> Maybe Text)
-> (ListEndpointConfigs -> Maybe Text -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs ListEndpointConfigs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe Text
a -> ListEndpointConfigs
s {$sel:nameContains:ListEndpointConfigs' :: Maybe Text
nameContains = Maybe Text
a} :: ListEndpointConfigs)
listEndpointConfigs_creationTimeAfter :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe Prelude.UTCTime)
listEndpointConfigs_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_creationTimeAfter = (ListEndpointConfigs -> Maybe POSIX)
-> (ListEndpointConfigs -> Maybe POSIX -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs ListEndpointConfigs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe POSIX
a -> ListEndpointConfigs
s {$sel:creationTimeAfter:ListEndpointConfigs' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListEndpointConfigs) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpointConfigs -> f ListEndpointConfigs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpointConfigs
-> f ListEndpointConfigs
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
listEndpointConfigs_nextToken :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe Prelude.Text)
listEndpointConfigs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_nextToken = (ListEndpointConfigs -> Maybe Text)
-> (ListEndpointConfigs -> Maybe Text -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs ListEndpointConfigs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe Text
a -> ListEndpointConfigs
s {$sel:nextToken:ListEndpointConfigs' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointConfigs)
listEndpointConfigs_sortOrder :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe OrderKey)
listEndpointConfigs_sortOrder :: (Maybe OrderKey -> f (Maybe OrderKey))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_sortOrder = (ListEndpointConfigs -> Maybe OrderKey)
-> (ListEndpointConfigs -> Maybe OrderKey -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs
ListEndpointConfigs
(Maybe OrderKey)
(Maybe OrderKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe OrderKey
sortOrder :: Maybe OrderKey
$sel:sortOrder:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe OrderKey
sortOrder} -> Maybe OrderKey
sortOrder) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe OrderKey
a -> ListEndpointConfigs
s {$sel:sortOrder:ListEndpointConfigs' :: Maybe OrderKey
sortOrder = Maybe OrderKey
a} :: ListEndpointConfigs)
listEndpointConfigs_creationTimeBefore :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe Prelude.UTCTime)
listEndpointConfigs_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_creationTimeBefore = (ListEndpointConfigs -> Maybe POSIX)
-> (ListEndpointConfigs -> Maybe POSIX -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs ListEndpointConfigs (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe POSIX
a -> ListEndpointConfigs
s {$sel:creationTimeBefore:ListEndpointConfigs' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListEndpointConfigs) ((Maybe POSIX -> f (Maybe POSIX))
-> ListEndpointConfigs -> f ListEndpointConfigs)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListEndpointConfigs
-> f ListEndpointConfigs
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
listEndpointConfigs_maxResults :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe Prelude.Natural)
listEndpointConfigs_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_maxResults = (ListEndpointConfigs -> Maybe Natural)
-> (ListEndpointConfigs -> Maybe Natural -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs
ListEndpointConfigs
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe Natural
a -> ListEndpointConfigs
s {$sel:maxResults:ListEndpointConfigs' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEndpointConfigs)
listEndpointConfigs_sortBy :: Lens.Lens' ListEndpointConfigs (Prelude.Maybe EndpointConfigSortKey)
listEndpointConfigs_sortBy :: (Maybe EndpointConfigSortKey -> f (Maybe EndpointConfigSortKey))
-> ListEndpointConfigs -> f ListEndpointConfigs
listEndpointConfigs_sortBy = (ListEndpointConfigs -> Maybe EndpointConfigSortKey)
-> (ListEndpointConfigs
-> Maybe EndpointConfigSortKey -> ListEndpointConfigs)
-> Lens
ListEndpointConfigs
ListEndpointConfigs
(Maybe EndpointConfigSortKey)
(Maybe EndpointConfigSortKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigs' {Maybe EndpointConfigSortKey
sortBy :: Maybe EndpointConfigSortKey
$sel:sortBy:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe EndpointConfigSortKey
sortBy} -> Maybe EndpointConfigSortKey
sortBy) (\s :: ListEndpointConfigs
s@ListEndpointConfigs' {} Maybe EndpointConfigSortKey
a -> ListEndpointConfigs
s {$sel:sortBy:ListEndpointConfigs' :: Maybe EndpointConfigSortKey
sortBy = Maybe EndpointConfigSortKey
a} :: ListEndpointConfigs)
instance Core.AWSPager ListEndpointConfigs where
page :: ListEndpointConfigs
-> AWSResponse ListEndpointConfigs -> Maybe ListEndpointConfigs
page ListEndpointConfigs
rq AWSResponse ListEndpointConfigs
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListEndpointConfigs
ListEndpointConfigsResponse
rs
ListEndpointConfigsResponse
-> Getting (First Text) ListEndpointConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointConfigsResponse
-> Const (First Text) ListEndpointConfigsResponse
Lens' ListEndpointConfigsResponse (Maybe Text)
listEndpointConfigsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointConfigsResponse
-> Const (First Text) ListEndpointConfigsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointConfigsResponse 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 ListEndpointConfigs
forall a. Maybe a
Prelude.Nothing
| [EndpointConfigSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListEndpointConfigs
ListEndpointConfigsResponse
rs
ListEndpointConfigsResponse
-> Getting
[EndpointConfigSummary]
ListEndpointConfigsResponse
[EndpointConfigSummary]
-> [EndpointConfigSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
[EndpointConfigSummary]
ListEndpointConfigsResponse
[EndpointConfigSummary]
Lens' ListEndpointConfigsResponse [EndpointConfigSummary]
listEndpointConfigsResponse_endpointConfigs
) =
Maybe ListEndpointConfigs
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListEndpointConfigs -> Maybe ListEndpointConfigs
forall a. a -> Maybe a
Prelude.Just (ListEndpointConfigs -> Maybe ListEndpointConfigs)
-> ListEndpointConfigs -> Maybe ListEndpointConfigs
forall a b. (a -> b) -> a -> b
Prelude.$
ListEndpointConfigs
rq
ListEndpointConfigs
-> (ListEndpointConfigs -> ListEndpointConfigs)
-> ListEndpointConfigs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEndpointConfigs -> Identity ListEndpointConfigs
Lens
ListEndpointConfigs ListEndpointConfigs (Maybe Text) (Maybe Text)
listEndpointConfigs_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListEndpointConfigs -> Identity ListEndpointConfigs)
-> Maybe Text -> ListEndpointConfigs -> ListEndpointConfigs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEndpointConfigs
ListEndpointConfigsResponse
rs
ListEndpointConfigsResponse
-> Getting (First Text) ListEndpointConfigsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointConfigsResponse
-> Const (First Text) ListEndpointConfigsResponse
Lens' ListEndpointConfigsResponse (Maybe Text)
listEndpointConfigsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListEndpointConfigsResponse
-> Const (First Text) ListEndpointConfigsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEndpointConfigsResponse 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 ListEndpointConfigs where
type
AWSResponse ListEndpointConfigs =
ListEndpointConfigsResponse
request :: ListEndpointConfigs -> Request ListEndpointConfigs
request = Service -> ListEndpointConfigs -> Request ListEndpointConfigs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListEndpointConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListEndpointConfigs)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListEndpointConfigs))
-> Logger
-> Service
-> Proxy ListEndpointConfigs
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListEndpointConfigs)))
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 -> [EndpointConfigSummary] -> ListEndpointConfigsResponse
ListEndpointConfigsResponse'
(Maybe Text
-> Int -> [EndpointConfigSummary] -> ListEndpointConfigsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int -> [EndpointConfigSummary] -> ListEndpointConfigsResponse)
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 -> [EndpointConfigSummary] -> ListEndpointConfigsResponse)
-> Either String Int
-> Either
String ([EndpointConfigSummary] -> ListEndpointConfigsResponse)
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 ([EndpointConfigSummary] -> ListEndpointConfigsResponse)
-> Either String [EndpointConfigSummary]
-> Either String ListEndpointConfigsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [EndpointConfigSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EndpointConfigs"
Either String (Maybe [EndpointConfigSummary])
-> [EndpointConfigSummary] -> Either String [EndpointConfigSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [EndpointConfigSummary]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListEndpointConfigs
instance Prelude.NFData ListEndpointConfigs
instance Core.ToHeaders ListEndpointConfigs where
toHeaders :: ListEndpointConfigs -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListEndpointConfigs -> 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.ListEndpointConfigs" ::
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 ListEndpointConfigs where
toJSON :: ListEndpointConfigs -> Value
toJSON ListEndpointConfigs' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe EndpointConfigSortKey
Maybe OrderKey
sortBy :: Maybe EndpointConfigSortKey
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
sortOrder :: Maybe OrderKey
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
nameContains :: Maybe Text
$sel:sortBy:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe EndpointConfigSortKey
$sel:maxResults:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe Natural
$sel:creationTimeBefore:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe POSIX
$sel:sortOrder:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe OrderKey
$sel:nextToken:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe Text
$sel:creationTimeAfter:ListEndpointConfigs' :: ListEndpointConfigs -> Maybe POSIX
$sel:nameContains:ListEndpointConfigs' :: ListEndpointConfigs -> 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
"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
"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 -> EndpointConfigSortKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EndpointConfigSortKey -> Pair)
-> Maybe EndpointConfigSortKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointConfigSortKey
sortBy
]
)
instance Core.ToPath ListEndpointConfigs where
toPath :: ListEndpointConfigs -> ByteString
toPath = ByteString -> ListEndpointConfigs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListEndpointConfigs where
toQuery :: ListEndpointConfigs -> QueryString
toQuery = QueryString -> ListEndpointConfigs -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListEndpointConfigsResponse = ListEndpointConfigsResponse'
{
ListEndpointConfigsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListEndpointConfigsResponse -> Int
httpStatus :: Prelude.Int,
ListEndpointConfigsResponse -> [EndpointConfigSummary]
endpointConfigs :: [EndpointConfigSummary]
}
deriving (ListEndpointConfigsResponse -> ListEndpointConfigsResponse -> Bool
(ListEndpointConfigsResponse
-> ListEndpointConfigsResponse -> Bool)
-> (ListEndpointConfigsResponse
-> ListEndpointConfigsResponse -> Bool)
-> Eq ListEndpointConfigsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEndpointConfigsResponse -> ListEndpointConfigsResponse -> Bool
$c/= :: ListEndpointConfigsResponse -> ListEndpointConfigsResponse -> Bool
== :: ListEndpointConfigsResponse -> ListEndpointConfigsResponse -> Bool
$c== :: ListEndpointConfigsResponse -> ListEndpointConfigsResponse -> Bool
Prelude.Eq, ReadPrec [ListEndpointConfigsResponse]
ReadPrec ListEndpointConfigsResponse
Int -> ReadS ListEndpointConfigsResponse
ReadS [ListEndpointConfigsResponse]
(Int -> ReadS ListEndpointConfigsResponse)
-> ReadS [ListEndpointConfigsResponse]
-> ReadPrec ListEndpointConfigsResponse
-> ReadPrec [ListEndpointConfigsResponse]
-> Read ListEndpointConfigsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEndpointConfigsResponse]
$creadListPrec :: ReadPrec [ListEndpointConfigsResponse]
readPrec :: ReadPrec ListEndpointConfigsResponse
$creadPrec :: ReadPrec ListEndpointConfigsResponse
readList :: ReadS [ListEndpointConfigsResponse]
$creadList :: ReadS [ListEndpointConfigsResponse]
readsPrec :: Int -> ReadS ListEndpointConfigsResponse
$creadsPrec :: Int -> ReadS ListEndpointConfigsResponse
Prelude.Read, Int -> ListEndpointConfigsResponse -> ShowS
[ListEndpointConfigsResponse] -> ShowS
ListEndpointConfigsResponse -> String
(Int -> ListEndpointConfigsResponse -> ShowS)
-> (ListEndpointConfigsResponse -> String)
-> ([ListEndpointConfigsResponse] -> ShowS)
-> Show ListEndpointConfigsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEndpointConfigsResponse] -> ShowS
$cshowList :: [ListEndpointConfigsResponse] -> ShowS
show :: ListEndpointConfigsResponse -> String
$cshow :: ListEndpointConfigsResponse -> String
showsPrec :: Int -> ListEndpointConfigsResponse -> ShowS
$cshowsPrec :: Int -> ListEndpointConfigsResponse -> ShowS
Prelude.Show, (forall x.
ListEndpointConfigsResponse -> Rep ListEndpointConfigsResponse x)
-> (forall x.
Rep ListEndpointConfigsResponse x -> ListEndpointConfigsResponse)
-> Generic ListEndpointConfigsResponse
forall x.
Rep ListEndpointConfigsResponse x -> ListEndpointConfigsResponse
forall x.
ListEndpointConfigsResponse -> Rep ListEndpointConfigsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEndpointConfigsResponse x -> ListEndpointConfigsResponse
$cfrom :: forall x.
ListEndpointConfigsResponse -> Rep ListEndpointConfigsResponse x
Prelude.Generic)
newListEndpointConfigsResponse ::
Prelude.Int ->
ListEndpointConfigsResponse
newListEndpointConfigsResponse :: Int -> ListEndpointConfigsResponse
newListEndpointConfigsResponse Int
pHttpStatus_ =
ListEndpointConfigsResponse' :: Maybe Text
-> Int -> [EndpointConfigSummary] -> ListEndpointConfigsResponse
ListEndpointConfigsResponse'
{ $sel:nextToken:ListEndpointConfigsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListEndpointConfigsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:endpointConfigs:ListEndpointConfigsResponse' :: [EndpointConfigSummary]
endpointConfigs = [EndpointConfigSummary]
forall a. Monoid a => a
Prelude.mempty
}
listEndpointConfigsResponse_nextToken :: Lens.Lens' ListEndpointConfigsResponse (Prelude.Maybe Prelude.Text)
listEndpointConfigsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEndpointConfigsResponse -> f ListEndpointConfigsResponse
listEndpointConfigsResponse_nextToken = (ListEndpointConfigsResponse -> Maybe Text)
-> (ListEndpointConfigsResponse
-> Maybe Text -> ListEndpointConfigsResponse)
-> Lens' ListEndpointConfigsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEndpointConfigsResponse' :: ListEndpointConfigsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEndpointConfigsResponse
s@ListEndpointConfigsResponse' {} Maybe Text
a -> ListEndpointConfigsResponse
s {$sel:nextToken:ListEndpointConfigsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEndpointConfigsResponse)
listEndpointConfigsResponse_httpStatus :: Lens.Lens' ListEndpointConfigsResponse Prelude.Int
listEndpointConfigsResponse_httpStatus :: (Int -> f Int)
-> ListEndpointConfigsResponse -> f ListEndpointConfigsResponse
listEndpointConfigsResponse_httpStatus = (ListEndpointConfigsResponse -> Int)
-> (ListEndpointConfigsResponse
-> Int -> ListEndpointConfigsResponse)
-> Lens
ListEndpointConfigsResponse ListEndpointConfigsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListEndpointConfigsResponse' :: ListEndpointConfigsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListEndpointConfigsResponse
s@ListEndpointConfigsResponse' {} Int
a -> ListEndpointConfigsResponse
s {$sel:httpStatus:ListEndpointConfigsResponse' :: Int
httpStatus = Int
a} :: ListEndpointConfigsResponse)
listEndpointConfigsResponse_endpointConfigs :: Lens.Lens' ListEndpointConfigsResponse [EndpointConfigSummary]
listEndpointConfigsResponse_endpointConfigs :: ([EndpointConfigSummary] -> f [EndpointConfigSummary])
-> ListEndpointConfigsResponse -> f ListEndpointConfigsResponse
listEndpointConfigsResponse_endpointConfigs = (ListEndpointConfigsResponse -> [EndpointConfigSummary])
-> (ListEndpointConfigsResponse
-> [EndpointConfigSummary] -> ListEndpointConfigsResponse)
-> Lens' ListEndpointConfigsResponse [EndpointConfigSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEndpointConfigsResponse' {[EndpointConfigSummary]
endpointConfigs :: [EndpointConfigSummary]
$sel:endpointConfigs:ListEndpointConfigsResponse' :: ListEndpointConfigsResponse -> [EndpointConfigSummary]
endpointConfigs} -> [EndpointConfigSummary]
endpointConfigs) (\s :: ListEndpointConfigsResponse
s@ListEndpointConfigsResponse' {} [EndpointConfigSummary]
a -> ListEndpointConfigsResponse
s {$sel:endpointConfigs:ListEndpointConfigsResponse' :: [EndpointConfigSummary]
endpointConfigs = [EndpointConfigSummary]
a} :: ListEndpointConfigsResponse) (([EndpointConfigSummary] -> f [EndpointConfigSummary])
-> ListEndpointConfigsResponse -> f ListEndpointConfigsResponse)
-> (([EndpointConfigSummary] -> f [EndpointConfigSummary])
-> [EndpointConfigSummary] -> f [EndpointConfigSummary])
-> ([EndpointConfigSummary] -> f [EndpointConfigSummary])
-> ListEndpointConfigsResponse
-> f ListEndpointConfigsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EndpointConfigSummary] -> f [EndpointConfigSummary])
-> [EndpointConfigSummary] -> f [EndpointConfigSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData ListEndpointConfigsResponse