{-# 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.ListTrialComponents
(
ListTrialComponents (..),
newListTrialComponents,
listTrialComponents_createdAfter,
listTrialComponents_sourceArn,
listTrialComponents_experimentName,
listTrialComponents_nextToken,
listTrialComponents_sortOrder,
listTrialComponents_trialName,
listTrialComponents_maxResults,
listTrialComponents_createdBefore,
listTrialComponents_sortBy,
ListTrialComponentsResponse (..),
newListTrialComponentsResponse,
listTrialComponentsResponse_trialComponentSummaries,
listTrialComponentsResponse_nextToken,
listTrialComponentsResponse_httpStatus,
)
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 ListTrialComponents = ListTrialComponents'
{
ListTrialComponents -> Maybe POSIX
createdAfter :: Prelude.Maybe Core.POSIX,
ListTrialComponents -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
ListTrialComponents -> Maybe Text
experimentName :: Prelude.Maybe Prelude.Text,
ListTrialComponents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTrialComponents -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
ListTrialComponents -> Maybe Text
trialName :: Prelude.Maybe Prelude.Text,
ListTrialComponents -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTrialComponents -> Maybe POSIX
createdBefore :: Prelude.Maybe Core.POSIX,
ListTrialComponents -> Maybe SortTrialComponentsBy
sortBy :: Prelude.Maybe SortTrialComponentsBy
}
deriving (ListTrialComponents -> ListTrialComponents -> Bool
(ListTrialComponents -> ListTrialComponents -> Bool)
-> (ListTrialComponents -> ListTrialComponents -> Bool)
-> Eq ListTrialComponents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrialComponents -> ListTrialComponents -> Bool
$c/= :: ListTrialComponents -> ListTrialComponents -> Bool
== :: ListTrialComponents -> ListTrialComponents -> Bool
$c== :: ListTrialComponents -> ListTrialComponents -> Bool
Prelude.Eq, ReadPrec [ListTrialComponents]
ReadPrec ListTrialComponents
Int -> ReadS ListTrialComponents
ReadS [ListTrialComponents]
(Int -> ReadS ListTrialComponents)
-> ReadS [ListTrialComponents]
-> ReadPrec ListTrialComponents
-> ReadPrec [ListTrialComponents]
-> Read ListTrialComponents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrialComponents]
$creadListPrec :: ReadPrec [ListTrialComponents]
readPrec :: ReadPrec ListTrialComponents
$creadPrec :: ReadPrec ListTrialComponents
readList :: ReadS [ListTrialComponents]
$creadList :: ReadS [ListTrialComponents]
readsPrec :: Int -> ReadS ListTrialComponents
$creadsPrec :: Int -> ReadS ListTrialComponents
Prelude.Read, Int -> ListTrialComponents -> ShowS
[ListTrialComponents] -> ShowS
ListTrialComponents -> String
(Int -> ListTrialComponents -> ShowS)
-> (ListTrialComponents -> String)
-> ([ListTrialComponents] -> ShowS)
-> Show ListTrialComponents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrialComponents] -> ShowS
$cshowList :: [ListTrialComponents] -> ShowS
show :: ListTrialComponents -> String
$cshow :: ListTrialComponents -> String
showsPrec :: Int -> ListTrialComponents -> ShowS
$cshowsPrec :: Int -> ListTrialComponents -> ShowS
Prelude.Show, (forall x. ListTrialComponents -> Rep ListTrialComponents x)
-> (forall x. Rep ListTrialComponents x -> ListTrialComponents)
-> Generic ListTrialComponents
forall x. Rep ListTrialComponents x -> ListTrialComponents
forall x. ListTrialComponents -> Rep ListTrialComponents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTrialComponents x -> ListTrialComponents
$cfrom :: forall x. ListTrialComponents -> Rep ListTrialComponents x
Prelude.Generic)
newListTrialComponents ::
ListTrialComponents
newListTrialComponents :: ListTrialComponents
newListTrialComponents =
ListTrialComponents' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe SortTrialComponentsBy
-> ListTrialComponents
ListTrialComponents'
{ $sel:createdAfter:ListTrialComponents' :: Maybe POSIX
createdAfter =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:ListTrialComponents' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:experimentName:ListTrialComponents' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTrialComponents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:ListTrialComponents' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:trialName:ListTrialComponents' :: Maybe Text
trialName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTrialComponents' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:createdBefore:ListTrialComponents' :: Maybe POSIX
createdBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:sortBy:ListTrialComponents' :: Maybe SortTrialComponentsBy
sortBy = Maybe SortTrialComponentsBy
forall a. Maybe a
Prelude.Nothing
}
listTrialComponents_createdAfter :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.UTCTime)
listTrialComponents_createdAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_createdAfter = (ListTrialComponents -> Maybe POSIX)
-> (ListTrialComponents -> Maybe POSIX -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe POSIX
createdAfter :: Maybe POSIX
$sel:createdAfter:ListTrialComponents' :: ListTrialComponents -> Maybe POSIX
createdAfter} -> Maybe POSIX
createdAfter) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe POSIX
a -> ListTrialComponents
s {$sel:createdAfter:ListTrialComponents' :: Maybe POSIX
createdAfter = Maybe POSIX
a} :: ListTrialComponents) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrialComponents -> f ListTrialComponents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrialComponents
-> f ListTrialComponents
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
listTrialComponents_sourceArn :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.Text)
listTrialComponents_sourceArn :: (Maybe Text -> f (Maybe Text))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_sourceArn = (ListTrialComponents -> Maybe Text)
-> (ListTrialComponents -> Maybe Text -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:ListTrialComponents' :: ListTrialComponents -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe Text
a -> ListTrialComponents
s {$sel:sourceArn:ListTrialComponents' :: Maybe Text
sourceArn = Maybe Text
a} :: ListTrialComponents)
listTrialComponents_experimentName :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.Text)
listTrialComponents_experimentName :: (Maybe Text -> f (Maybe Text))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_experimentName = (ListTrialComponents -> Maybe Text)
-> (ListTrialComponents -> Maybe Text -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe Text
experimentName :: Maybe Text
$sel:experimentName:ListTrialComponents' :: ListTrialComponents -> Maybe Text
experimentName} -> Maybe Text
experimentName) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe Text
a -> ListTrialComponents
s {$sel:experimentName:ListTrialComponents' :: Maybe Text
experimentName = Maybe Text
a} :: ListTrialComponents)
listTrialComponents_nextToken :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.Text)
listTrialComponents_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_nextToken = (ListTrialComponents -> Maybe Text)
-> (ListTrialComponents -> Maybe Text -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTrialComponents' :: ListTrialComponents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe Text
a -> ListTrialComponents
s {$sel:nextToken:ListTrialComponents' :: Maybe Text
nextToken = Maybe Text
a} :: ListTrialComponents)
listTrialComponents_sortOrder :: Lens.Lens' ListTrialComponents (Prelude.Maybe SortOrder)
listTrialComponents_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_sortOrder = (ListTrialComponents -> Maybe SortOrder)
-> (ListTrialComponents -> Maybe SortOrder -> ListTrialComponents)
-> Lens
ListTrialComponents
ListTrialComponents
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListTrialComponents' :: ListTrialComponents -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe SortOrder
a -> ListTrialComponents
s {$sel:sortOrder:ListTrialComponents' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListTrialComponents)
listTrialComponents_trialName :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.Text)
listTrialComponents_trialName :: (Maybe Text -> f (Maybe Text))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_trialName = (ListTrialComponents -> Maybe Text)
-> (ListTrialComponents -> Maybe Text -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe Text
trialName :: Maybe Text
$sel:trialName:ListTrialComponents' :: ListTrialComponents -> Maybe Text
trialName} -> Maybe Text
trialName) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe Text
a -> ListTrialComponents
s {$sel:trialName:ListTrialComponents' :: Maybe Text
trialName = Maybe Text
a} :: ListTrialComponents)
listTrialComponents_maxResults :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.Natural)
listTrialComponents_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_maxResults = (ListTrialComponents -> Maybe Natural)
-> (ListTrialComponents -> Maybe Natural -> ListTrialComponents)
-> Lens
ListTrialComponents
ListTrialComponents
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTrialComponents' :: ListTrialComponents -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe Natural
a -> ListTrialComponents
s {$sel:maxResults:ListTrialComponents' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTrialComponents)
listTrialComponents_createdBefore :: Lens.Lens' ListTrialComponents (Prelude.Maybe Prelude.UTCTime)
listTrialComponents_createdBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_createdBefore = (ListTrialComponents -> Maybe POSIX)
-> (ListTrialComponents -> Maybe POSIX -> ListTrialComponents)
-> Lens
ListTrialComponents ListTrialComponents (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe POSIX
createdBefore :: Maybe POSIX
$sel:createdBefore:ListTrialComponents' :: ListTrialComponents -> Maybe POSIX
createdBefore} -> Maybe POSIX
createdBefore) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe POSIX
a -> ListTrialComponents
s {$sel:createdBefore:ListTrialComponents' :: Maybe POSIX
createdBefore = Maybe POSIX
a} :: ListTrialComponents) ((Maybe POSIX -> f (Maybe POSIX))
-> ListTrialComponents -> f ListTrialComponents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListTrialComponents
-> f ListTrialComponents
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
listTrialComponents_sortBy :: Lens.Lens' ListTrialComponents (Prelude.Maybe SortTrialComponentsBy)
listTrialComponents_sortBy :: (Maybe SortTrialComponentsBy -> f (Maybe SortTrialComponentsBy))
-> ListTrialComponents -> f ListTrialComponents
listTrialComponents_sortBy = (ListTrialComponents -> Maybe SortTrialComponentsBy)
-> (ListTrialComponents
-> Maybe SortTrialComponentsBy -> ListTrialComponents)
-> Lens
ListTrialComponents
ListTrialComponents
(Maybe SortTrialComponentsBy)
(Maybe SortTrialComponentsBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponents' {Maybe SortTrialComponentsBy
sortBy :: Maybe SortTrialComponentsBy
$sel:sortBy:ListTrialComponents' :: ListTrialComponents -> Maybe SortTrialComponentsBy
sortBy} -> Maybe SortTrialComponentsBy
sortBy) (\s :: ListTrialComponents
s@ListTrialComponents' {} Maybe SortTrialComponentsBy
a -> ListTrialComponents
s {$sel:sortBy:ListTrialComponents' :: Maybe SortTrialComponentsBy
sortBy = Maybe SortTrialComponentsBy
a} :: ListTrialComponents)
instance Core.AWSPager ListTrialComponents where
page :: ListTrialComponents
-> AWSResponse ListTrialComponents -> Maybe ListTrialComponents
page ListTrialComponents
rq AWSResponse ListTrialComponents
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTrialComponents
ListTrialComponentsResponse
rs
ListTrialComponentsResponse
-> Getting (First Text) ListTrialComponentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrialComponentsResponse
-> Const (First Text) ListTrialComponentsResponse
Lens' ListTrialComponentsResponse (Maybe Text)
listTrialComponentsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrialComponentsResponse
-> Const (First Text) ListTrialComponentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTrialComponentsResponse 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 ListTrialComponents
forall a. Maybe a
Prelude.Nothing
| Maybe [TrialComponentSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTrialComponents
ListTrialComponentsResponse
rs
ListTrialComponentsResponse
-> Getting
(First [TrialComponentSummary])
ListTrialComponentsResponse
[TrialComponentSummary]
-> Maybe [TrialComponentSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [TrialComponentSummary]
-> Const
(First [TrialComponentSummary]) (Maybe [TrialComponentSummary]))
-> ListTrialComponentsResponse
-> Const
(First [TrialComponentSummary]) ListTrialComponentsResponse
Lens' ListTrialComponentsResponse (Maybe [TrialComponentSummary])
listTrialComponentsResponse_trialComponentSummaries
((Maybe [TrialComponentSummary]
-> Const
(First [TrialComponentSummary]) (Maybe [TrialComponentSummary]))
-> ListTrialComponentsResponse
-> Const
(First [TrialComponentSummary]) ListTrialComponentsResponse)
-> (([TrialComponentSummary]
-> Const (First [TrialComponentSummary]) [TrialComponentSummary])
-> Maybe [TrialComponentSummary]
-> Const
(First [TrialComponentSummary]) (Maybe [TrialComponentSummary]))
-> Getting
(First [TrialComponentSummary])
ListTrialComponentsResponse
[TrialComponentSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TrialComponentSummary]
-> Const (First [TrialComponentSummary]) [TrialComponentSummary])
-> Maybe [TrialComponentSummary]
-> Const
(First [TrialComponentSummary]) (Maybe [TrialComponentSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListTrialComponents
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTrialComponents -> Maybe ListTrialComponents
forall a. a -> Maybe a
Prelude.Just (ListTrialComponents -> Maybe ListTrialComponents)
-> ListTrialComponents -> Maybe ListTrialComponents
forall a b. (a -> b) -> a -> b
Prelude.$
ListTrialComponents
rq
ListTrialComponents
-> (ListTrialComponents -> ListTrialComponents)
-> ListTrialComponents
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTrialComponents -> Identity ListTrialComponents
Lens
ListTrialComponents ListTrialComponents (Maybe Text) (Maybe Text)
listTrialComponents_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTrialComponents -> Identity ListTrialComponents)
-> Maybe Text -> ListTrialComponents -> ListTrialComponents
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTrialComponents
ListTrialComponentsResponse
rs
ListTrialComponentsResponse
-> Getting (First Text) ListTrialComponentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrialComponentsResponse
-> Const (First Text) ListTrialComponentsResponse
Lens' ListTrialComponentsResponse (Maybe Text)
listTrialComponentsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTrialComponentsResponse
-> Const (First Text) ListTrialComponentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTrialComponentsResponse 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 ListTrialComponents where
type
AWSResponse ListTrialComponents =
ListTrialComponentsResponse
request :: ListTrialComponents -> Request ListTrialComponents
request = Service -> ListTrialComponents -> Request ListTrialComponents
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTrialComponents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTrialComponents)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTrialComponents))
-> Logger
-> Service
-> Proxy ListTrialComponents
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListTrialComponents)))
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 [TrialComponentSummary]
-> Maybe Text -> Int -> ListTrialComponentsResponse
ListTrialComponentsResponse'
(Maybe [TrialComponentSummary]
-> Maybe Text -> Int -> ListTrialComponentsResponse)
-> Either String (Maybe [TrialComponentSummary])
-> Either String (Maybe Text -> Int -> ListTrialComponentsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [TrialComponentSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrialComponentSummaries"
Either String (Maybe (Maybe [TrialComponentSummary]))
-> Maybe [TrialComponentSummary]
-> Either String (Maybe [TrialComponentSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TrialComponentSummary]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Maybe Text -> Int -> ListTrialComponentsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListTrialComponentsResponse)
forall (f :: * -> *) a b. Applicative f => 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 -> ListTrialComponentsResponse)
-> Either String Int -> Either String ListTrialComponentsResponse
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))
)
instance Prelude.Hashable ListTrialComponents
instance Prelude.NFData ListTrialComponents
instance Core.ToHeaders ListTrialComponents where
toHeaders :: ListTrialComponents -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTrialComponents -> 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.ListTrialComponents" ::
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 ListTrialComponents where
toJSON :: ListTrialComponents -> Value
toJSON ListTrialComponents' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortOrder
Maybe SortTrialComponentsBy
sortBy :: Maybe SortTrialComponentsBy
createdBefore :: Maybe POSIX
maxResults :: Maybe Natural
trialName :: Maybe Text
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
experimentName :: Maybe Text
sourceArn :: Maybe Text
createdAfter :: Maybe POSIX
$sel:sortBy:ListTrialComponents' :: ListTrialComponents -> Maybe SortTrialComponentsBy
$sel:createdBefore:ListTrialComponents' :: ListTrialComponents -> Maybe POSIX
$sel:maxResults:ListTrialComponents' :: ListTrialComponents -> Maybe Natural
$sel:trialName:ListTrialComponents' :: ListTrialComponents -> Maybe Text
$sel:sortOrder:ListTrialComponents' :: ListTrialComponents -> Maybe SortOrder
$sel:nextToken:ListTrialComponents' :: ListTrialComponents -> Maybe Text
$sel:experimentName:ListTrialComponents' :: ListTrialComponents -> Maybe Text
$sel:sourceArn:ListTrialComponents' :: ListTrialComponents -> Maybe Text
$sel:createdAfter:ListTrialComponents' :: ListTrialComponents -> Maybe POSIX
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CreatedAfter" 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
createdAfter,
(Text
"SourceArn" 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
sourceArn,
(Text
"ExperimentName" 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
experimentName,
(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 -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
(Text
"TrialName" 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
trialName,
(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
"CreatedBefore" 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
createdBefore,
(Text
"SortBy" Text -> SortTrialComponentsBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortTrialComponentsBy -> Pair)
-> Maybe SortTrialComponentsBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortTrialComponentsBy
sortBy
]
)
instance Core.ToPath ListTrialComponents where
toPath :: ListTrialComponents -> ByteString
toPath = ByteString -> ListTrialComponents -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListTrialComponents where
toQuery :: ListTrialComponents -> QueryString
toQuery = QueryString -> ListTrialComponents -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTrialComponentsResponse = ListTrialComponentsResponse'
{
ListTrialComponentsResponse -> Maybe [TrialComponentSummary]
trialComponentSummaries :: Prelude.Maybe [TrialComponentSummary],
ListTrialComponentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTrialComponentsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListTrialComponentsResponse -> ListTrialComponentsResponse -> Bool
(ListTrialComponentsResponse
-> ListTrialComponentsResponse -> Bool)
-> (ListTrialComponentsResponse
-> ListTrialComponentsResponse -> Bool)
-> Eq ListTrialComponentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrialComponentsResponse -> ListTrialComponentsResponse -> Bool
$c/= :: ListTrialComponentsResponse -> ListTrialComponentsResponse -> Bool
== :: ListTrialComponentsResponse -> ListTrialComponentsResponse -> Bool
$c== :: ListTrialComponentsResponse -> ListTrialComponentsResponse -> Bool
Prelude.Eq, ReadPrec [ListTrialComponentsResponse]
ReadPrec ListTrialComponentsResponse
Int -> ReadS ListTrialComponentsResponse
ReadS [ListTrialComponentsResponse]
(Int -> ReadS ListTrialComponentsResponse)
-> ReadS [ListTrialComponentsResponse]
-> ReadPrec ListTrialComponentsResponse
-> ReadPrec [ListTrialComponentsResponse]
-> Read ListTrialComponentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrialComponentsResponse]
$creadListPrec :: ReadPrec [ListTrialComponentsResponse]
readPrec :: ReadPrec ListTrialComponentsResponse
$creadPrec :: ReadPrec ListTrialComponentsResponse
readList :: ReadS [ListTrialComponentsResponse]
$creadList :: ReadS [ListTrialComponentsResponse]
readsPrec :: Int -> ReadS ListTrialComponentsResponse
$creadsPrec :: Int -> ReadS ListTrialComponentsResponse
Prelude.Read, Int -> ListTrialComponentsResponse -> ShowS
[ListTrialComponentsResponse] -> ShowS
ListTrialComponentsResponse -> String
(Int -> ListTrialComponentsResponse -> ShowS)
-> (ListTrialComponentsResponse -> String)
-> ([ListTrialComponentsResponse] -> ShowS)
-> Show ListTrialComponentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrialComponentsResponse] -> ShowS
$cshowList :: [ListTrialComponentsResponse] -> ShowS
show :: ListTrialComponentsResponse -> String
$cshow :: ListTrialComponentsResponse -> String
showsPrec :: Int -> ListTrialComponentsResponse -> ShowS
$cshowsPrec :: Int -> ListTrialComponentsResponse -> ShowS
Prelude.Show, (forall x.
ListTrialComponentsResponse -> Rep ListTrialComponentsResponse x)
-> (forall x.
Rep ListTrialComponentsResponse x -> ListTrialComponentsResponse)
-> Generic ListTrialComponentsResponse
forall x.
Rep ListTrialComponentsResponse x -> ListTrialComponentsResponse
forall x.
ListTrialComponentsResponse -> Rep ListTrialComponentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrialComponentsResponse x -> ListTrialComponentsResponse
$cfrom :: forall x.
ListTrialComponentsResponse -> Rep ListTrialComponentsResponse x
Prelude.Generic)
newListTrialComponentsResponse ::
Prelude.Int ->
ListTrialComponentsResponse
newListTrialComponentsResponse :: Int -> ListTrialComponentsResponse
newListTrialComponentsResponse Int
pHttpStatus_ =
ListTrialComponentsResponse' :: Maybe [TrialComponentSummary]
-> Maybe Text -> Int -> ListTrialComponentsResponse
ListTrialComponentsResponse'
{ $sel:trialComponentSummaries:ListTrialComponentsResponse' :: Maybe [TrialComponentSummary]
trialComponentSummaries =
Maybe [TrialComponentSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTrialComponentsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTrialComponentsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listTrialComponentsResponse_trialComponentSummaries :: Lens.Lens' ListTrialComponentsResponse (Prelude.Maybe [TrialComponentSummary])
listTrialComponentsResponse_trialComponentSummaries :: (Maybe [TrialComponentSummary]
-> f (Maybe [TrialComponentSummary]))
-> ListTrialComponentsResponse -> f ListTrialComponentsResponse
listTrialComponentsResponse_trialComponentSummaries = (ListTrialComponentsResponse -> Maybe [TrialComponentSummary])
-> (ListTrialComponentsResponse
-> Maybe [TrialComponentSummary] -> ListTrialComponentsResponse)
-> Lens'
ListTrialComponentsResponse (Maybe [TrialComponentSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponentsResponse' {Maybe [TrialComponentSummary]
trialComponentSummaries :: Maybe [TrialComponentSummary]
$sel:trialComponentSummaries:ListTrialComponentsResponse' :: ListTrialComponentsResponse -> Maybe [TrialComponentSummary]
trialComponentSummaries} -> Maybe [TrialComponentSummary]
trialComponentSummaries) (\s :: ListTrialComponentsResponse
s@ListTrialComponentsResponse' {} Maybe [TrialComponentSummary]
a -> ListTrialComponentsResponse
s {$sel:trialComponentSummaries:ListTrialComponentsResponse' :: Maybe [TrialComponentSummary]
trialComponentSummaries = Maybe [TrialComponentSummary]
a} :: ListTrialComponentsResponse) ((Maybe [TrialComponentSummary]
-> f (Maybe [TrialComponentSummary]))
-> ListTrialComponentsResponse -> f ListTrialComponentsResponse)
-> ((Maybe [TrialComponentSummary]
-> f (Maybe [TrialComponentSummary]))
-> Maybe [TrialComponentSummary]
-> f (Maybe [TrialComponentSummary]))
-> (Maybe [TrialComponentSummary]
-> f (Maybe [TrialComponentSummary]))
-> ListTrialComponentsResponse
-> f ListTrialComponentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TrialComponentSummary]
[TrialComponentSummary]
[TrialComponentSummary]
[TrialComponentSummary]
-> Iso
(Maybe [TrialComponentSummary])
(Maybe [TrialComponentSummary])
(Maybe [TrialComponentSummary])
(Maybe [TrialComponentSummary])
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
[TrialComponentSummary]
[TrialComponentSummary]
[TrialComponentSummary]
[TrialComponentSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTrialComponentsResponse_nextToken :: Lens.Lens' ListTrialComponentsResponse (Prelude.Maybe Prelude.Text)
listTrialComponentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTrialComponentsResponse -> f ListTrialComponentsResponse
listTrialComponentsResponse_nextToken = (ListTrialComponentsResponse -> Maybe Text)
-> (ListTrialComponentsResponse
-> Maybe Text -> ListTrialComponentsResponse)
-> Lens' ListTrialComponentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTrialComponentsResponse' :: ListTrialComponentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTrialComponentsResponse
s@ListTrialComponentsResponse' {} Maybe Text
a -> ListTrialComponentsResponse
s {$sel:nextToken:ListTrialComponentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTrialComponentsResponse)
listTrialComponentsResponse_httpStatus :: Lens.Lens' ListTrialComponentsResponse Prelude.Int
listTrialComponentsResponse_httpStatus :: (Int -> f Int)
-> ListTrialComponentsResponse -> f ListTrialComponentsResponse
listTrialComponentsResponse_httpStatus = (ListTrialComponentsResponse -> Int)
-> (ListTrialComponentsResponse
-> Int -> ListTrialComponentsResponse)
-> Lens
ListTrialComponentsResponse ListTrialComponentsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrialComponentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTrialComponentsResponse' :: ListTrialComponentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTrialComponentsResponse
s@ListTrialComponentsResponse' {} Int
a -> ListTrialComponentsResponse
s {$sel:httpStatus:ListTrialComponentsResponse' :: Int
httpStatus = Int
a} :: ListTrialComponentsResponse)
instance Prelude.NFData ListTrialComponentsResponse