{-# 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.Personalize.CreateBatchInferenceJob
(
CreateBatchInferenceJob (..),
newCreateBatchInferenceJob,
createBatchInferenceJob_batchInferenceJobConfig,
createBatchInferenceJob_filterArn,
createBatchInferenceJob_numResults,
createBatchInferenceJob_tags,
createBatchInferenceJob_jobName,
createBatchInferenceJob_solutionVersionArn,
createBatchInferenceJob_jobInput,
createBatchInferenceJob_jobOutput,
createBatchInferenceJob_roleArn,
CreateBatchInferenceJobResponse (..),
newCreateBatchInferenceJobResponse,
createBatchInferenceJobResponse_batchInferenceJobArn,
createBatchInferenceJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Personalize.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateBatchInferenceJob = CreateBatchInferenceJob'
{
CreateBatchInferenceJob -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig :: Prelude.Maybe BatchInferenceJobConfig,
CreateBatchInferenceJob -> Maybe Text
filterArn :: Prelude.Maybe Prelude.Text,
CreateBatchInferenceJob -> Maybe Int
numResults :: Prelude.Maybe Prelude.Int,
CreateBatchInferenceJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateBatchInferenceJob -> Text
jobName :: Prelude.Text,
CreateBatchInferenceJob -> Text
solutionVersionArn :: Prelude.Text,
CreateBatchInferenceJob -> BatchInferenceJobInput
jobInput :: BatchInferenceJobInput,
CreateBatchInferenceJob -> BatchInferenceJobOutput
jobOutput :: BatchInferenceJobOutput,
CreateBatchInferenceJob -> Text
roleArn :: Prelude.Text
}
deriving (CreateBatchInferenceJob -> CreateBatchInferenceJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBatchInferenceJob -> CreateBatchInferenceJob -> Bool
$c/= :: CreateBatchInferenceJob -> CreateBatchInferenceJob -> Bool
== :: CreateBatchInferenceJob -> CreateBatchInferenceJob -> Bool
$c== :: CreateBatchInferenceJob -> CreateBatchInferenceJob -> Bool
Prelude.Eq, ReadPrec [CreateBatchInferenceJob]
ReadPrec CreateBatchInferenceJob
Int -> ReadS CreateBatchInferenceJob
ReadS [CreateBatchInferenceJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBatchInferenceJob]
$creadListPrec :: ReadPrec [CreateBatchInferenceJob]
readPrec :: ReadPrec CreateBatchInferenceJob
$creadPrec :: ReadPrec CreateBatchInferenceJob
readList :: ReadS [CreateBatchInferenceJob]
$creadList :: ReadS [CreateBatchInferenceJob]
readsPrec :: Int -> ReadS CreateBatchInferenceJob
$creadsPrec :: Int -> ReadS CreateBatchInferenceJob
Prelude.Read, Int -> CreateBatchInferenceJob -> ShowS
[CreateBatchInferenceJob] -> ShowS
CreateBatchInferenceJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBatchInferenceJob] -> ShowS
$cshowList :: [CreateBatchInferenceJob] -> ShowS
show :: CreateBatchInferenceJob -> String
$cshow :: CreateBatchInferenceJob -> String
showsPrec :: Int -> CreateBatchInferenceJob -> ShowS
$cshowsPrec :: Int -> CreateBatchInferenceJob -> ShowS
Prelude.Show, forall x. Rep CreateBatchInferenceJob x -> CreateBatchInferenceJob
forall x. CreateBatchInferenceJob -> Rep CreateBatchInferenceJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateBatchInferenceJob x -> CreateBatchInferenceJob
$cfrom :: forall x. CreateBatchInferenceJob -> Rep CreateBatchInferenceJob x
Prelude.Generic)
newCreateBatchInferenceJob ::
Prelude.Text ->
Prelude.Text ->
BatchInferenceJobInput ->
BatchInferenceJobOutput ->
Prelude.Text ->
CreateBatchInferenceJob
newCreateBatchInferenceJob :: Text
-> Text
-> BatchInferenceJobInput
-> BatchInferenceJobOutput
-> Text
-> CreateBatchInferenceJob
newCreateBatchInferenceJob
Text
pJobName_
Text
pSolutionVersionArn_
BatchInferenceJobInput
pJobInput_
BatchInferenceJobOutput
pJobOutput_
Text
pRoleArn_ =
CreateBatchInferenceJob'
{ $sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: Maybe BatchInferenceJobConfig
batchInferenceJobConfig =
forall a. Maybe a
Prelude.Nothing,
$sel:filterArn:CreateBatchInferenceJob' :: Maybe Text
filterArn = forall a. Maybe a
Prelude.Nothing,
$sel:numResults:CreateBatchInferenceJob' :: Maybe Int
numResults = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateBatchInferenceJob' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:jobName:CreateBatchInferenceJob' :: Text
jobName = Text
pJobName_,
$sel:solutionVersionArn:CreateBatchInferenceJob' :: Text
solutionVersionArn = Text
pSolutionVersionArn_,
$sel:jobInput:CreateBatchInferenceJob' :: BatchInferenceJobInput
jobInput = BatchInferenceJobInput
pJobInput_,
$sel:jobOutput:CreateBatchInferenceJob' :: BatchInferenceJobOutput
jobOutput = BatchInferenceJobOutput
pJobOutput_,
$sel:roleArn:CreateBatchInferenceJob' :: Text
roleArn = Text
pRoleArn_
}
createBatchInferenceJob_batchInferenceJobConfig :: Lens.Lens' CreateBatchInferenceJob (Prelude.Maybe BatchInferenceJobConfig)
createBatchInferenceJob_batchInferenceJobConfig :: Lens' CreateBatchInferenceJob (Maybe BatchInferenceJobConfig)
createBatchInferenceJob_batchInferenceJobConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Maybe BatchInferenceJobConfig
batchInferenceJobConfig :: Maybe BatchInferenceJobConfig
$sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig} -> Maybe BatchInferenceJobConfig
batchInferenceJobConfig) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Maybe BatchInferenceJobConfig
a -> CreateBatchInferenceJob
s {$sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: Maybe BatchInferenceJobConfig
batchInferenceJobConfig = Maybe BatchInferenceJobConfig
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_filterArn :: Lens.Lens' CreateBatchInferenceJob (Prelude.Maybe Prelude.Text)
createBatchInferenceJob_filterArn :: Lens' CreateBatchInferenceJob (Maybe Text)
createBatchInferenceJob_filterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Maybe Text
filterArn :: Maybe Text
$sel:filterArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Text
filterArn} -> Maybe Text
filterArn) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Maybe Text
a -> CreateBatchInferenceJob
s {$sel:filterArn:CreateBatchInferenceJob' :: Maybe Text
filterArn = Maybe Text
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_numResults :: Lens.Lens' CreateBatchInferenceJob (Prelude.Maybe Prelude.Int)
createBatchInferenceJob_numResults :: Lens' CreateBatchInferenceJob (Maybe Int)
createBatchInferenceJob_numResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Maybe Int
numResults :: Maybe Int
$sel:numResults:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Int
numResults} -> Maybe Int
numResults) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Maybe Int
a -> CreateBatchInferenceJob
s {$sel:numResults:CreateBatchInferenceJob' :: Maybe Int
numResults = Maybe Int
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_tags :: Lens.Lens' CreateBatchInferenceJob (Prelude.Maybe [Tag])
createBatchInferenceJob_tags :: Lens' CreateBatchInferenceJob (Maybe [Tag])
createBatchInferenceJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Maybe [Tag]
a -> CreateBatchInferenceJob
s {$sel:tags:CreateBatchInferenceJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateBatchInferenceJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createBatchInferenceJob_jobName :: Lens.Lens' CreateBatchInferenceJob Prelude.Text
createBatchInferenceJob_jobName :: Lens' CreateBatchInferenceJob Text
createBatchInferenceJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Text
jobName :: Text
$sel:jobName:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
jobName} -> Text
jobName) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Text
a -> CreateBatchInferenceJob
s {$sel:jobName:CreateBatchInferenceJob' :: Text
jobName = Text
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_solutionVersionArn :: Lens.Lens' CreateBatchInferenceJob Prelude.Text
createBatchInferenceJob_solutionVersionArn :: Lens' CreateBatchInferenceJob Text
createBatchInferenceJob_solutionVersionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Text
solutionVersionArn :: Text
$sel:solutionVersionArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
solutionVersionArn} -> Text
solutionVersionArn) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Text
a -> CreateBatchInferenceJob
s {$sel:solutionVersionArn:CreateBatchInferenceJob' :: Text
solutionVersionArn = Text
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_jobInput :: Lens.Lens' CreateBatchInferenceJob BatchInferenceJobInput
createBatchInferenceJob_jobInput :: Lens' CreateBatchInferenceJob BatchInferenceJobInput
createBatchInferenceJob_jobInput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {BatchInferenceJobInput
jobInput :: BatchInferenceJobInput
$sel:jobInput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobInput
jobInput} -> BatchInferenceJobInput
jobInput) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} BatchInferenceJobInput
a -> CreateBatchInferenceJob
s {$sel:jobInput:CreateBatchInferenceJob' :: BatchInferenceJobInput
jobInput = BatchInferenceJobInput
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_jobOutput :: Lens.Lens' CreateBatchInferenceJob BatchInferenceJobOutput
createBatchInferenceJob_jobOutput :: Lens' CreateBatchInferenceJob BatchInferenceJobOutput
createBatchInferenceJob_jobOutput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {BatchInferenceJobOutput
jobOutput :: BatchInferenceJobOutput
$sel:jobOutput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobOutput
jobOutput} -> BatchInferenceJobOutput
jobOutput) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} BatchInferenceJobOutput
a -> CreateBatchInferenceJob
s {$sel:jobOutput:CreateBatchInferenceJob' :: BatchInferenceJobOutput
jobOutput = BatchInferenceJobOutput
a} :: CreateBatchInferenceJob)
createBatchInferenceJob_roleArn :: Lens.Lens' CreateBatchInferenceJob Prelude.Text
createBatchInferenceJob_roleArn :: Lens' CreateBatchInferenceJob Text
createBatchInferenceJob_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJob' {Text
roleArn :: Text
$sel:roleArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateBatchInferenceJob
s@CreateBatchInferenceJob' {} Text
a -> CreateBatchInferenceJob
s {$sel:roleArn:CreateBatchInferenceJob' :: Text
roleArn = Text
a} :: CreateBatchInferenceJob)
instance Core.AWSRequest CreateBatchInferenceJob where
type
AWSResponse CreateBatchInferenceJob =
CreateBatchInferenceJobResponse
request :: (Service -> Service)
-> CreateBatchInferenceJob -> Request CreateBatchInferenceJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateBatchInferenceJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateBatchInferenceJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateBatchInferenceJobResponse
CreateBatchInferenceJobResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"batchInferenceJobArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateBatchInferenceJob where
hashWithSalt :: Int -> CreateBatchInferenceJob -> Int
hashWithSalt Int
_salt CreateBatchInferenceJob' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe BatchInferenceJobConfig
Text
BatchInferenceJobOutput
BatchInferenceJobInput
roleArn :: Text
jobOutput :: BatchInferenceJobOutput
jobInput :: BatchInferenceJobInput
solutionVersionArn :: Text
jobName :: Text
tags :: Maybe [Tag]
numResults :: Maybe Int
filterArn :: Maybe Text
batchInferenceJobConfig :: Maybe BatchInferenceJobConfig
$sel:roleArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobOutput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobOutput
$sel:jobInput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobInput
$sel:solutionVersionArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobName:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:tags:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe [Tag]
$sel:numResults:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Int
$sel:filterArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Text
$sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe BatchInferenceJobConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BatchInferenceJobConfig
batchInferenceJobConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
filterArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
numResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
solutionVersionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchInferenceJobInput
jobInput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchInferenceJobOutput
jobOutput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
instance Prelude.NFData CreateBatchInferenceJob where
rnf :: CreateBatchInferenceJob -> ()
rnf CreateBatchInferenceJob' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe BatchInferenceJobConfig
Text
BatchInferenceJobOutput
BatchInferenceJobInput
roleArn :: Text
jobOutput :: BatchInferenceJobOutput
jobInput :: BatchInferenceJobInput
solutionVersionArn :: Text
jobName :: Text
tags :: Maybe [Tag]
numResults :: Maybe Int
filterArn :: Maybe Text
batchInferenceJobConfig :: Maybe BatchInferenceJobConfig
$sel:roleArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobOutput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobOutput
$sel:jobInput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobInput
$sel:solutionVersionArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobName:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:tags:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe [Tag]
$sel:numResults:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Int
$sel:filterArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Text
$sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe BatchInferenceJobConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe BatchInferenceJobConfig
batchInferenceJobConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
filterArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
numResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
solutionVersionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BatchInferenceJobInput
jobInput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BatchInferenceJobOutput
jobOutput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
instance Data.ToHeaders CreateBatchInferenceJob where
toHeaders :: CreateBatchInferenceJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonPersonalize.CreateBatchInferenceJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateBatchInferenceJob where
toJSON :: CreateBatchInferenceJob -> Value
toJSON CreateBatchInferenceJob' {Maybe Int
Maybe [Tag]
Maybe Text
Maybe BatchInferenceJobConfig
Text
BatchInferenceJobOutput
BatchInferenceJobInput
roleArn :: Text
jobOutput :: BatchInferenceJobOutput
jobInput :: BatchInferenceJobInput
solutionVersionArn :: Text
jobName :: Text
tags :: Maybe [Tag]
numResults :: Maybe Int
filterArn :: Maybe Text
batchInferenceJobConfig :: Maybe BatchInferenceJobConfig
$sel:roleArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobOutput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobOutput
$sel:jobInput:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> BatchInferenceJobInput
$sel:solutionVersionArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:jobName:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Text
$sel:tags:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe [Tag]
$sel:numResults:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Int
$sel:filterArn:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe Text
$sel:batchInferenceJobConfig:CreateBatchInferenceJob' :: CreateBatchInferenceJob -> Maybe BatchInferenceJobConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"batchInferenceJobConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchInferenceJobConfig
batchInferenceJobConfig,
(Key
"filterArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
filterArn,
(Key
"numResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numResults,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"jobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobName),
forall a. a -> Maybe a
Prelude.Just
(Key
"solutionVersionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
solutionVersionArn),
forall a. a -> Maybe a
Prelude.Just (Key
"jobInput" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= BatchInferenceJobInput
jobInput),
forall a. a -> Maybe a
Prelude.Just (Key
"jobOutput" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= BatchInferenceJobOutput
jobOutput),
forall a. a -> Maybe a
Prelude.Just (Key
"roleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
]
)
instance Data.ToPath CreateBatchInferenceJob where
toPath :: CreateBatchInferenceJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateBatchInferenceJob where
toQuery :: CreateBatchInferenceJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateBatchInferenceJobResponse = CreateBatchInferenceJobResponse'
{
CreateBatchInferenceJobResponse -> Maybe Text
batchInferenceJobArn :: Prelude.Maybe Prelude.Text,
CreateBatchInferenceJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateBatchInferenceJobResponse
-> CreateBatchInferenceJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateBatchInferenceJobResponse
-> CreateBatchInferenceJobResponse -> Bool
$c/= :: CreateBatchInferenceJobResponse
-> CreateBatchInferenceJobResponse -> Bool
== :: CreateBatchInferenceJobResponse
-> CreateBatchInferenceJobResponse -> Bool
$c== :: CreateBatchInferenceJobResponse
-> CreateBatchInferenceJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateBatchInferenceJobResponse]
ReadPrec CreateBatchInferenceJobResponse
Int -> ReadS CreateBatchInferenceJobResponse
ReadS [CreateBatchInferenceJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateBatchInferenceJobResponse]
$creadListPrec :: ReadPrec [CreateBatchInferenceJobResponse]
readPrec :: ReadPrec CreateBatchInferenceJobResponse
$creadPrec :: ReadPrec CreateBatchInferenceJobResponse
readList :: ReadS [CreateBatchInferenceJobResponse]
$creadList :: ReadS [CreateBatchInferenceJobResponse]
readsPrec :: Int -> ReadS CreateBatchInferenceJobResponse
$creadsPrec :: Int -> ReadS CreateBatchInferenceJobResponse
Prelude.Read, Int -> CreateBatchInferenceJobResponse -> ShowS
[CreateBatchInferenceJobResponse] -> ShowS
CreateBatchInferenceJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateBatchInferenceJobResponse] -> ShowS
$cshowList :: [CreateBatchInferenceJobResponse] -> ShowS
show :: CreateBatchInferenceJobResponse -> String
$cshow :: CreateBatchInferenceJobResponse -> String
showsPrec :: Int -> CreateBatchInferenceJobResponse -> ShowS
$cshowsPrec :: Int -> CreateBatchInferenceJobResponse -> ShowS
Prelude.Show, forall x.
Rep CreateBatchInferenceJobResponse x
-> CreateBatchInferenceJobResponse
forall x.
CreateBatchInferenceJobResponse
-> Rep CreateBatchInferenceJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateBatchInferenceJobResponse x
-> CreateBatchInferenceJobResponse
$cfrom :: forall x.
CreateBatchInferenceJobResponse
-> Rep CreateBatchInferenceJobResponse x
Prelude.Generic)
newCreateBatchInferenceJobResponse ::
Prelude.Int ->
CreateBatchInferenceJobResponse
newCreateBatchInferenceJobResponse :: Int -> CreateBatchInferenceJobResponse
newCreateBatchInferenceJobResponse Int
pHttpStatus_ =
CreateBatchInferenceJobResponse'
{ $sel:batchInferenceJobArn:CreateBatchInferenceJobResponse' :: Maybe Text
batchInferenceJobArn =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateBatchInferenceJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createBatchInferenceJobResponse_batchInferenceJobArn :: Lens.Lens' CreateBatchInferenceJobResponse (Prelude.Maybe Prelude.Text)
createBatchInferenceJobResponse_batchInferenceJobArn :: Lens' CreateBatchInferenceJobResponse (Maybe Text)
createBatchInferenceJobResponse_batchInferenceJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJobResponse' {Maybe Text
batchInferenceJobArn :: Maybe Text
$sel:batchInferenceJobArn:CreateBatchInferenceJobResponse' :: CreateBatchInferenceJobResponse -> Maybe Text
batchInferenceJobArn} -> Maybe Text
batchInferenceJobArn) (\s :: CreateBatchInferenceJobResponse
s@CreateBatchInferenceJobResponse' {} Maybe Text
a -> CreateBatchInferenceJobResponse
s {$sel:batchInferenceJobArn:CreateBatchInferenceJobResponse' :: Maybe Text
batchInferenceJobArn = Maybe Text
a} :: CreateBatchInferenceJobResponse)
createBatchInferenceJobResponse_httpStatus :: Lens.Lens' CreateBatchInferenceJobResponse Prelude.Int
createBatchInferenceJobResponse_httpStatus :: Lens' CreateBatchInferenceJobResponse Int
createBatchInferenceJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateBatchInferenceJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateBatchInferenceJobResponse' :: CreateBatchInferenceJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateBatchInferenceJobResponse
s@CreateBatchInferenceJobResponse' {} Int
a -> CreateBatchInferenceJobResponse
s {$sel:httpStatus:CreateBatchInferenceJobResponse' :: Int
httpStatus = Int
a} :: CreateBatchInferenceJobResponse)
instance
Prelude.NFData
CreateBatchInferenceJobResponse
where
rnf :: CreateBatchInferenceJobResponse -> ()
rnf CreateBatchInferenceJobResponse' {Int
Maybe Text
httpStatus :: Int
batchInferenceJobArn :: Maybe Text
$sel:httpStatus:CreateBatchInferenceJobResponse' :: CreateBatchInferenceJobResponse -> Int
$sel:batchInferenceJobArn:CreateBatchInferenceJobResponse' :: CreateBatchInferenceJobResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
batchInferenceJobArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus