{-# 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.ListCandidatesForAutoMLJob
  ( 
    ListCandidatesForAutoMLJob (..),
    newListCandidatesForAutoMLJob,
    
    listCandidatesForAutoMLJob_candidateNameEquals,
    listCandidatesForAutoMLJob_maxResults,
    listCandidatesForAutoMLJob_nextToken,
    listCandidatesForAutoMLJob_sortBy,
    listCandidatesForAutoMLJob_sortOrder,
    listCandidatesForAutoMLJob_statusEquals,
    listCandidatesForAutoMLJob_autoMLJobName,
    
    ListCandidatesForAutoMLJobResponse (..),
    newListCandidatesForAutoMLJobResponse,
    
    listCandidatesForAutoMLJobResponse_nextToken,
    listCandidatesForAutoMLJobResponse_httpStatus,
    listCandidatesForAutoMLJobResponse_candidates,
  )
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data ListCandidatesForAutoMLJob = ListCandidatesForAutoMLJob'
  { 
    ListCandidatesForAutoMLJob -> Maybe Text
candidateNameEquals :: Prelude.Maybe Prelude.Text,
    
    ListCandidatesForAutoMLJob -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    
    
    ListCandidatesForAutoMLJob -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    
    ListCandidatesForAutoMLJob -> Maybe CandidateSortBy
sortBy :: Prelude.Maybe CandidateSortBy,
    
    ListCandidatesForAutoMLJob -> Maybe AutoMLSortOrder
sortOrder :: Prelude.Maybe AutoMLSortOrder,
    
    ListCandidatesForAutoMLJob -> Maybe CandidateStatus
statusEquals :: Prelude.Maybe CandidateStatus,
    
    ListCandidatesForAutoMLJob -> Text
autoMLJobName :: Prelude.Text
  }
  deriving (ListCandidatesForAutoMLJob -> ListCandidatesForAutoMLJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCandidatesForAutoMLJob -> ListCandidatesForAutoMLJob -> Bool
$c/= :: ListCandidatesForAutoMLJob -> ListCandidatesForAutoMLJob -> Bool
== :: ListCandidatesForAutoMLJob -> ListCandidatesForAutoMLJob -> Bool
$c== :: ListCandidatesForAutoMLJob -> ListCandidatesForAutoMLJob -> Bool
Prelude.Eq, ReadPrec [ListCandidatesForAutoMLJob]
ReadPrec ListCandidatesForAutoMLJob
Int -> ReadS ListCandidatesForAutoMLJob
ReadS [ListCandidatesForAutoMLJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCandidatesForAutoMLJob]
$creadListPrec :: ReadPrec [ListCandidatesForAutoMLJob]
readPrec :: ReadPrec ListCandidatesForAutoMLJob
$creadPrec :: ReadPrec ListCandidatesForAutoMLJob
readList :: ReadS [ListCandidatesForAutoMLJob]
$creadList :: ReadS [ListCandidatesForAutoMLJob]
readsPrec :: Int -> ReadS ListCandidatesForAutoMLJob
$creadsPrec :: Int -> ReadS ListCandidatesForAutoMLJob
Prelude.Read, Int -> ListCandidatesForAutoMLJob -> ShowS
[ListCandidatesForAutoMLJob] -> ShowS
ListCandidatesForAutoMLJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCandidatesForAutoMLJob] -> ShowS
$cshowList :: [ListCandidatesForAutoMLJob] -> ShowS
show :: ListCandidatesForAutoMLJob -> String
$cshow :: ListCandidatesForAutoMLJob -> String
showsPrec :: Int -> ListCandidatesForAutoMLJob -> ShowS
$cshowsPrec :: Int -> ListCandidatesForAutoMLJob -> ShowS
Prelude.Show, forall x.
Rep ListCandidatesForAutoMLJob x -> ListCandidatesForAutoMLJob
forall x.
ListCandidatesForAutoMLJob -> Rep ListCandidatesForAutoMLJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCandidatesForAutoMLJob x -> ListCandidatesForAutoMLJob
$cfrom :: forall x.
ListCandidatesForAutoMLJob -> Rep ListCandidatesForAutoMLJob x
Prelude.Generic)
newListCandidatesForAutoMLJob ::
  
  Prelude.Text ->
  ListCandidatesForAutoMLJob
newListCandidatesForAutoMLJob :: Text -> ListCandidatesForAutoMLJob
newListCandidatesForAutoMLJob Text
pAutoMLJobName_ =
  ListCandidatesForAutoMLJob'
    { $sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: Maybe Text
candidateNameEquals =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListCandidatesForAutoMLJob' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCandidatesForAutoMLJob' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListCandidatesForAutoMLJob' :: Maybe CandidateSortBy
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListCandidatesForAutoMLJob' :: Maybe AutoMLSortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListCandidatesForAutoMLJob' :: Maybe CandidateStatus
statusEquals = forall a. Maybe a
Prelude.Nothing,
      $sel:autoMLJobName:ListCandidatesForAutoMLJob' :: Text
autoMLJobName = Text
pAutoMLJobName_
    }
listCandidatesForAutoMLJob_candidateNameEquals :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe Prelude.Text)
listCandidatesForAutoMLJob_candidateNameEquals :: Lens' ListCandidatesForAutoMLJob (Maybe Text)
listCandidatesForAutoMLJob_candidateNameEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe Text
candidateNameEquals :: Maybe Text
$sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
candidateNameEquals} -> Maybe Text
candidateNameEquals) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe Text
a -> ListCandidatesForAutoMLJob
s {$sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: Maybe Text
candidateNameEquals = Maybe Text
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_maxResults :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe Prelude.Natural)
listCandidatesForAutoMLJob_maxResults :: Lens' ListCandidatesForAutoMLJob (Maybe Natural)
listCandidatesForAutoMLJob_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe Natural
a -> ListCandidatesForAutoMLJob
s {$sel:maxResults:ListCandidatesForAutoMLJob' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_nextToken :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe Prelude.Text)
listCandidatesForAutoMLJob_nextToken :: Lens' ListCandidatesForAutoMLJob (Maybe Text)
listCandidatesForAutoMLJob_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe Text
a -> ListCandidatesForAutoMLJob
s {$sel:nextToken:ListCandidatesForAutoMLJob' :: Maybe Text
nextToken = Maybe Text
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_sortBy :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe CandidateSortBy)
listCandidatesForAutoMLJob_sortBy :: Lens' ListCandidatesForAutoMLJob (Maybe CandidateSortBy)
listCandidatesForAutoMLJob_sortBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe CandidateSortBy
sortBy :: Maybe CandidateSortBy
$sel:sortBy:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateSortBy
sortBy} -> Maybe CandidateSortBy
sortBy) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe CandidateSortBy
a -> ListCandidatesForAutoMLJob
s {$sel:sortBy:ListCandidatesForAutoMLJob' :: Maybe CandidateSortBy
sortBy = Maybe CandidateSortBy
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_sortOrder :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe AutoMLSortOrder)
listCandidatesForAutoMLJob_sortOrder :: Lens' ListCandidatesForAutoMLJob (Maybe AutoMLSortOrder)
listCandidatesForAutoMLJob_sortOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe AutoMLSortOrder
sortOrder :: Maybe AutoMLSortOrder
$sel:sortOrder:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe AutoMLSortOrder
sortOrder} -> Maybe AutoMLSortOrder
sortOrder) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe AutoMLSortOrder
a -> ListCandidatesForAutoMLJob
s {$sel:sortOrder:ListCandidatesForAutoMLJob' :: Maybe AutoMLSortOrder
sortOrder = Maybe AutoMLSortOrder
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_statusEquals :: Lens.Lens' ListCandidatesForAutoMLJob (Prelude.Maybe CandidateStatus)
listCandidatesForAutoMLJob_statusEquals :: Lens' ListCandidatesForAutoMLJob (Maybe CandidateStatus)
listCandidatesForAutoMLJob_statusEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Maybe CandidateStatus
statusEquals :: Maybe CandidateStatus
$sel:statusEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateStatus
statusEquals} -> Maybe CandidateStatus
statusEquals) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Maybe CandidateStatus
a -> ListCandidatesForAutoMLJob
s {$sel:statusEquals:ListCandidatesForAutoMLJob' :: Maybe CandidateStatus
statusEquals = Maybe CandidateStatus
a} :: ListCandidatesForAutoMLJob)
listCandidatesForAutoMLJob_autoMLJobName :: Lens.Lens' ListCandidatesForAutoMLJob Prelude.Text
listCandidatesForAutoMLJob_autoMLJobName :: Lens' ListCandidatesForAutoMLJob Text
listCandidatesForAutoMLJob_autoMLJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJob' {Text
autoMLJobName :: Text
$sel:autoMLJobName:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Text
autoMLJobName} -> Text
autoMLJobName) (\s :: ListCandidatesForAutoMLJob
s@ListCandidatesForAutoMLJob' {} Text
a -> ListCandidatesForAutoMLJob
s {$sel:autoMLJobName:ListCandidatesForAutoMLJob' :: Text
autoMLJobName = Text
a} :: ListCandidatesForAutoMLJob)
instance Core.AWSPager ListCandidatesForAutoMLJob where
  page :: ListCandidatesForAutoMLJob
-> AWSResponse ListCandidatesForAutoMLJob
-> Maybe ListCandidatesForAutoMLJob
page ListCandidatesForAutoMLJob
rq AWSResponse ListCandidatesForAutoMLJob
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCandidatesForAutoMLJob
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCandidatesForAutoMLJobResponse (Maybe Text)
listCandidatesForAutoMLJobResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCandidatesForAutoMLJob
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListCandidatesForAutoMLJobResponse [AutoMLCandidate]
listCandidatesForAutoMLJobResponse_candidates
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListCandidatesForAutoMLJob
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListCandidatesForAutoMLJob (Maybe Text)
listCandidatesForAutoMLJob_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCandidatesForAutoMLJob
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCandidatesForAutoMLJobResponse (Maybe Text)
listCandidatesForAutoMLJobResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListCandidatesForAutoMLJob where
  type
    AWSResponse ListCandidatesForAutoMLJob =
      ListCandidatesForAutoMLJobResponse
  request :: (Service -> Service)
-> ListCandidatesForAutoMLJob -> Request ListCandidatesForAutoMLJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListCandidatesForAutoMLJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListCandidatesForAutoMLJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Int -> [AutoMLCandidate] -> ListCandidatesForAutoMLJobResponse
ListCandidatesForAutoMLJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Candidates" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
      )
instance Prelude.Hashable ListCandidatesForAutoMLJob where
  hashWithSalt :: Int -> ListCandidatesForAutoMLJob -> Int
hashWithSalt Int
_salt ListCandidatesForAutoMLJob' {Maybe Natural
Maybe Text
Maybe AutoMLSortOrder
Maybe CandidateSortBy
Maybe CandidateStatus
Text
autoMLJobName :: Text
statusEquals :: Maybe CandidateStatus
sortOrder :: Maybe AutoMLSortOrder
sortBy :: Maybe CandidateSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
candidateNameEquals :: Maybe Text
$sel:autoMLJobName:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Text
$sel:statusEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateStatus
$sel:sortOrder:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe AutoMLSortOrder
$sel:sortBy:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateSortBy
$sel:nextToken:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
$sel:maxResults:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Natural
$sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
candidateNameEquals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CandidateSortBy
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AutoMLSortOrder
sortOrder
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CandidateStatus
statusEquals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
autoMLJobName
instance Prelude.NFData ListCandidatesForAutoMLJob where
  rnf :: ListCandidatesForAutoMLJob -> ()
rnf ListCandidatesForAutoMLJob' {Maybe Natural
Maybe Text
Maybe AutoMLSortOrder
Maybe CandidateSortBy
Maybe CandidateStatus
Text
autoMLJobName :: Text
statusEquals :: Maybe CandidateStatus
sortOrder :: Maybe AutoMLSortOrder
sortBy :: Maybe CandidateSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
candidateNameEquals :: Maybe Text
$sel:autoMLJobName:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Text
$sel:statusEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateStatus
$sel:sortOrder:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe AutoMLSortOrder
$sel:sortBy:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateSortBy
$sel:nextToken:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
$sel:maxResults:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Natural
$sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
candidateNameEquals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CandidateSortBy
sortBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AutoMLSortOrder
sortOrder
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CandidateStatus
statusEquals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
autoMLJobName
instance Data.ToHeaders ListCandidatesForAutoMLJob where
  toHeaders :: ListCandidatesForAutoMLJob -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"SageMaker.ListCandidatesForAutoMLJob" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )
instance Data.ToJSON ListCandidatesForAutoMLJob where
  toJSON :: ListCandidatesForAutoMLJob -> Value
toJSON ListCandidatesForAutoMLJob' {Maybe Natural
Maybe Text
Maybe AutoMLSortOrder
Maybe CandidateSortBy
Maybe CandidateStatus
Text
autoMLJobName :: Text
statusEquals :: Maybe CandidateStatus
sortOrder :: Maybe AutoMLSortOrder
sortBy :: Maybe CandidateSortBy
nextToken :: Maybe Text
maxResults :: Maybe Natural
candidateNameEquals :: Maybe Text
$sel:autoMLJobName:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Text
$sel:statusEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateStatus
$sel:sortOrder:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe AutoMLSortOrder
$sel:sortBy:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe CandidateSortBy
$sel:nextToken:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
$sel:maxResults:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Natural
$sel:candidateNameEquals:ListCandidatesForAutoMLJob' :: ListCandidatesForAutoMLJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CandidateNameEquals" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
candidateNameEquals,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"SortBy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CandidateSortBy
sortBy,
            (Key
"SortOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoMLSortOrder
sortOrder,
            (Key
"StatusEquals" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CandidateStatus
statusEquals,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AutoMLJobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
autoMLJobName)
          ]
      )
instance Data.ToPath ListCandidatesForAutoMLJob where
  toPath :: ListCandidatesForAutoMLJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListCandidatesForAutoMLJob where
  toQuery :: ListCandidatesForAutoMLJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListCandidatesForAutoMLJobResponse = ListCandidatesForAutoMLJobResponse'
  { 
    
    ListCandidatesForAutoMLJobResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    
    ListCandidatesForAutoMLJobResponse -> Int
httpStatus :: Prelude.Int,
    
    ListCandidatesForAutoMLJobResponse -> [AutoMLCandidate]
candidates :: [AutoMLCandidate]
  }
  deriving (ListCandidatesForAutoMLJobResponse
-> ListCandidatesForAutoMLJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCandidatesForAutoMLJobResponse
-> ListCandidatesForAutoMLJobResponse -> Bool
$c/= :: ListCandidatesForAutoMLJobResponse
-> ListCandidatesForAutoMLJobResponse -> Bool
== :: ListCandidatesForAutoMLJobResponse
-> ListCandidatesForAutoMLJobResponse -> Bool
$c== :: ListCandidatesForAutoMLJobResponse
-> ListCandidatesForAutoMLJobResponse -> Bool
Prelude.Eq, ReadPrec [ListCandidatesForAutoMLJobResponse]
ReadPrec ListCandidatesForAutoMLJobResponse
Int -> ReadS ListCandidatesForAutoMLJobResponse
ReadS [ListCandidatesForAutoMLJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCandidatesForAutoMLJobResponse]
$creadListPrec :: ReadPrec [ListCandidatesForAutoMLJobResponse]
readPrec :: ReadPrec ListCandidatesForAutoMLJobResponse
$creadPrec :: ReadPrec ListCandidatesForAutoMLJobResponse
readList :: ReadS [ListCandidatesForAutoMLJobResponse]
$creadList :: ReadS [ListCandidatesForAutoMLJobResponse]
readsPrec :: Int -> ReadS ListCandidatesForAutoMLJobResponse
$creadsPrec :: Int -> ReadS ListCandidatesForAutoMLJobResponse
Prelude.Read, Int -> ListCandidatesForAutoMLJobResponse -> ShowS
[ListCandidatesForAutoMLJobResponse] -> ShowS
ListCandidatesForAutoMLJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCandidatesForAutoMLJobResponse] -> ShowS
$cshowList :: [ListCandidatesForAutoMLJobResponse] -> ShowS
show :: ListCandidatesForAutoMLJobResponse -> String
$cshow :: ListCandidatesForAutoMLJobResponse -> String
showsPrec :: Int -> ListCandidatesForAutoMLJobResponse -> ShowS
$cshowsPrec :: Int -> ListCandidatesForAutoMLJobResponse -> ShowS
Prelude.Show, forall x.
Rep ListCandidatesForAutoMLJobResponse x
-> ListCandidatesForAutoMLJobResponse
forall x.
ListCandidatesForAutoMLJobResponse
-> Rep ListCandidatesForAutoMLJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListCandidatesForAutoMLJobResponse x
-> ListCandidatesForAutoMLJobResponse
$cfrom :: forall x.
ListCandidatesForAutoMLJobResponse
-> Rep ListCandidatesForAutoMLJobResponse x
Prelude.Generic)
newListCandidatesForAutoMLJobResponse ::
  
  Prelude.Int ->
  ListCandidatesForAutoMLJobResponse
newListCandidatesForAutoMLJobResponse :: Int -> ListCandidatesForAutoMLJobResponse
newListCandidatesForAutoMLJobResponse Int
pHttpStatus_ =
  ListCandidatesForAutoMLJobResponse'
    { $sel:nextToken:ListCandidatesForAutoMLJobResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCandidatesForAutoMLJobResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:candidates:ListCandidatesForAutoMLJobResponse' :: [AutoMLCandidate]
candidates = forall a. Monoid a => a
Prelude.mempty
    }
listCandidatesForAutoMLJobResponse_nextToken :: Lens.Lens' ListCandidatesForAutoMLJobResponse (Prelude.Maybe Prelude.Text)
listCandidatesForAutoMLJobResponse_nextToken :: Lens' ListCandidatesForAutoMLJobResponse (Maybe Text)
listCandidatesForAutoMLJobResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJobResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCandidatesForAutoMLJobResponse
s@ListCandidatesForAutoMLJobResponse' {} Maybe Text
a -> ListCandidatesForAutoMLJobResponse
s {$sel:nextToken:ListCandidatesForAutoMLJobResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCandidatesForAutoMLJobResponse)
listCandidatesForAutoMLJobResponse_httpStatus :: Lens.Lens' ListCandidatesForAutoMLJobResponse Prelude.Int
listCandidatesForAutoMLJobResponse_httpStatus :: Lens' ListCandidatesForAutoMLJobResponse Int
listCandidatesForAutoMLJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListCandidatesForAutoMLJobResponse
s@ListCandidatesForAutoMLJobResponse' {} Int
a -> ListCandidatesForAutoMLJobResponse
s {$sel:httpStatus:ListCandidatesForAutoMLJobResponse' :: Int
httpStatus = Int
a} :: ListCandidatesForAutoMLJobResponse)
listCandidatesForAutoMLJobResponse_candidates :: Lens.Lens' ListCandidatesForAutoMLJobResponse [AutoMLCandidate]
listCandidatesForAutoMLJobResponse_candidates :: Lens' ListCandidatesForAutoMLJobResponse [AutoMLCandidate]
listCandidatesForAutoMLJobResponse_candidates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCandidatesForAutoMLJobResponse' {[AutoMLCandidate]
candidates :: [AutoMLCandidate]
$sel:candidates:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> [AutoMLCandidate]
candidates} -> [AutoMLCandidate]
candidates) (\s :: ListCandidatesForAutoMLJobResponse
s@ListCandidatesForAutoMLJobResponse' {} [AutoMLCandidate]
a -> ListCandidatesForAutoMLJobResponse
s {$sel:candidates:ListCandidatesForAutoMLJobResponse' :: [AutoMLCandidate]
candidates = [AutoMLCandidate]
a} :: ListCandidatesForAutoMLJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
  Prelude.NFData
    ListCandidatesForAutoMLJobResponse
  where
  rnf :: ListCandidatesForAutoMLJobResponse -> ()
rnf ListCandidatesForAutoMLJobResponse' {Int
[AutoMLCandidate]
Maybe Text
candidates :: [AutoMLCandidate]
httpStatus :: Int
nextToken :: Maybe Text
$sel:candidates:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> [AutoMLCandidate]
$sel:httpStatus:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> Int
$sel:nextToken:ListCandidatesForAutoMLJobResponse' :: ListCandidatesForAutoMLJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AutoMLCandidate]
candidates