{-# 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.Glue.CreateMLTransform
(
CreateMLTransform (..),
newCreateMLTransform,
createMLTransform_numberOfWorkers,
createMLTransform_workerType,
createMLTransform_glueVersion,
createMLTransform_maxRetries,
createMLTransform_maxCapacity,
createMLTransform_timeout,
createMLTransform_transformEncryption,
createMLTransform_description,
createMLTransform_tags,
createMLTransform_name,
createMLTransform_inputRecordTables,
createMLTransform_parameters,
createMLTransform_role,
CreateMLTransformResponse (..),
newCreateMLTransformResponse,
createMLTransformResponse_transformId,
createMLTransformResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateMLTransform = CreateMLTransform'
{
CreateMLTransform -> Maybe Int
numberOfWorkers :: Prelude.Maybe Prelude.Int,
CreateMLTransform -> Maybe WorkerType
workerType :: Prelude.Maybe WorkerType,
CreateMLTransform -> Maybe Text
glueVersion :: Prelude.Maybe Prelude.Text,
CreateMLTransform -> Maybe Int
maxRetries :: Prelude.Maybe Prelude.Int,
CreateMLTransform -> Maybe Double
maxCapacity :: Prelude.Maybe Prelude.Double,
CreateMLTransform -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
CreateMLTransform -> Maybe TransformEncryption
transformEncryption :: Prelude.Maybe TransformEncryption,
CreateMLTransform -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateMLTransform -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateMLTransform -> Text
name :: Prelude.Text,
CreateMLTransform -> [GlueTable]
inputRecordTables :: [GlueTable],
CreateMLTransform -> TransformParameters
parameters :: TransformParameters,
CreateMLTransform -> Text
role' :: Prelude.Text
}
deriving (CreateMLTransform -> CreateMLTransform -> Bool
(CreateMLTransform -> CreateMLTransform -> Bool)
-> (CreateMLTransform -> CreateMLTransform -> Bool)
-> Eq CreateMLTransform
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMLTransform -> CreateMLTransform -> Bool
$c/= :: CreateMLTransform -> CreateMLTransform -> Bool
== :: CreateMLTransform -> CreateMLTransform -> Bool
$c== :: CreateMLTransform -> CreateMLTransform -> Bool
Prelude.Eq, ReadPrec [CreateMLTransform]
ReadPrec CreateMLTransform
Int -> ReadS CreateMLTransform
ReadS [CreateMLTransform]
(Int -> ReadS CreateMLTransform)
-> ReadS [CreateMLTransform]
-> ReadPrec CreateMLTransform
-> ReadPrec [CreateMLTransform]
-> Read CreateMLTransform
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMLTransform]
$creadListPrec :: ReadPrec [CreateMLTransform]
readPrec :: ReadPrec CreateMLTransform
$creadPrec :: ReadPrec CreateMLTransform
readList :: ReadS [CreateMLTransform]
$creadList :: ReadS [CreateMLTransform]
readsPrec :: Int -> ReadS CreateMLTransform
$creadsPrec :: Int -> ReadS CreateMLTransform
Prelude.Read, Int -> CreateMLTransform -> ShowS
[CreateMLTransform] -> ShowS
CreateMLTransform -> String
(Int -> CreateMLTransform -> ShowS)
-> (CreateMLTransform -> String)
-> ([CreateMLTransform] -> ShowS)
-> Show CreateMLTransform
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMLTransform] -> ShowS
$cshowList :: [CreateMLTransform] -> ShowS
show :: CreateMLTransform -> String
$cshow :: CreateMLTransform -> String
showsPrec :: Int -> CreateMLTransform -> ShowS
$cshowsPrec :: Int -> CreateMLTransform -> ShowS
Prelude.Show, (forall x. CreateMLTransform -> Rep CreateMLTransform x)
-> (forall x. Rep CreateMLTransform x -> CreateMLTransform)
-> Generic CreateMLTransform
forall x. Rep CreateMLTransform x -> CreateMLTransform
forall x. CreateMLTransform -> Rep CreateMLTransform x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMLTransform x -> CreateMLTransform
$cfrom :: forall x. CreateMLTransform -> Rep CreateMLTransform x
Prelude.Generic)
newCreateMLTransform ::
Prelude.Text ->
TransformParameters ->
Prelude.Text ->
CreateMLTransform
newCreateMLTransform :: Text -> TransformParameters -> Text -> CreateMLTransform
newCreateMLTransform Text
pName_ TransformParameters
pParameters_ Text
pRole_ =
CreateMLTransform' :: Maybe Int
-> Maybe WorkerType
-> Maybe Text
-> Maybe Int
-> Maybe Double
-> Maybe Natural
-> Maybe TransformEncryption
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> [GlueTable]
-> TransformParameters
-> Text
-> CreateMLTransform
CreateMLTransform'
{ $sel:numberOfWorkers:CreateMLTransform' :: Maybe Int
numberOfWorkers =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:workerType:CreateMLTransform' :: Maybe WorkerType
workerType = Maybe WorkerType
forall a. Maybe a
Prelude.Nothing,
$sel:glueVersion:CreateMLTransform' :: Maybe Text
glueVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRetries:CreateMLTransform' :: Maybe Int
maxRetries = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:CreateMLTransform' :: Maybe Double
maxCapacity = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:timeout:CreateMLTransform' :: Maybe Natural
timeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:transformEncryption:CreateMLTransform' :: Maybe TransformEncryption
transformEncryption = Maybe TransformEncryption
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateMLTransform' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateMLTransform' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateMLTransform' :: Text
name = Text
pName_,
$sel:inputRecordTables:CreateMLTransform' :: [GlueTable]
inputRecordTables = [GlueTable]
forall a. Monoid a => a
Prelude.mempty,
$sel:parameters:CreateMLTransform' :: TransformParameters
parameters = TransformParameters
pParameters_,
$sel:role':CreateMLTransform' :: Text
role' = Text
pRole_
}
createMLTransform_numberOfWorkers :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Int)
createMLTransform_numberOfWorkers :: (Maybe Int -> f (Maybe Int))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_numberOfWorkers = (CreateMLTransform -> Maybe Int)
-> (CreateMLTransform -> Maybe Int -> CreateMLTransform)
-> Lens CreateMLTransform CreateMLTransform (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Int
numberOfWorkers :: Maybe Int
$sel:numberOfWorkers:CreateMLTransform' :: CreateMLTransform -> Maybe Int
numberOfWorkers} -> Maybe Int
numberOfWorkers) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Int
a -> CreateMLTransform
s {$sel:numberOfWorkers:CreateMLTransform' :: Maybe Int
numberOfWorkers = Maybe Int
a} :: CreateMLTransform)
createMLTransform_workerType :: Lens.Lens' CreateMLTransform (Prelude.Maybe WorkerType)
createMLTransform_workerType :: (Maybe WorkerType -> f (Maybe WorkerType))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_workerType = (CreateMLTransform -> Maybe WorkerType)
-> (CreateMLTransform -> Maybe WorkerType -> CreateMLTransform)
-> Lens
CreateMLTransform
CreateMLTransform
(Maybe WorkerType)
(Maybe WorkerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe WorkerType
workerType :: Maybe WorkerType
$sel:workerType:CreateMLTransform' :: CreateMLTransform -> Maybe WorkerType
workerType} -> Maybe WorkerType
workerType) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe WorkerType
a -> CreateMLTransform
s {$sel:workerType:CreateMLTransform' :: Maybe WorkerType
workerType = Maybe WorkerType
a} :: CreateMLTransform)
createMLTransform_glueVersion :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Text)
createMLTransform_glueVersion :: (Maybe Text -> f (Maybe Text))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_glueVersion = (CreateMLTransform -> Maybe Text)
-> (CreateMLTransform -> Maybe Text -> CreateMLTransform)
-> Lens
CreateMLTransform CreateMLTransform (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Text
glueVersion :: Maybe Text
$sel:glueVersion:CreateMLTransform' :: CreateMLTransform -> Maybe Text
glueVersion} -> Maybe Text
glueVersion) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Text
a -> CreateMLTransform
s {$sel:glueVersion:CreateMLTransform' :: Maybe Text
glueVersion = Maybe Text
a} :: CreateMLTransform)
createMLTransform_maxRetries :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Int)
createMLTransform_maxRetries :: (Maybe Int -> f (Maybe Int))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_maxRetries = (CreateMLTransform -> Maybe Int)
-> (CreateMLTransform -> Maybe Int -> CreateMLTransform)
-> Lens CreateMLTransform CreateMLTransform (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Int
maxRetries :: Maybe Int
$sel:maxRetries:CreateMLTransform' :: CreateMLTransform -> Maybe Int
maxRetries} -> Maybe Int
maxRetries) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Int
a -> CreateMLTransform
s {$sel:maxRetries:CreateMLTransform' :: Maybe Int
maxRetries = Maybe Int
a} :: CreateMLTransform)
createMLTransform_maxCapacity :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Double)
createMLTransform_maxCapacity :: (Maybe Double -> f (Maybe Double))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_maxCapacity = (CreateMLTransform -> Maybe Double)
-> (CreateMLTransform -> Maybe Double -> CreateMLTransform)
-> Lens
CreateMLTransform CreateMLTransform (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Double
maxCapacity :: Maybe Double
$sel:maxCapacity:CreateMLTransform' :: CreateMLTransform -> Maybe Double
maxCapacity} -> Maybe Double
maxCapacity) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Double
a -> CreateMLTransform
s {$sel:maxCapacity:CreateMLTransform' :: Maybe Double
maxCapacity = Maybe Double
a} :: CreateMLTransform)
createMLTransform_timeout :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Natural)
createMLTransform_timeout :: (Maybe Natural -> f (Maybe Natural))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_timeout = (CreateMLTransform -> Maybe Natural)
-> (CreateMLTransform -> Maybe Natural -> CreateMLTransform)
-> Lens
CreateMLTransform CreateMLTransform (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:CreateMLTransform' :: CreateMLTransform -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Natural
a -> CreateMLTransform
s {$sel:timeout:CreateMLTransform' :: Maybe Natural
timeout = Maybe Natural
a} :: CreateMLTransform)
createMLTransform_transformEncryption :: Lens.Lens' CreateMLTransform (Prelude.Maybe TransformEncryption)
createMLTransform_transformEncryption :: (Maybe TransformEncryption -> f (Maybe TransformEncryption))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_transformEncryption = (CreateMLTransform -> Maybe TransformEncryption)
-> (CreateMLTransform
-> Maybe TransformEncryption -> CreateMLTransform)
-> Lens
CreateMLTransform
CreateMLTransform
(Maybe TransformEncryption)
(Maybe TransformEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe TransformEncryption
transformEncryption :: Maybe TransformEncryption
$sel:transformEncryption:CreateMLTransform' :: CreateMLTransform -> Maybe TransformEncryption
transformEncryption} -> Maybe TransformEncryption
transformEncryption) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe TransformEncryption
a -> CreateMLTransform
s {$sel:transformEncryption:CreateMLTransform' :: Maybe TransformEncryption
transformEncryption = Maybe TransformEncryption
a} :: CreateMLTransform)
createMLTransform_description :: Lens.Lens' CreateMLTransform (Prelude.Maybe Prelude.Text)
createMLTransform_description :: (Maybe Text -> f (Maybe Text))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_description = (CreateMLTransform -> Maybe Text)
-> (CreateMLTransform -> Maybe Text -> CreateMLTransform)
-> Lens
CreateMLTransform CreateMLTransform (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe Text
description :: Maybe Text
$sel:description:CreateMLTransform' :: CreateMLTransform -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe Text
a -> CreateMLTransform
s {$sel:description:CreateMLTransform' :: Maybe Text
description = Maybe Text
a} :: CreateMLTransform)
createMLTransform_tags :: Lens.Lens' CreateMLTransform (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createMLTransform_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_tags = (CreateMLTransform -> Maybe (HashMap Text Text))
-> (CreateMLTransform
-> Maybe (HashMap Text Text) -> CreateMLTransform)
-> Lens
CreateMLTransform
CreateMLTransform
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateMLTransform' :: CreateMLTransform -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateMLTransform
s@CreateMLTransform' {} Maybe (HashMap Text Text)
a -> CreateMLTransform
s {$sel:tags:CreateMLTransform' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateMLTransform) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLTransform -> f CreateMLTransform)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLTransform
-> f CreateMLTransform
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createMLTransform_name :: Lens.Lens' CreateMLTransform Prelude.Text
createMLTransform_name :: (Text -> f Text) -> CreateMLTransform -> f CreateMLTransform
createMLTransform_name = (CreateMLTransform -> Text)
-> (CreateMLTransform -> Text -> CreateMLTransform)
-> Lens CreateMLTransform CreateMLTransform Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Text
name :: Text
$sel:name:CreateMLTransform' :: CreateMLTransform -> Text
name} -> Text
name) (\s :: CreateMLTransform
s@CreateMLTransform' {} Text
a -> CreateMLTransform
s {$sel:name:CreateMLTransform' :: Text
name = Text
a} :: CreateMLTransform)
createMLTransform_inputRecordTables :: Lens.Lens' CreateMLTransform [GlueTable]
createMLTransform_inputRecordTables :: ([GlueTable] -> f [GlueTable])
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_inputRecordTables = (CreateMLTransform -> [GlueTable])
-> (CreateMLTransform -> [GlueTable] -> CreateMLTransform)
-> Lens CreateMLTransform CreateMLTransform [GlueTable] [GlueTable]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {[GlueTable]
inputRecordTables :: [GlueTable]
$sel:inputRecordTables:CreateMLTransform' :: CreateMLTransform -> [GlueTable]
inputRecordTables} -> [GlueTable]
inputRecordTables) (\s :: CreateMLTransform
s@CreateMLTransform' {} [GlueTable]
a -> CreateMLTransform
s {$sel:inputRecordTables:CreateMLTransform' :: [GlueTable]
inputRecordTables = [GlueTable]
a} :: CreateMLTransform) (([GlueTable] -> f [GlueTable])
-> CreateMLTransform -> f CreateMLTransform)
-> (([GlueTable] -> f [GlueTable]) -> [GlueTable] -> f [GlueTable])
-> ([GlueTable] -> f [GlueTable])
-> CreateMLTransform
-> f CreateMLTransform
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([GlueTable] -> f [GlueTable]) -> [GlueTable] -> f [GlueTable]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createMLTransform_parameters :: Lens.Lens' CreateMLTransform TransformParameters
createMLTransform_parameters :: (TransformParameters -> f TransformParameters)
-> CreateMLTransform -> f CreateMLTransform
createMLTransform_parameters = (CreateMLTransform -> TransformParameters)
-> (CreateMLTransform -> TransformParameters -> CreateMLTransform)
-> Lens
CreateMLTransform
CreateMLTransform
TransformParameters
TransformParameters
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {TransformParameters
parameters :: TransformParameters
$sel:parameters:CreateMLTransform' :: CreateMLTransform -> TransformParameters
parameters} -> TransformParameters
parameters) (\s :: CreateMLTransform
s@CreateMLTransform' {} TransformParameters
a -> CreateMLTransform
s {$sel:parameters:CreateMLTransform' :: TransformParameters
parameters = TransformParameters
a} :: CreateMLTransform)
createMLTransform_role :: Lens.Lens' CreateMLTransform Prelude.Text
createMLTransform_role :: (Text -> f Text) -> CreateMLTransform -> f CreateMLTransform
createMLTransform_role = (CreateMLTransform -> Text)
-> (CreateMLTransform -> Text -> CreateMLTransform)
-> Lens CreateMLTransform CreateMLTransform Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransform' {Text
role' :: Text
$sel:role':CreateMLTransform' :: CreateMLTransform -> Text
role'} -> Text
role') (\s :: CreateMLTransform
s@CreateMLTransform' {} Text
a -> CreateMLTransform
s {$sel:role':CreateMLTransform' :: Text
role' = Text
a} :: CreateMLTransform)
instance Core.AWSRequest CreateMLTransform where
type
AWSResponse CreateMLTransform =
CreateMLTransformResponse
request :: CreateMLTransform -> Request CreateMLTransform
request = Service -> CreateMLTransform -> Request CreateMLTransform
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateMLTransform
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateMLTransform)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateMLTransform))
-> Logger
-> Service
-> Proxy CreateMLTransform
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateMLTransform)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateMLTransformResponse
CreateMLTransformResponse'
(Maybe Text -> Int -> CreateMLTransformResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateMLTransformResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TransformId")
Either String (Int -> CreateMLTransformResponse)
-> Either String Int -> Either String CreateMLTransformResponse
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 CreateMLTransform
instance Prelude.NFData CreateMLTransform
instance Core.ToHeaders CreateMLTransform where
toHeaders :: CreateMLTransform -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateMLTransform -> 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
"AWSGlue.CreateMLTransform" :: 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 CreateMLTransform where
toJSON :: CreateMLTransform -> Value
toJSON CreateMLTransform' {[GlueTable]
Maybe Double
Maybe Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe TransformEncryption
Maybe WorkerType
Text
TransformParameters
role' :: Text
parameters :: TransformParameters
inputRecordTables :: [GlueTable]
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
transformEncryption :: Maybe TransformEncryption
timeout :: Maybe Natural
maxCapacity :: Maybe Double
maxRetries :: Maybe Int
glueVersion :: Maybe Text
workerType :: Maybe WorkerType
numberOfWorkers :: Maybe Int
$sel:role':CreateMLTransform' :: CreateMLTransform -> Text
$sel:parameters:CreateMLTransform' :: CreateMLTransform -> TransformParameters
$sel:inputRecordTables:CreateMLTransform' :: CreateMLTransform -> [GlueTable]
$sel:name:CreateMLTransform' :: CreateMLTransform -> Text
$sel:tags:CreateMLTransform' :: CreateMLTransform -> Maybe (HashMap Text Text)
$sel:description:CreateMLTransform' :: CreateMLTransform -> Maybe Text
$sel:transformEncryption:CreateMLTransform' :: CreateMLTransform -> Maybe TransformEncryption
$sel:timeout:CreateMLTransform' :: CreateMLTransform -> Maybe Natural
$sel:maxCapacity:CreateMLTransform' :: CreateMLTransform -> Maybe Double
$sel:maxRetries:CreateMLTransform' :: CreateMLTransform -> Maybe Int
$sel:glueVersion:CreateMLTransform' :: CreateMLTransform -> Maybe Text
$sel:workerType:CreateMLTransform' :: CreateMLTransform -> Maybe WorkerType
$sel:numberOfWorkers:CreateMLTransform' :: CreateMLTransform -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NumberOfWorkers" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numberOfWorkers,
(Text
"WorkerType" Text -> WorkerType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WorkerType -> Pair) -> Maybe WorkerType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkerType
workerType,
(Text
"GlueVersion" 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
glueVersion,
(Text
"MaxRetries" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxRetries,
(Text
"MaxCapacity" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
maxCapacity,
(Text
"Timeout" 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
timeout,
(Text
"TransformEncryption" Text -> TransformEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TransformEncryption -> Pair)
-> Maybe TransformEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TransformEncryption
transformEncryption,
(Text
"Description" 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
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InputRecordTables" Text -> [GlueTable] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [GlueTable]
inputRecordTables),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Parameters" Text -> TransformParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TransformParameters
parameters),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Role" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
role')
]
)
instance Core.ToPath CreateMLTransform where
toPath :: CreateMLTransform -> ByteString
toPath = ByteString -> CreateMLTransform -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateMLTransform where
toQuery :: CreateMLTransform -> QueryString
toQuery = QueryString -> CreateMLTransform -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateMLTransformResponse = CreateMLTransformResponse'
{
CreateMLTransformResponse -> Maybe Text
transformId :: Prelude.Maybe Prelude.Text,
CreateMLTransformResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateMLTransformResponse -> CreateMLTransformResponse -> Bool
(CreateMLTransformResponse -> CreateMLTransformResponse -> Bool)
-> (CreateMLTransformResponse -> CreateMLTransformResponse -> Bool)
-> Eq CreateMLTransformResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMLTransformResponse -> CreateMLTransformResponse -> Bool
$c/= :: CreateMLTransformResponse -> CreateMLTransformResponse -> Bool
== :: CreateMLTransformResponse -> CreateMLTransformResponse -> Bool
$c== :: CreateMLTransformResponse -> CreateMLTransformResponse -> Bool
Prelude.Eq, ReadPrec [CreateMLTransformResponse]
ReadPrec CreateMLTransformResponse
Int -> ReadS CreateMLTransformResponse
ReadS [CreateMLTransformResponse]
(Int -> ReadS CreateMLTransformResponse)
-> ReadS [CreateMLTransformResponse]
-> ReadPrec CreateMLTransformResponse
-> ReadPrec [CreateMLTransformResponse]
-> Read CreateMLTransformResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMLTransformResponse]
$creadListPrec :: ReadPrec [CreateMLTransformResponse]
readPrec :: ReadPrec CreateMLTransformResponse
$creadPrec :: ReadPrec CreateMLTransformResponse
readList :: ReadS [CreateMLTransformResponse]
$creadList :: ReadS [CreateMLTransformResponse]
readsPrec :: Int -> ReadS CreateMLTransformResponse
$creadsPrec :: Int -> ReadS CreateMLTransformResponse
Prelude.Read, Int -> CreateMLTransformResponse -> ShowS
[CreateMLTransformResponse] -> ShowS
CreateMLTransformResponse -> String
(Int -> CreateMLTransformResponse -> ShowS)
-> (CreateMLTransformResponse -> String)
-> ([CreateMLTransformResponse] -> ShowS)
-> Show CreateMLTransformResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMLTransformResponse] -> ShowS
$cshowList :: [CreateMLTransformResponse] -> ShowS
show :: CreateMLTransformResponse -> String
$cshow :: CreateMLTransformResponse -> String
showsPrec :: Int -> CreateMLTransformResponse -> ShowS
$cshowsPrec :: Int -> CreateMLTransformResponse -> ShowS
Prelude.Show, (forall x.
CreateMLTransformResponse -> Rep CreateMLTransformResponse x)
-> (forall x.
Rep CreateMLTransformResponse x -> CreateMLTransformResponse)
-> Generic CreateMLTransformResponse
forall x.
Rep CreateMLTransformResponse x -> CreateMLTransformResponse
forall x.
CreateMLTransformResponse -> Rep CreateMLTransformResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateMLTransformResponse x -> CreateMLTransformResponse
$cfrom :: forall x.
CreateMLTransformResponse -> Rep CreateMLTransformResponse x
Prelude.Generic)
newCreateMLTransformResponse ::
Prelude.Int ->
CreateMLTransformResponse
newCreateMLTransformResponse :: Int -> CreateMLTransformResponse
newCreateMLTransformResponse Int
pHttpStatus_ =
CreateMLTransformResponse' :: Maybe Text -> Int -> CreateMLTransformResponse
CreateMLTransformResponse'
{ $sel:transformId:CreateMLTransformResponse' :: Maybe Text
transformId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateMLTransformResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createMLTransformResponse_transformId :: Lens.Lens' CreateMLTransformResponse (Prelude.Maybe Prelude.Text)
createMLTransformResponse_transformId :: (Maybe Text -> f (Maybe Text))
-> CreateMLTransformResponse -> f CreateMLTransformResponse
createMLTransformResponse_transformId = (CreateMLTransformResponse -> Maybe Text)
-> (CreateMLTransformResponse
-> Maybe Text -> CreateMLTransformResponse)
-> Lens
CreateMLTransformResponse
CreateMLTransformResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransformResponse' {Maybe Text
transformId :: Maybe Text
$sel:transformId:CreateMLTransformResponse' :: CreateMLTransformResponse -> Maybe Text
transformId} -> Maybe Text
transformId) (\s :: CreateMLTransformResponse
s@CreateMLTransformResponse' {} Maybe Text
a -> CreateMLTransformResponse
s {$sel:transformId:CreateMLTransformResponse' :: Maybe Text
transformId = Maybe Text
a} :: CreateMLTransformResponse)
createMLTransformResponse_httpStatus :: Lens.Lens' CreateMLTransformResponse Prelude.Int
createMLTransformResponse_httpStatus :: (Int -> f Int)
-> CreateMLTransformResponse -> f CreateMLTransformResponse
createMLTransformResponse_httpStatus = (CreateMLTransformResponse -> Int)
-> (CreateMLTransformResponse -> Int -> CreateMLTransformResponse)
-> Lens CreateMLTransformResponse CreateMLTransformResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLTransformResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateMLTransformResponse' :: CreateMLTransformResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateMLTransformResponse
s@CreateMLTransformResponse' {} Int
a -> CreateMLTransformResponse
s {$sel:httpStatus:CreateMLTransformResponse' :: Int
httpStatus = Int
a} :: CreateMLTransformResponse)
instance Prelude.NFData CreateMLTransformResponse