{-# 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.MachineLearning.DescribeBatchPredictions
(
DescribeBatchPredictions (..),
newDescribeBatchPredictions,
describeBatchPredictions_eq,
describeBatchPredictions_ge,
describeBatchPredictions_prefix,
describeBatchPredictions_gt,
describeBatchPredictions_ne,
describeBatchPredictions_nextToken,
describeBatchPredictions_sortOrder,
describeBatchPredictions_limit,
describeBatchPredictions_lt,
describeBatchPredictions_filterVariable,
describeBatchPredictions_le,
DescribeBatchPredictionsResponse (..),
newDescribeBatchPredictionsResponse,
describeBatchPredictionsResponse_results,
describeBatchPredictionsResponse_nextToken,
describeBatchPredictionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeBatchPredictions = DescribeBatchPredictions'
{
DescribeBatchPredictions -> Maybe Text
eq :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe Text
ge :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe Text
gt :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe Text
ne :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
DescribeBatchPredictions -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeBatchPredictions -> Maybe Text
lt :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictions -> Maybe BatchPredictionFilterVariable
filterVariable :: Prelude.Maybe BatchPredictionFilterVariable,
DescribeBatchPredictions -> Maybe Text
le :: Prelude.Maybe Prelude.Text
}
deriving (DescribeBatchPredictions -> DescribeBatchPredictions -> Bool
(DescribeBatchPredictions -> DescribeBatchPredictions -> Bool)
-> (DescribeBatchPredictions -> DescribeBatchPredictions -> Bool)
-> Eq DescribeBatchPredictions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBatchPredictions -> DescribeBatchPredictions -> Bool
$c/= :: DescribeBatchPredictions -> DescribeBatchPredictions -> Bool
== :: DescribeBatchPredictions -> DescribeBatchPredictions -> Bool
$c== :: DescribeBatchPredictions -> DescribeBatchPredictions -> Bool
Prelude.Eq, ReadPrec [DescribeBatchPredictions]
ReadPrec DescribeBatchPredictions
Int -> ReadS DescribeBatchPredictions
ReadS [DescribeBatchPredictions]
(Int -> ReadS DescribeBatchPredictions)
-> ReadS [DescribeBatchPredictions]
-> ReadPrec DescribeBatchPredictions
-> ReadPrec [DescribeBatchPredictions]
-> Read DescribeBatchPredictions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBatchPredictions]
$creadListPrec :: ReadPrec [DescribeBatchPredictions]
readPrec :: ReadPrec DescribeBatchPredictions
$creadPrec :: ReadPrec DescribeBatchPredictions
readList :: ReadS [DescribeBatchPredictions]
$creadList :: ReadS [DescribeBatchPredictions]
readsPrec :: Int -> ReadS DescribeBatchPredictions
$creadsPrec :: Int -> ReadS DescribeBatchPredictions
Prelude.Read, Int -> DescribeBatchPredictions -> ShowS
[DescribeBatchPredictions] -> ShowS
DescribeBatchPredictions -> String
(Int -> DescribeBatchPredictions -> ShowS)
-> (DescribeBatchPredictions -> String)
-> ([DescribeBatchPredictions] -> ShowS)
-> Show DescribeBatchPredictions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBatchPredictions] -> ShowS
$cshowList :: [DescribeBatchPredictions] -> ShowS
show :: DescribeBatchPredictions -> String
$cshow :: DescribeBatchPredictions -> String
showsPrec :: Int -> DescribeBatchPredictions -> ShowS
$cshowsPrec :: Int -> DescribeBatchPredictions -> ShowS
Prelude.Show, (forall x.
DescribeBatchPredictions -> Rep DescribeBatchPredictions x)
-> (forall x.
Rep DescribeBatchPredictions x -> DescribeBatchPredictions)
-> Generic DescribeBatchPredictions
forall x.
Rep DescribeBatchPredictions x -> DescribeBatchPredictions
forall x.
DescribeBatchPredictions -> Rep DescribeBatchPredictions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBatchPredictions x -> DescribeBatchPredictions
$cfrom :: forall x.
DescribeBatchPredictions -> Rep DescribeBatchPredictions x
Prelude.Generic)
newDescribeBatchPredictions ::
DescribeBatchPredictions
newDescribeBatchPredictions :: DescribeBatchPredictions
newDescribeBatchPredictions =
DescribeBatchPredictions' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> Maybe BatchPredictionFilterVariable
-> Maybe Text
-> DescribeBatchPredictions
DescribeBatchPredictions'
{ $sel:eq:DescribeBatchPredictions' :: Maybe Text
eq = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ge:DescribeBatchPredictions' :: Maybe Text
ge = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:prefix:DescribeBatchPredictions' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gt:DescribeBatchPredictions' :: Maybe Text
gt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ne:DescribeBatchPredictions' :: Maybe Text
ne = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeBatchPredictions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:DescribeBatchPredictions' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeBatchPredictions' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:lt:DescribeBatchPredictions' :: Maybe Text
lt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filterVariable:DescribeBatchPredictions' :: Maybe BatchPredictionFilterVariable
filterVariable = Maybe BatchPredictionFilterVariable
forall a. Maybe a
Prelude.Nothing,
$sel:le:DescribeBatchPredictions' :: Maybe Text
le = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeBatchPredictions_eq :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_eq :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_eq = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
eq :: Maybe Text
$sel:eq:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
eq} -> Maybe Text
eq) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:eq:DescribeBatchPredictions' :: Maybe Text
eq = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_ge :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_ge :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_ge = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
ge :: Maybe Text
$sel:ge:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
ge} -> Maybe Text
ge) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:ge:DescribeBatchPredictions' :: Maybe Text
ge = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_prefix :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_prefix :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_prefix = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
prefix :: Maybe Text
$sel:prefix:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:prefix:DescribeBatchPredictions' :: Maybe Text
prefix = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_gt :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_gt :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_gt = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
gt :: Maybe Text
$sel:gt:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
gt} -> Maybe Text
gt) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:gt:DescribeBatchPredictions' :: Maybe Text
gt = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_ne :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_ne :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_ne = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
ne :: Maybe Text
$sel:ne:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
ne} -> Maybe Text
ne) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:ne:DescribeBatchPredictions' :: Maybe Text
ne = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_nextToken :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_nextToken = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:nextToken:DescribeBatchPredictions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_sortOrder :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe SortOrder)
describeBatchPredictions_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_sortOrder = (DescribeBatchPredictions -> Maybe SortOrder)
-> (DescribeBatchPredictions
-> Maybe SortOrder -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe SortOrder
a -> DescribeBatchPredictions
s {$sel:sortOrder:DescribeBatchPredictions' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: DescribeBatchPredictions)
describeBatchPredictions_limit :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Natural)
describeBatchPredictions_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_limit = (DescribeBatchPredictions -> Maybe Natural)
-> (DescribeBatchPredictions
-> Maybe Natural -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Natural
a -> DescribeBatchPredictions
s {$sel:limit:DescribeBatchPredictions' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeBatchPredictions)
describeBatchPredictions_lt :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_lt :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_lt = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
lt :: Maybe Text
$sel:lt:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
lt} -> Maybe Text
lt) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:lt:DescribeBatchPredictions' :: Maybe Text
lt = Maybe Text
a} :: DescribeBatchPredictions)
describeBatchPredictions_filterVariable :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe BatchPredictionFilterVariable)
describeBatchPredictions_filterVariable :: (Maybe BatchPredictionFilterVariable
-> f (Maybe BatchPredictionFilterVariable))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_filterVariable = (DescribeBatchPredictions -> Maybe BatchPredictionFilterVariable)
-> (DescribeBatchPredictions
-> Maybe BatchPredictionFilterVariable -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe BatchPredictionFilterVariable)
(Maybe BatchPredictionFilterVariable)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe BatchPredictionFilterVariable
filterVariable :: Maybe BatchPredictionFilterVariable
$sel:filterVariable:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe BatchPredictionFilterVariable
filterVariable} -> Maybe BatchPredictionFilterVariable
filterVariable) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe BatchPredictionFilterVariable
a -> DescribeBatchPredictions
s {$sel:filterVariable:DescribeBatchPredictions' :: Maybe BatchPredictionFilterVariable
filterVariable = Maybe BatchPredictionFilterVariable
a} :: DescribeBatchPredictions)
describeBatchPredictions_le :: Lens.Lens' DescribeBatchPredictions (Prelude.Maybe Prelude.Text)
describeBatchPredictions_le :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictions -> f DescribeBatchPredictions
describeBatchPredictions_le = (DescribeBatchPredictions -> Maybe Text)
-> (DescribeBatchPredictions
-> Maybe Text -> DescribeBatchPredictions)
-> Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictions' {Maybe Text
le :: Maybe Text
$sel:le:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
le} -> Maybe Text
le) (\s :: DescribeBatchPredictions
s@DescribeBatchPredictions' {} Maybe Text
a -> DescribeBatchPredictions
s {$sel:le:DescribeBatchPredictions' :: Maybe Text
le = Maybe Text
a} :: DescribeBatchPredictions)
instance Core.AWSPager DescribeBatchPredictions where
page :: DescribeBatchPredictions
-> AWSResponse DescribeBatchPredictions
-> Maybe DescribeBatchPredictions
page DescribeBatchPredictions
rq AWSResponse DescribeBatchPredictions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeBatchPredictions
DescribeBatchPredictionsResponse
rs
DescribeBatchPredictionsResponse
-> Getting (First Text) DescribeBatchPredictionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBatchPredictionsResponse
-> Const (First Text) DescribeBatchPredictionsResponse
Lens' DescribeBatchPredictionsResponse (Maybe Text)
describeBatchPredictionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBatchPredictionsResponse
-> Const (First Text) DescribeBatchPredictionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeBatchPredictionsResponse 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 DescribeBatchPredictions
forall a. Maybe a
Prelude.Nothing
| Maybe [BatchPrediction] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeBatchPredictions
DescribeBatchPredictionsResponse
rs
DescribeBatchPredictionsResponse
-> Getting
(First [BatchPrediction])
DescribeBatchPredictionsResponse
[BatchPrediction]
-> Maybe [BatchPrediction]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [BatchPrediction]
-> Const (First [BatchPrediction]) (Maybe [BatchPrediction]))
-> DescribeBatchPredictionsResponse
-> Const (First [BatchPrediction]) DescribeBatchPredictionsResponse
Lens' DescribeBatchPredictionsResponse (Maybe [BatchPrediction])
describeBatchPredictionsResponse_results
((Maybe [BatchPrediction]
-> Const (First [BatchPrediction]) (Maybe [BatchPrediction]))
-> DescribeBatchPredictionsResponse
-> Const
(First [BatchPrediction]) DescribeBatchPredictionsResponse)
-> (([BatchPrediction]
-> Const (First [BatchPrediction]) [BatchPrediction])
-> Maybe [BatchPrediction]
-> Const (First [BatchPrediction]) (Maybe [BatchPrediction]))
-> Getting
(First [BatchPrediction])
DescribeBatchPredictionsResponse
[BatchPrediction]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchPrediction]
-> Const (First [BatchPrediction]) [BatchPrediction])
-> Maybe [BatchPrediction]
-> Const (First [BatchPrediction]) (Maybe [BatchPrediction])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeBatchPredictions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeBatchPredictions -> Maybe DescribeBatchPredictions
forall a. a -> Maybe a
Prelude.Just (DescribeBatchPredictions -> Maybe DescribeBatchPredictions)
-> DescribeBatchPredictions -> Maybe DescribeBatchPredictions
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeBatchPredictions
rq
DescribeBatchPredictions
-> (DescribeBatchPredictions -> DescribeBatchPredictions)
-> DescribeBatchPredictions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeBatchPredictions -> Identity DescribeBatchPredictions
Lens
DescribeBatchPredictions
DescribeBatchPredictions
(Maybe Text)
(Maybe Text)
describeBatchPredictions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeBatchPredictions -> Identity DescribeBatchPredictions)
-> Maybe Text
-> DescribeBatchPredictions
-> DescribeBatchPredictions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeBatchPredictions
DescribeBatchPredictionsResponse
rs
DescribeBatchPredictionsResponse
-> Getting (First Text) DescribeBatchPredictionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBatchPredictionsResponse
-> Const (First Text) DescribeBatchPredictionsResponse
Lens' DescribeBatchPredictionsResponse (Maybe Text)
describeBatchPredictionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBatchPredictionsResponse
-> Const (First Text) DescribeBatchPredictionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeBatchPredictionsResponse 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 DescribeBatchPredictions where
type
AWSResponse DescribeBatchPredictions =
DescribeBatchPredictionsResponse
request :: DescribeBatchPredictions -> Request DescribeBatchPredictions
request = Service
-> DescribeBatchPredictions -> Request DescribeBatchPredictions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeBatchPredictions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeBatchPredictions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeBatchPredictions))
-> Logger
-> Service
-> Proxy DescribeBatchPredictions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeBatchPredictions)))
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 [BatchPrediction]
-> Maybe Text -> Int -> DescribeBatchPredictionsResponse
DescribeBatchPredictionsResponse'
(Maybe [BatchPrediction]
-> Maybe Text -> Int -> DescribeBatchPredictionsResponse)
-> Either String (Maybe [BatchPrediction])
-> Either
String (Maybe Text -> Int -> DescribeBatchPredictionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [BatchPrediction]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Results" Either String (Maybe (Maybe [BatchPrediction]))
-> Maybe [BatchPrediction]
-> Either String (Maybe [BatchPrediction])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BatchPrediction]
forall a. Monoid a => a
Prelude.mempty)
Either
String (Maybe Text -> Int -> DescribeBatchPredictionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeBatchPredictionsResponse)
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 -> DescribeBatchPredictionsResponse)
-> Either String Int
-> Either String DescribeBatchPredictionsResponse
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 DescribeBatchPredictions
instance Prelude.NFData DescribeBatchPredictions
instance Core.ToHeaders DescribeBatchPredictions where
toHeaders :: DescribeBatchPredictions -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeBatchPredictions -> 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
"AmazonML_20141212.DescribeBatchPredictions" ::
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 DescribeBatchPredictions where
toJSON :: DescribeBatchPredictions -> Value
toJSON DescribeBatchPredictions' {Maybe Natural
Maybe Text
Maybe BatchPredictionFilterVariable
Maybe SortOrder
le :: Maybe Text
filterVariable :: Maybe BatchPredictionFilterVariable
lt :: Maybe Text
limit :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
ne :: Maybe Text
gt :: Maybe Text
prefix :: Maybe Text
ge :: Maybe Text
eq :: Maybe Text
$sel:le:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:filterVariable:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe BatchPredictionFilterVariable
$sel:lt:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:limit:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Natural
$sel:sortOrder:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe SortOrder
$sel:nextToken:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:ne:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:gt:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:prefix:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:ge:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
$sel:eq:DescribeBatchPredictions' :: DescribeBatchPredictions -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EQ" 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
eq,
(Text
"GE" 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
ge,
(Text
"Prefix" 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
prefix,
(Text
"GT" 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
gt,
(Text
"NE" 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
ne,
(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
"Limit" 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
limit,
(Text
"LT" 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
lt,
(Text
"FilterVariable" Text -> BatchPredictionFilterVariable -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BatchPredictionFilterVariable -> Pair)
-> Maybe BatchPredictionFilterVariable -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchPredictionFilterVariable
filterVariable,
(Text
"LE" 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
le
]
)
instance Core.ToPath DescribeBatchPredictions where
toPath :: DescribeBatchPredictions -> ByteString
toPath = ByteString -> DescribeBatchPredictions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeBatchPredictions where
toQuery :: DescribeBatchPredictions -> QueryString
toQuery = QueryString -> DescribeBatchPredictions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeBatchPredictionsResponse = DescribeBatchPredictionsResponse'
{
DescribeBatchPredictionsResponse -> Maybe [BatchPrediction]
results :: Prelude.Maybe [BatchPrediction],
DescribeBatchPredictionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeBatchPredictionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool
(DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool)
-> (DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool)
-> Eq DescribeBatchPredictionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool
$c/= :: DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool
== :: DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool
$c== :: DescribeBatchPredictionsResponse
-> DescribeBatchPredictionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeBatchPredictionsResponse]
ReadPrec DescribeBatchPredictionsResponse
Int -> ReadS DescribeBatchPredictionsResponse
ReadS [DescribeBatchPredictionsResponse]
(Int -> ReadS DescribeBatchPredictionsResponse)
-> ReadS [DescribeBatchPredictionsResponse]
-> ReadPrec DescribeBatchPredictionsResponse
-> ReadPrec [DescribeBatchPredictionsResponse]
-> Read DescribeBatchPredictionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBatchPredictionsResponse]
$creadListPrec :: ReadPrec [DescribeBatchPredictionsResponse]
readPrec :: ReadPrec DescribeBatchPredictionsResponse
$creadPrec :: ReadPrec DescribeBatchPredictionsResponse
readList :: ReadS [DescribeBatchPredictionsResponse]
$creadList :: ReadS [DescribeBatchPredictionsResponse]
readsPrec :: Int -> ReadS DescribeBatchPredictionsResponse
$creadsPrec :: Int -> ReadS DescribeBatchPredictionsResponse
Prelude.Read, Int -> DescribeBatchPredictionsResponse -> ShowS
[DescribeBatchPredictionsResponse] -> ShowS
DescribeBatchPredictionsResponse -> String
(Int -> DescribeBatchPredictionsResponse -> ShowS)
-> (DescribeBatchPredictionsResponse -> String)
-> ([DescribeBatchPredictionsResponse] -> ShowS)
-> Show DescribeBatchPredictionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBatchPredictionsResponse] -> ShowS
$cshowList :: [DescribeBatchPredictionsResponse] -> ShowS
show :: DescribeBatchPredictionsResponse -> String
$cshow :: DescribeBatchPredictionsResponse -> String
showsPrec :: Int -> DescribeBatchPredictionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeBatchPredictionsResponse -> ShowS
Prelude.Show, (forall x.
DescribeBatchPredictionsResponse
-> Rep DescribeBatchPredictionsResponse x)
-> (forall x.
Rep DescribeBatchPredictionsResponse x
-> DescribeBatchPredictionsResponse)
-> Generic DescribeBatchPredictionsResponse
forall x.
Rep DescribeBatchPredictionsResponse x
-> DescribeBatchPredictionsResponse
forall x.
DescribeBatchPredictionsResponse
-> Rep DescribeBatchPredictionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBatchPredictionsResponse x
-> DescribeBatchPredictionsResponse
$cfrom :: forall x.
DescribeBatchPredictionsResponse
-> Rep DescribeBatchPredictionsResponse x
Prelude.Generic)
newDescribeBatchPredictionsResponse ::
Prelude.Int ->
DescribeBatchPredictionsResponse
newDescribeBatchPredictionsResponse :: Int -> DescribeBatchPredictionsResponse
newDescribeBatchPredictionsResponse Int
pHttpStatus_ =
DescribeBatchPredictionsResponse' :: Maybe [BatchPrediction]
-> Maybe Text -> Int -> DescribeBatchPredictionsResponse
DescribeBatchPredictionsResponse'
{ $sel:results:DescribeBatchPredictionsResponse' :: Maybe [BatchPrediction]
results =
Maybe [BatchPrediction]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeBatchPredictionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeBatchPredictionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeBatchPredictionsResponse_results :: Lens.Lens' DescribeBatchPredictionsResponse (Prelude.Maybe [BatchPrediction])
describeBatchPredictionsResponse_results :: (Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> DescribeBatchPredictionsResponse
-> f DescribeBatchPredictionsResponse
describeBatchPredictionsResponse_results = (DescribeBatchPredictionsResponse -> Maybe [BatchPrediction])
-> (DescribeBatchPredictionsResponse
-> Maybe [BatchPrediction] -> DescribeBatchPredictionsResponse)
-> Lens' DescribeBatchPredictionsResponse (Maybe [BatchPrediction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictionsResponse' {Maybe [BatchPrediction]
results :: Maybe [BatchPrediction]
$sel:results:DescribeBatchPredictionsResponse' :: DescribeBatchPredictionsResponse -> Maybe [BatchPrediction]
results} -> Maybe [BatchPrediction]
results) (\s :: DescribeBatchPredictionsResponse
s@DescribeBatchPredictionsResponse' {} Maybe [BatchPrediction]
a -> DescribeBatchPredictionsResponse
s {$sel:results:DescribeBatchPredictionsResponse' :: Maybe [BatchPrediction]
results = Maybe [BatchPrediction]
a} :: DescribeBatchPredictionsResponse) ((Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> DescribeBatchPredictionsResponse
-> f DescribeBatchPredictionsResponse)
-> ((Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> (Maybe [BatchPrediction] -> f (Maybe [BatchPrediction]))
-> DescribeBatchPredictionsResponse
-> f DescribeBatchPredictionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[BatchPrediction]
[BatchPrediction]
[BatchPrediction]
[BatchPrediction]
-> Iso
(Maybe [BatchPrediction])
(Maybe [BatchPrediction])
(Maybe [BatchPrediction])
(Maybe [BatchPrediction])
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
[BatchPrediction]
[BatchPrediction]
[BatchPrediction]
[BatchPrediction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeBatchPredictionsResponse_nextToken :: Lens.Lens' DescribeBatchPredictionsResponse (Prelude.Maybe Prelude.Text)
describeBatchPredictionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBatchPredictionsResponse
-> f DescribeBatchPredictionsResponse
describeBatchPredictionsResponse_nextToken = (DescribeBatchPredictionsResponse -> Maybe Text)
-> (DescribeBatchPredictionsResponse
-> Maybe Text -> DescribeBatchPredictionsResponse)
-> Lens' DescribeBatchPredictionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBatchPredictionsResponse' :: DescribeBatchPredictionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBatchPredictionsResponse
s@DescribeBatchPredictionsResponse' {} Maybe Text
a -> DescribeBatchPredictionsResponse
s {$sel:nextToken:DescribeBatchPredictionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBatchPredictionsResponse)
describeBatchPredictionsResponse_httpStatus :: Lens.Lens' DescribeBatchPredictionsResponse Prelude.Int
describeBatchPredictionsResponse_httpStatus :: (Int -> f Int)
-> DescribeBatchPredictionsResponse
-> f DescribeBatchPredictionsResponse
describeBatchPredictionsResponse_httpStatus = (DescribeBatchPredictionsResponse -> Int)
-> (DescribeBatchPredictionsResponse
-> Int -> DescribeBatchPredictionsResponse)
-> Lens
DescribeBatchPredictionsResponse
DescribeBatchPredictionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBatchPredictionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeBatchPredictionsResponse' :: DescribeBatchPredictionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeBatchPredictionsResponse
s@DescribeBatchPredictionsResponse' {} Int
a -> DescribeBatchPredictionsResponse
s {$sel:httpStatus:DescribeBatchPredictionsResponse' :: Int
httpStatus = Int
a} :: DescribeBatchPredictionsResponse)
instance
Prelude.NFData
DescribeBatchPredictionsResponse