{-# 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.ElasticTranscoder.CreateJob
(
CreateJob (..),
newCreateJob,
createJob_inputs,
createJob_input,
createJob_userMetadata,
createJob_outputs,
createJob_output,
createJob_playlists,
createJob_outputKeyPrefix,
createJob_pipelineId,
CreateJobResponse (..),
newCreateJobResponse,
createJobResponse_job,
createJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.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 CreateJob = CreateJob'
{
CreateJob -> Maybe [JobInput]
inputs :: Prelude.Maybe [JobInput],
CreateJob -> Maybe JobInput
input :: Prelude.Maybe JobInput,
CreateJob -> Maybe (HashMap Text Text)
userMetadata :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateJob -> Maybe [CreateJobOutput]
outputs :: Prelude.Maybe [CreateJobOutput],
CreateJob -> Maybe CreateJobOutput
output :: Prelude.Maybe CreateJobOutput,
CreateJob -> Maybe [CreateJobPlaylist]
playlists :: Prelude.Maybe [CreateJobPlaylist],
CreateJob -> Maybe Text
outputKeyPrefix :: Prelude.Maybe Prelude.Text,
CreateJob -> Text
pipelineId :: Prelude.Text
}
deriving (CreateJob -> CreateJob -> Bool
(CreateJob -> CreateJob -> Bool)
-> (CreateJob -> CreateJob -> Bool) -> Eq CreateJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJob -> CreateJob -> Bool
$c/= :: CreateJob -> CreateJob -> Bool
== :: CreateJob -> CreateJob -> Bool
$c== :: CreateJob -> CreateJob -> Bool
Prelude.Eq, ReadPrec [CreateJob]
ReadPrec CreateJob
Int -> ReadS CreateJob
ReadS [CreateJob]
(Int -> ReadS CreateJob)
-> ReadS [CreateJob]
-> ReadPrec CreateJob
-> ReadPrec [CreateJob]
-> Read CreateJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJob]
$creadListPrec :: ReadPrec [CreateJob]
readPrec :: ReadPrec CreateJob
$creadPrec :: ReadPrec CreateJob
readList :: ReadS [CreateJob]
$creadList :: ReadS [CreateJob]
readsPrec :: Int -> ReadS CreateJob
$creadsPrec :: Int -> ReadS CreateJob
Prelude.Read, Int -> CreateJob -> ShowS
[CreateJob] -> ShowS
CreateJob -> String
(Int -> CreateJob -> ShowS)
-> (CreateJob -> String)
-> ([CreateJob] -> ShowS)
-> Show CreateJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJob] -> ShowS
$cshowList :: [CreateJob] -> ShowS
show :: CreateJob -> String
$cshow :: CreateJob -> String
showsPrec :: Int -> CreateJob -> ShowS
$cshowsPrec :: Int -> CreateJob -> ShowS
Prelude.Show, (forall x. CreateJob -> Rep CreateJob x)
-> (forall x. Rep CreateJob x -> CreateJob) -> Generic CreateJob
forall x. Rep CreateJob x -> CreateJob
forall x. CreateJob -> Rep CreateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJob x -> CreateJob
$cfrom :: forall x. CreateJob -> Rep CreateJob x
Prelude.Generic)
newCreateJob ::
Prelude.Text ->
CreateJob
newCreateJob :: Text -> CreateJob
newCreateJob Text
pPipelineId_ =
CreateJob' :: Maybe [JobInput]
-> Maybe JobInput
-> Maybe (HashMap Text Text)
-> Maybe [CreateJobOutput]
-> Maybe CreateJobOutput
-> Maybe [CreateJobPlaylist]
-> Maybe Text
-> Text
-> CreateJob
CreateJob'
{ $sel:inputs:CreateJob' :: Maybe [JobInput]
inputs = Maybe [JobInput]
forall a. Maybe a
Prelude.Nothing,
$sel:input:CreateJob' :: Maybe JobInput
input = Maybe JobInput
forall a. Maybe a
Prelude.Nothing,
$sel:userMetadata:CreateJob' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:outputs:CreateJob' :: Maybe [CreateJobOutput]
outputs = Maybe [CreateJobOutput]
forall a. Maybe a
Prelude.Nothing,
$sel:output:CreateJob' :: Maybe CreateJobOutput
output = Maybe CreateJobOutput
forall a. Maybe a
Prelude.Nothing,
$sel:playlists:CreateJob' :: Maybe [CreateJobPlaylist]
playlists = Maybe [CreateJobPlaylist]
forall a. Maybe a
Prelude.Nothing,
$sel:outputKeyPrefix:CreateJob' :: Maybe Text
outputKeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineId:CreateJob' :: Text
pipelineId = Text
pPipelineId_
}
createJob_inputs :: Lens.Lens' CreateJob (Prelude.Maybe [JobInput])
createJob_inputs :: (Maybe [JobInput] -> f (Maybe [JobInput]))
-> CreateJob -> f CreateJob
createJob_inputs = (CreateJob -> Maybe [JobInput])
-> (CreateJob -> Maybe [JobInput] -> CreateJob)
-> Lens CreateJob CreateJob (Maybe [JobInput]) (Maybe [JobInput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe [JobInput]
inputs :: Maybe [JobInput]
$sel:inputs:CreateJob' :: CreateJob -> Maybe [JobInput]
inputs} -> Maybe [JobInput]
inputs) (\s :: CreateJob
s@CreateJob' {} Maybe [JobInput]
a -> CreateJob
s {$sel:inputs:CreateJob' :: Maybe [JobInput]
inputs = Maybe [JobInput]
a} :: CreateJob) ((Maybe [JobInput] -> f (Maybe [JobInput]))
-> CreateJob -> f CreateJob)
-> ((Maybe [JobInput] -> f (Maybe [JobInput]))
-> Maybe [JobInput] -> f (Maybe [JobInput]))
-> (Maybe [JobInput] -> f (Maybe [JobInput]))
-> CreateJob
-> f CreateJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [JobInput] [JobInput] [JobInput] [JobInput]
-> Iso
(Maybe [JobInput])
(Maybe [JobInput])
(Maybe [JobInput])
(Maybe [JobInput])
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 [JobInput] [JobInput] [JobInput] [JobInput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createJob_input :: Lens.Lens' CreateJob (Prelude.Maybe JobInput)
createJob_input :: (Maybe JobInput -> f (Maybe JobInput)) -> CreateJob -> f CreateJob
createJob_input = (CreateJob -> Maybe JobInput)
-> (CreateJob -> Maybe JobInput -> CreateJob)
-> Lens CreateJob CreateJob (Maybe JobInput) (Maybe JobInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe JobInput
input :: Maybe JobInput
$sel:input:CreateJob' :: CreateJob -> Maybe JobInput
input} -> Maybe JobInput
input) (\s :: CreateJob
s@CreateJob' {} Maybe JobInput
a -> CreateJob
s {$sel:input:CreateJob' :: Maybe JobInput
input = Maybe JobInput
a} :: CreateJob)
createJob_userMetadata :: Lens.Lens' CreateJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createJob_userMetadata :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateJob -> f CreateJob
createJob_userMetadata = (CreateJob -> Maybe (HashMap Text Text))
-> (CreateJob -> Maybe (HashMap Text Text) -> CreateJob)
-> Lens
CreateJob
CreateJob
(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 (\CreateJob' {Maybe (HashMap Text Text)
userMetadata :: Maybe (HashMap Text Text)
$sel:userMetadata:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
userMetadata} -> Maybe (HashMap Text Text)
userMetadata) (\s :: CreateJob
s@CreateJob' {} Maybe (HashMap Text Text)
a -> CreateJob
s {$sel:userMetadata:CreateJob' :: Maybe (HashMap Text Text)
userMetadata = Maybe (HashMap Text Text)
a} :: CreateJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateJob -> f CreateJob)
-> ((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)))
-> CreateJob
-> f CreateJob
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
createJob_outputs :: Lens.Lens' CreateJob (Prelude.Maybe [CreateJobOutput])
createJob_outputs :: (Maybe [CreateJobOutput] -> f (Maybe [CreateJobOutput]))
-> CreateJob -> f CreateJob
createJob_outputs = (CreateJob -> Maybe [CreateJobOutput])
-> (CreateJob -> Maybe [CreateJobOutput] -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe [CreateJobOutput])
(Maybe [CreateJobOutput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe [CreateJobOutput]
outputs :: Maybe [CreateJobOutput]
$sel:outputs:CreateJob' :: CreateJob -> Maybe [CreateJobOutput]
outputs} -> Maybe [CreateJobOutput]
outputs) (\s :: CreateJob
s@CreateJob' {} Maybe [CreateJobOutput]
a -> CreateJob
s {$sel:outputs:CreateJob' :: Maybe [CreateJobOutput]
outputs = Maybe [CreateJobOutput]
a} :: CreateJob) ((Maybe [CreateJobOutput] -> f (Maybe [CreateJobOutput]))
-> CreateJob -> f CreateJob)
-> ((Maybe [CreateJobOutput] -> f (Maybe [CreateJobOutput]))
-> Maybe [CreateJobOutput] -> f (Maybe [CreateJobOutput]))
-> (Maybe [CreateJobOutput] -> f (Maybe [CreateJobOutput]))
-> CreateJob
-> f CreateJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CreateJobOutput]
[CreateJobOutput]
[CreateJobOutput]
[CreateJobOutput]
-> Iso
(Maybe [CreateJobOutput])
(Maybe [CreateJobOutput])
(Maybe [CreateJobOutput])
(Maybe [CreateJobOutput])
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
[CreateJobOutput]
[CreateJobOutput]
[CreateJobOutput]
[CreateJobOutput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createJob_output :: Lens.Lens' CreateJob (Prelude.Maybe CreateJobOutput)
createJob_output :: (Maybe CreateJobOutput -> f (Maybe CreateJobOutput))
-> CreateJob -> f CreateJob
createJob_output = (CreateJob -> Maybe CreateJobOutput)
-> (CreateJob -> Maybe CreateJobOutput -> CreateJob)
-> Lens
CreateJob CreateJob (Maybe CreateJobOutput) (Maybe CreateJobOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe CreateJobOutput
output :: Maybe CreateJobOutput
$sel:output:CreateJob' :: CreateJob -> Maybe CreateJobOutput
output} -> Maybe CreateJobOutput
output) (\s :: CreateJob
s@CreateJob' {} Maybe CreateJobOutput
a -> CreateJob
s {$sel:output:CreateJob' :: Maybe CreateJobOutput
output = Maybe CreateJobOutput
a} :: CreateJob)
createJob_playlists :: Lens.Lens' CreateJob (Prelude.Maybe [CreateJobPlaylist])
createJob_playlists :: (Maybe [CreateJobPlaylist] -> f (Maybe [CreateJobPlaylist]))
-> CreateJob -> f CreateJob
createJob_playlists = (CreateJob -> Maybe [CreateJobPlaylist])
-> (CreateJob -> Maybe [CreateJobPlaylist] -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe [CreateJobPlaylist])
(Maybe [CreateJobPlaylist])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe [CreateJobPlaylist]
playlists :: Maybe [CreateJobPlaylist]
$sel:playlists:CreateJob' :: CreateJob -> Maybe [CreateJobPlaylist]
playlists} -> Maybe [CreateJobPlaylist]
playlists) (\s :: CreateJob
s@CreateJob' {} Maybe [CreateJobPlaylist]
a -> CreateJob
s {$sel:playlists:CreateJob' :: Maybe [CreateJobPlaylist]
playlists = Maybe [CreateJobPlaylist]
a} :: CreateJob) ((Maybe [CreateJobPlaylist] -> f (Maybe [CreateJobPlaylist]))
-> CreateJob -> f CreateJob)
-> ((Maybe [CreateJobPlaylist] -> f (Maybe [CreateJobPlaylist]))
-> Maybe [CreateJobPlaylist] -> f (Maybe [CreateJobPlaylist]))
-> (Maybe [CreateJobPlaylist] -> f (Maybe [CreateJobPlaylist]))
-> CreateJob
-> f CreateJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CreateJobPlaylist]
[CreateJobPlaylist]
[CreateJobPlaylist]
[CreateJobPlaylist]
-> Iso
(Maybe [CreateJobPlaylist])
(Maybe [CreateJobPlaylist])
(Maybe [CreateJobPlaylist])
(Maybe [CreateJobPlaylist])
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
[CreateJobPlaylist]
[CreateJobPlaylist]
[CreateJobPlaylist]
[CreateJobPlaylist]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createJob_outputKeyPrefix :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_outputKeyPrefix :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_outputKeyPrefix = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
outputKeyPrefix :: Maybe Text
$sel:outputKeyPrefix:CreateJob' :: CreateJob -> Maybe Text
outputKeyPrefix} -> Maybe Text
outputKeyPrefix) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:outputKeyPrefix:CreateJob' :: Maybe Text
outputKeyPrefix = Maybe Text
a} :: CreateJob)
createJob_pipelineId :: Lens.Lens' CreateJob Prelude.Text
createJob_pipelineId :: (Text -> f Text) -> CreateJob -> f CreateJob
createJob_pipelineId = (CreateJob -> Text)
-> (CreateJob -> Text -> CreateJob)
-> Lens CreateJob CreateJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Text
pipelineId :: Text
$sel:pipelineId:CreateJob' :: CreateJob -> Text
pipelineId} -> Text
pipelineId) (\s :: CreateJob
s@CreateJob' {} Text
a -> CreateJob
s {$sel:pipelineId:CreateJob' :: Text
pipelineId = Text
a} :: CreateJob)
instance Core.AWSRequest CreateJob where
type AWSResponse CreateJob = CreateJobResponse
request :: CreateJob -> Request CreateJob
request = Service -> CreateJob -> Request CreateJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateJob))
-> Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
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 Job -> Int -> CreateJobResponse
CreateJobResponse'
(Maybe Job -> Int -> CreateJobResponse)
-> Either String (Maybe Job)
-> Either String (Int -> CreateJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Job)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Job")
Either String (Int -> CreateJobResponse)
-> Either String Int -> Either String CreateJobResponse
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 CreateJob
instance Prelude.NFData CreateJob
instance Core.ToHeaders CreateJob where
toHeaders :: CreateJob -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateJob where
toJSON :: CreateJob -> Value
toJSON CreateJob' {Maybe [CreateJobPlaylist]
Maybe [JobInput]
Maybe [CreateJobOutput]
Maybe Text
Maybe (HashMap Text Text)
Maybe JobInput
Maybe CreateJobOutput
Text
pipelineId :: Text
outputKeyPrefix :: Maybe Text
playlists :: Maybe [CreateJobPlaylist]
output :: Maybe CreateJobOutput
outputs :: Maybe [CreateJobOutput]
userMetadata :: Maybe (HashMap Text Text)
input :: Maybe JobInput
inputs :: Maybe [JobInput]
$sel:pipelineId:CreateJob' :: CreateJob -> Text
$sel:outputKeyPrefix:CreateJob' :: CreateJob -> Maybe Text
$sel:playlists:CreateJob' :: CreateJob -> Maybe [CreateJobPlaylist]
$sel:output:CreateJob' :: CreateJob -> Maybe CreateJobOutput
$sel:outputs:CreateJob' :: CreateJob -> Maybe [CreateJobOutput]
$sel:userMetadata:CreateJob' :: CreateJob -> Maybe (HashMap Text Text)
$sel:input:CreateJob' :: CreateJob -> Maybe JobInput
$sel:inputs:CreateJob' :: CreateJob -> Maybe [JobInput]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Inputs" Text -> [JobInput] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([JobInput] -> Pair) -> Maybe [JobInput] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [JobInput]
inputs,
(Text
"Input" Text -> JobInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobInput -> Pair) -> Maybe JobInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobInput
input,
(Text
"UserMetadata" 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)
userMetadata,
(Text
"Outputs" Text -> [CreateJobOutput] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([CreateJobOutput] -> Pair)
-> Maybe [CreateJobOutput] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CreateJobOutput]
outputs,
(Text
"Output" Text -> CreateJobOutput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CreateJobOutput -> Pair) -> Maybe CreateJobOutput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CreateJobOutput
output,
(Text
"Playlists" Text -> [CreateJobPlaylist] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([CreateJobPlaylist] -> Pair)
-> Maybe [CreateJobPlaylist] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CreateJobPlaylist]
playlists,
(Text
"OutputKeyPrefix" 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
outputKeyPrefix,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PipelineId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineId)
]
)
instance Core.ToPath CreateJob where
toPath :: CreateJob -> ByteString
toPath = ByteString -> CreateJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2012-09-25/jobs"
instance Core.ToQuery CreateJob where
toQuery :: CreateJob -> QueryString
toQuery = QueryString -> CreateJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateJobResponse = CreateJobResponse'
{
CreateJobResponse -> Maybe Job
job :: Prelude.Maybe Job,
CreateJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateJobResponse -> CreateJobResponse -> Bool
(CreateJobResponse -> CreateJobResponse -> Bool)
-> (CreateJobResponse -> CreateJobResponse -> Bool)
-> Eq CreateJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobResponse -> CreateJobResponse -> Bool
$c/= :: CreateJobResponse -> CreateJobResponse -> Bool
== :: CreateJobResponse -> CreateJobResponse -> Bool
$c== :: CreateJobResponse -> CreateJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateJobResponse]
ReadPrec CreateJobResponse
Int -> ReadS CreateJobResponse
ReadS [CreateJobResponse]
(Int -> ReadS CreateJobResponse)
-> ReadS [CreateJobResponse]
-> ReadPrec CreateJobResponse
-> ReadPrec [CreateJobResponse]
-> Read CreateJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobResponse]
$creadListPrec :: ReadPrec [CreateJobResponse]
readPrec :: ReadPrec CreateJobResponse
$creadPrec :: ReadPrec CreateJobResponse
readList :: ReadS [CreateJobResponse]
$creadList :: ReadS [CreateJobResponse]
readsPrec :: Int -> ReadS CreateJobResponse
$creadsPrec :: Int -> ReadS CreateJobResponse
Prelude.Read, Int -> CreateJobResponse -> ShowS
[CreateJobResponse] -> ShowS
CreateJobResponse -> String
(Int -> CreateJobResponse -> ShowS)
-> (CreateJobResponse -> String)
-> ([CreateJobResponse] -> ShowS)
-> Show CreateJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobResponse] -> ShowS
$cshowList :: [CreateJobResponse] -> ShowS
show :: CreateJobResponse -> String
$cshow :: CreateJobResponse -> String
showsPrec :: Int -> CreateJobResponse -> ShowS
$cshowsPrec :: Int -> CreateJobResponse -> ShowS
Prelude.Show, (forall x. CreateJobResponse -> Rep CreateJobResponse x)
-> (forall x. Rep CreateJobResponse x -> CreateJobResponse)
-> Generic CreateJobResponse
forall x. Rep CreateJobResponse x -> CreateJobResponse
forall x. CreateJobResponse -> Rep CreateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobResponse x -> CreateJobResponse
$cfrom :: forall x. CreateJobResponse -> Rep CreateJobResponse x
Prelude.Generic)
newCreateJobResponse ::
Prelude.Int ->
CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
CreateJobResponse' :: Maybe Job -> Int -> CreateJobResponse
CreateJobResponse'
{ $sel:job:CreateJobResponse' :: Maybe Job
job = Maybe Job
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createJobResponse_job :: Lens.Lens' CreateJobResponse (Prelude.Maybe Job)
createJobResponse_job :: (Maybe Job -> f (Maybe Job))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_job = (CreateJobResponse -> Maybe Job)
-> (CreateJobResponse -> Maybe Job -> CreateJobResponse)
-> Lens CreateJobResponse CreateJobResponse (Maybe Job) (Maybe Job)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Job
job :: Maybe Job
$sel:job:CreateJobResponse' :: CreateJobResponse -> Maybe Job
job} -> Maybe Job
job) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Job
a -> CreateJobResponse
s {$sel:job:CreateJobResponse' :: Maybe Job
job = Maybe Job
a} :: CreateJobResponse)
createJobResponse_httpStatus :: Lens.Lens' CreateJobResponse Prelude.Int
createJobResponse_httpStatus :: (Int -> f Int) -> CreateJobResponse -> f CreateJobResponse
createJobResponse_httpStatus = (CreateJobResponse -> Int)
-> (CreateJobResponse -> Int -> CreateJobResponse)
-> Lens CreateJobResponse CreateJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateJobResponse
s@CreateJobResponse' {} Int
a -> CreateJobResponse
s {$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
a} :: CreateJobResponse)
instance Prelude.NFData CreateJobResponse