{-# 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.DescribeMLModels
(
DescribeMLModels (..),
newDescribeMLModels,
describeMLModels_eq,
describeMLModels_ge,
describeMLModels_prefix,
describeMLModels_gt,
describeMLModels_ne,
describeMLModels_nextToken,
describeMLModels_sortOrder,
describeMLModels_limit,
describeMLModels_lt,
describeMLModels_filterVariable,
describeMLModels_le,
DescribeMLModelsResponse (..),
newDescribeMLModelsResponse,
describeMLModelsResponse_results,
describeMLModelsResponse_nextToken,
describeMLModelsResponse_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 DescribeMLModels = DescribeMLModels'
{
DescribeMLModels -> Maybe Text
eq :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe Text
ge :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe Text
gt :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe Text
ne :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
DescribeMLModels -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeMLModels -> Maybe Text
lt :: Prelude.Maybe Prelude.Text,
DescribeMLModels -> Maybe MLModelFilterVariable
filterVariable :: Prelude.Maybe MLModelFilterVariable,
DescribeMLModels -> Maybe Text
le :: Prelude.Maybe Prelude.Text
}
deriving (DescribeMLModels -> DescribeMLModels -> Bool
(DescribeMLModels -> DescribeMLModels -> Bool)
-> (DescribeMLModels -> DescribeMLModels -> Bool)
-> Eq DescribeMLModels
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMLModels -> DescribeMLModels -> Bool
$c/= :: DescribeMLModels -> DescribeMLModels -> Bool
== :: DescribeMLModels -> DescribeMLModels -> Bool
$c== :: DescribeMLModels -> DescribeMLModels -> Bool
Prelude.Eq, ReadPrec [DescribeMLModels]
ReadPrec DescribeMLModels
Int -> ReadS DescribeMLModels
ReadS [DescribeMLModels]
(Int -> ReadS DescribeMLModels)
-> ReadS [DescribeMLModels]
-> ReadPrec DescribeMLModels
-> ReadPrec [DescribeMLModels]
-> Read DescribeMLModels
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMLModels]
$creadListPrec :: ReadPrec [DescribeMLModels]
readPrec :: ReadPrec DescribeMLModels
$creadPrec :: ReadPrec DescribeMLModels
readList :: ReadS [DescribeMLModels]
$creadList :: ReadS [DescribeMLModels]
readsPrec :: Int -> ReadS DescribeMLModels
$creadsPrec :: Int -> ReadS DescribeMLModels
Prelude.Read, Int -> DescribeMLModels -> ShowS
[DescribeMLModels] -> ShowS
DescribeMLModels -> String
(Int -> DescribeMLModels -> ShowS)
-> (DescribeMLModels -> String)
-> ([DescribeMLModels] -> ShowS)
-> Show DescribeMLModels
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMLModels] -> ShowS
$cshowList :: [DescribeMLModels] -> ShowS
show :: DescribeMLModels -> String
$cshow :: DescribeMLModels -> String
showsPrec :: Int -> DescribeMLModels -> ShowS
$cshowsPrec :: Int -> DescribeMLModels -> ShowS
Prelude.Show, (forall x. DescribeMLModels -> Rep DescribeMLModels x)
-> (forall x. Rep DescribeMLModels x -> DescribeMLModels)
-> Generic DescribeMLModels
forall x. Rep DescribeMLModels x -> DescribeMLModels
forall x. DescribeMLModels -> Rep DescribeMLModels x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeMLModels x -> DescribeMLModels
$cfrom :: forall x. DescribeMLModels -> Rep DescribeMLModels x
Prelude.Generic)
newDescribeMLModels ::
DescribeMLModels
newDescribeMLModels :: DescribeMLModels
newDescribeMLModels =
DescribeMLModels' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> Maybe MLModelFilterVariable
-> Maybe Text
-> DescribeMLModels
DescribeMLModels'
{ $sel:eq:DescribeMLModels' :: Maybe Text
eq = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ge:DescribeMLModels' :: Maybe Text
ge = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:prefix:DescribeMLModels' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gt:DescribeMLModels' :: Maybe Text
gt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ne:DescribeMLModels' :: Maybe Text
ne = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMLModels' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sortOrder:DescribeMLModels' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeMLModels' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:lt:DescribeMLModels' :: Maybe Text
lt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filterVariable:DescribeMLModels' :: Maybe MLModelFilterVariable
filterVariable = Maybe MLModelFilterVariable
forall a. Maybe a
Prelude.Nothing,
$sel:le:DescribeMLModels' :: Maybe Text
le = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describeMLModels_eq :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_eq :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_eq = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
eq :: Maybe Text
$sel:eq:DescribeMLModels' :: DescribeMLModels -> Maybe Text
eq} -> Maybe Text
eq) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:eq:DescribeMLModels' :: Maybe Text
eq = Maybe Text
a} :: DescribeMLModels)
describeMLModels_ge :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_ge :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_ge = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
ge :: Maybe Text
$sel:ge:DescribeMLModels' :: DescribeMLModels -> Maybe Text
ge} -> Maybe Text
ge) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:ge:DescribeMLModels' :: Maybe Text
ge = Maybe Text
a} :: DescribeMLModels)
describeMLModels_prefix :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_prefix :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_prefix = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
prefix :: Maybe Text
$sel:prefix:DescribeMLModels' :: DescribeMLModels -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:prefix:DescribeMLModels' :: Maybe Text
prefix = Maybe Text
a} :: DescribeMLModels)
describeMLModels_gt :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_gt :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_gt = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
gt :: Maybe Text
$sel:gt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
gt} -> Maybe Text
gt) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:gt:DescribeMLModels' :: Maybe Text
gt = Maybe Text
a} :: DescribeMLModels)
describeMLModels_ne :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_ne :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_ne = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
ne :: Maybe Text
$sel:ne:DescribeMLModels' :: DescribeMLModels -> Maybe Text
ne} -> Maybe Text
ne) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:ne:DescribeMLModels' :: Maybe Text
ne = Maybe Text
a} :: DescribeMLModels)
describeMLModels_nextToken :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_nextToken = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMLModels' :: DescribeMLModels -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:nextToken:DescribeMLModels' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMLModels)
describeMLModels_sortOrder :: Lens.Lens' DescribeMLModels (Prelude.Maybe SortOrder)
describeMLModels_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_sortOrder = (DescribeMLModels -> Maybe SortOrder)
-> (DescribeMLModels -> Maybe SortOrder -> DescribeMLModels)
-> Lens
DescribeMLModels
DescribeMLModels
(Maybe SortOrder)
(Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:DescribeMLModels' :: DescribeMLModels -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe SortOrder
a -> DescribeMLModels
s {$sel:sortOrder:DescribeMLModels' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: DescribeMLModels)
describeMLModels_limit :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Natural)
describeMLModels_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_limit = (DescribeMLModels -> Maybe Natural)
-> (DescribeMLModels -> Maybe Natural -> DescribeMLModels)
-> Lens
DescribeMLModels DescribeMLModels (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeMLModels' :: DescribeMLModels -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Natural
a -> DescribeMLModels
s {$sel:limit:DescribeMLModels' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeMLModels)
describeMLModels_lt :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_lt :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_lt = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
lt :: Maybe Text
$sel:lt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
lt} -> Maybe Text
lt) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:lt:DescribeMLModels' :: Maybe Text
lt = Maybe Text
a} :: DescribeMLModels)
describeMLModels_filterVariable :: Lens.Lens' DescribeMLModels (Prelude.Maybe MLModelFilterVariable)
describeMLModels_filterVariable :: (Maybe MLModelFilterVariable -> f (Maybe MLModelFilterVariable))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_filterVariable = (DescribeMLModels -> Maybe MLModelFilterVariable)
-> (DescribeMLModels
-> Maybe MLModelFilterVariable -> DescribeMLModels)
-> Lens
DescribeMLModels
DescribeMLModels
(Maybe MLModelFilterVariable)
(Maybe MLModelFilterVariable)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe MLModelFilterVariable
filterVariable :: Maybe MLModelFilterVariable
$sel:filterVariable:DescribeMLModels' :: DescribeMLModels -> Maybe MLModelFilterVariable
filterVariable} -> Maybe MLModelFilterVariable
filterVariable) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe MLModelFilterVariable
a -> DescribeMLModels
s {$sel:filterVariable:DescribeMLModels' :: Maybe MLModelFilterVariable
filterVariable = Maybe MLModelFilterVariable
a} :: DescribeMLModels)
describeMLModels_le :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_le :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_le = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
le :: Maybe Text
$sel:le:DescribeMLModels' :: DescribeMLModels -> Maybe Text
le} -> Maybe Text
le) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:le:DescribeMLModels' :: Maybe Text
le = Maybe Text
a} :: DescribeMLModels)
instance Core.AWSPager DescribeMLModels where
page :: DescribeMLModels
-> AWSResponse DescribeMLModels -> Maybe DescribeMLModels
page DescribeMLModels
rq AWSResponse DescribeMLModels
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
DescribeMLModelsResponse
-> Getting (First Text) DescribeMLModelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe Text)
describeMLModelsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMLModelsResponse 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 DescribeMLModels
forall a. Maybe a
Prelude.Nothing
| Maybe [MLModel] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
DescribeMLModelsResponse
-> Getting (First [MLModel]) DescribeMLModelsResponse [MLModel]
-> Maybe [MLModel]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
-> DescribeMLModelsResponse
-> Const (First [MLModel]) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe [MLModel])
describeMLModelsResponse_results
((Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
-> DescribeMLModelsResponse
-> Const (First [MLModel]) DescribeMLModelsResponse)
-> (([MLModel] -> Const (First [MLModel]) [MLModel])
-> Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
-> Getting (First [MLModel]) DescribeMLModelsResponse [MLModel]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MLModel] -> Const (First [MLModel]) [MLModel])
-> Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeMLModels
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeMLModels -> Maybe DescribeMLModels
forall a. a -> Maybe a
Prelude.Just (DescribeMLModels -> Maybe DescribeMLModels)
-> DescribeMLModels -> Maybe DescribeMLModels
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeMLModels
rq
DescribeMLModels
-> (DescribeMLModels -> DescribeMLModels) -> DescribeMLModels
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMLModels -> Identity DescribeMLModels
Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
describeMLModels_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeMLModels -> Identity DescribeMLModels)
-> Maybe Text -> DescribeMLModels -> DescribeMLModels
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
DescribeMLModelsResponse
-> Getting (First Text) DescribeMLModelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe Text)
describeMLModelsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMLModelsResponse 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 DescribeMLModels where
type
AWSResponse DescribeMLModels =
DescribeMLModelsResponse
request :: DescribeMLModels -> Request DescribeMLModels
request = Service -> DescribeMLModels -> Request DescribeMLModels
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeMLModels
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeMLModels)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeMLModels))
-> Logger
-> Service
-> Proxy DescribeMLModels
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeMLModels)))
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 [MLModel] -> Maybe Text -> Int -> DescribeMLModelsResponse
DescribeMLModelsResponse'
(Maybe [MLModel] -> Maybe Text -> Int -> DescribeMLModelsResponse)
-> Either String (Maybe [MLModel])
-> Either String (Maybe Text -> Int -> DescribeMLModelsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [MLModel]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Results" Either String (Maybe (Maybe [MLModel]))
-> Maybe [MLModel] -> Either String (Maybe [MLModel])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MLModel]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeMLModelsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMLModelsResponse)
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 -> DescribeMLModelsResponse)
-> Either String Int -> Either String DescribeMLModelsResponse
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 DescribeMLModels
instance Prelude.NFData DescribeMLModels
instance Core.ToHeaders DescribeMLModels where
toHeaders :: DescribeMLModels -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeMLModels -> 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.DescribeMLModels" ::
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 DescribeMLModels where
toJSON :: DescribeMLModels -> Value
toJSON DescribeMLModels' {Maybe Natural
Maybe Text
Maybe MLModelFilterVariable
Maybe SortOrder
le :: Maybe Text
filterVariable :: Maybe MLModelFilterVariable
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:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:filterVariable:DescribeMLModels' :: DescribeMLModels -> Maybe MLModelFilterVariable
$sel:lt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:limit:DescribeMLModels' :: DescribeMLModels -> Maybe Natural
$sel:sortOrder:DescribeMLModels' :: DescribeMLModels -> Maybe SortOrder
$sel:nextToken:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:ne:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:gt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:prefix:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:ge:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:eq:DescribeMLModels' :: DescribeMLModels -> 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 -> MLModelFilterVariable -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MLModelFilterVariable -> Pair)
-> Maybe MLModelFilterVariable -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MLModelFilterVariable
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 DescribeMLModels where
toPath :: DescribeMLModels -> ByteString
toPath = ByteString -> DescribeMLModels -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeMLModels where
toQuery :: DescribeMLModels -> QueryString
toQuery = QueryString -> DescribeMLModels -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeMLModelsResponse = DescribeMLModelsResponse'
{
DescribeMLModelsResponse -> Maybe [MLModel]
results :: Prelude.Maybe [MLModel],
DescribeMLModelsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeMLModelsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
(DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool)
-> (DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool)
-> Eq DescribeMLModelsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
$c/= :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
== :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
$c== :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMLModelsResponse]
ReadPrec DescribeMLModelsResponse
Int -> ReadS DescribeMLModelsResponse
ReadS [DescribeMLModelsResponse]
(Int -> ReadS DescribeMLModelsResponse)
-> ReadS [DescribeMLModelsResponse]
-> ReadPrec DescribeMLModelsResponse
-> ReadPrec [DescribeMLModelsResponse]
-> Read DescribeMLModelsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMLModelsResponse]
$creadListPrec :: ReadPrec [DescribeMLModelsResponse]
readPrec :: ReadPrec DescribeMLModelsResponse
$creadPrec :: ReadPrec DescribeMLModelsResponse
readList :: ReadS [DescribeMLModelsResponse]
$creadList :: ReadS [DescribeMLModelsResponse]
readsPrec :: Int -> ReadS DescribeMLModelsResponse
$creadsPrec :: Int -> ReadS DescribeMLModelsResponse
Prelude.Read, Int -> DescribeMLModelsResponse -> ShowS
[DescribeMLModelsResponse] -> ShowS
DescribeMLModelsResponse -> String
(Int -> DescribeMLModelsResponse -> ShowS)
-> (DescribeMLModelsResponse -> String)
-> ([DescribeMLModelsResponse] -> ShowS)
-> Show DescribeMLModelsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMLModelsResponse] -> ShowS
$cshowList :: [DescribeMLModelsResponse] -> ShowS
show :: DescribeMLModelsResponse -> String
$cshow :: DescribeMLModelsResponse -> String
showsPrec :: Int -> DescribeMLModelsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMLModelsResponse -> ShowS
Prelude.Show, (forall x.
DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x)
-> (forall x.
Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse)
-> Generic DescribeMLModelsResponse
forall x.
Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse
forall x.
DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse
$cfrom :: forall x.
DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x
Prelude.Generic)
newDescribeMLModelsResponse ::
Prelude.Int ->
DescribeMLModelsResponse
newDescribeMLModelsResponse :: Int -> DescribeMLModelsResponse
newDescribeMLModelsResponse Int
pHttpStatus_ =
DescribeMLModelsResponse' :: Maybe [MLModel] -> Maybe Text -> Int -> DescribeMLModelsResponse
DescribeMLModelsResponse'
{ $sel:results:DescribeMLModelsResponse' :: Maybe [MLModel]
results =
Maybe [MLModel]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeMLModelsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeMLModelsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeMLModelsResponse_results :: Lens.Lens' DescribeMLModelsResponse (Prelude.Maybe [MLModel])
describeMLModelsResponse_results :: (Maybe [MLModel] -> f (Maybe [MLModel]))
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse
describeMLModelsResponse_results = (DescribeMLModelsResponse -> Maybe [MLModel])
-> (DescribeMLModelsResponse
-> Maybe [MLModel] -> DescribeMLModelsResponse)
-> Lens' DescribeMLModelsResponse (Maybe [MLModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModelsResponse' {Maybe [MLModel]
results :: Maybe [MLModel]
$sel:results:DescribeMLModelsResponse' :: DescribeMLModelsResponse -> Maybe [MLModel]
results} -> Maybe [MLModel]
results) (\s :: DescribeMLModelsResponse
s@DescribeMLModelsResponse' {} Maybe [MLModel]
a -> DescribeMLModelsResponse
s {$sel:results:DescribeMLModelsResponse' :: Maybe [MLModel]
results = Maybe [MLModel]
a} :: DescribeMLModelsResponse) ((Maybe [MLModel] -> f (Maybe [MLModel]))
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse)
-> ((Maybe [MLModel] -> f (Maybe [MLModel]))
-> Maybe [MLModel] -> f (Maybe [MLModel]))
-> (Maybe [MLModel] -> f (Maybe [MLModel]))
-> DescribeMLModelsResponse
-> f DescribeMLModelsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MLModel] [MLModel] [MLModel] [MLModel]
-> Iso
(Maybe [MLModel])
(Maybe [MLModel])
(Maybe [MLModel])
(Maybe [MLModel])
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 [MLModel] [MLModel] [MLModel] [MLModel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeMLModelsResponse_nextToken :: Lens.Lens' DescribeMLModelsResponse (Prelude.Maybe Prelude.Text)
describeMLModelsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse
describeMLModelsResponse_nextToken = (DescribeMLModelsResponse -> Maybe Text)
-> (DescribeMLModelsResponse
-> Maybe Text -> DescribeMLModelsResponse)
-> Lens' DescribeMLModelsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModelsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMLModelsResponse' :: DescribeMLModelsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMLModelsResponse
s@DescribeMLModelsResponse' {} Maybe Text
a -> DescribeMLModelsResponse
s {$sel:nextToken:DescribeMLModelsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMLModelsResponse)
describeMLModelsResponse_httpStatus :: Lens.Lens' DescribeMLModelsResponse Prelude.Int
describeMLModelsResponse_httpStatus :: (Int -> f Int)
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse
describeMLModelsResponse_httpStatus = (DescribeMLModelsResponse -> Int)
-> (DescribeMLModelsResponse -> Int -> DescribeMLModelsResponse)
-> Lens DescribeMLModelsResponse DescribeMLModelsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModelsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeMLModelsResponse' :: DescribeMLModelsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeMLModelsResponse
s@DescribeMLModelsResponse' {} Int
a -> DescribeMLModelsResponse
s {$sel:httpStatus:DescribeMLModelsResponse' :: Int
httpStatus = Int
a} :: DescribeMLModelsResponse)
instance Prelude.NFData DescribeMLModelsResponse