{-# 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.MediaConvert.UpdateJobTemplate
(
UpdateJobTemplate (..),
newUpdateJobTemplate,
updateJobTemplate_accelerationSettings,
updateJobTemplate_priority,
updateJobTemplate_statusUpdateInterval,
updateJobTemplate_settings,
updateJobTemplate_category,
updateJobTemplate_hopDestinations,
updateJobTemplate_queue,
updateJobTemplate_description,
updateJobTemplate_name,
UpdateJobTemplateResponse (..),
newUpdateJobTemplateResponse,
updateJobTemplateResponse_jobTemplate,
updateJobTemplateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateJobTemplate = UpdateJobTemplate'
{
UpdateJobTemplate -> Maybe AccelerationSettings
accelerationSettings :: Prelude.Maybe AccelerationSettings,
UpdateJobTemplate -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
UpdateJobTemplate -> Maybe StatusUpdateInterval
statusUpdateInterval :: Prelude.Maybe StatusUpdateInterval,
UpdateJobTemplate -> Maybe JobTemplateSettings
settings :: Prelude.Maybe JobTemplateSettings,
UpdateJobTemplate -> Maybe Text
category :: Prelude.Maybe Prelude.Text,
UpdateJobTemplate -> Maybe [HopDestination]
hopDestinations :: Prelude.Maybe [HopDestination],
UpdateJobTemplate -> Maybe Text
queue :: Prelude.Maybe Prelude.Text,
UpdateJobTemplate -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateJobTemplate -> Text
name :: Prelude.Text
}
deriving (UpdateJobTemplate -> UpdateJobTemplate -> Bool
(UpdateJobTemplate -> UpdateJobTemplate -> Bool)
-> (UpdateJobTemplate -> UpdateJobTemplate -> Bool)
-> Eq UpdateJobTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobTemplate -> UpdateJobTemplate -> Bool
$c/= :: UpdateJobTemplate -> UpdateJobTemplate -> Bool
== :: UpdateJobTemplate -> UpdateJobTemplate -> Bool
$c== :: UpdateJobTemplate -> UpdateJobTemplate -> Bool
Prelude.Eq, ReadPrec [UpdateJobTemplate]
ReadPrec UpdateJobTemplate
Int -> ReadS UpdateJobTemplate
ReadS [UpdateJobTemplate]
(Int -> ReadS UpdateJobTemplate)
-> ReadS [UpdateJobTemplate]
-> ReadPrec UpdateJobTemplate
-> ReadPrec [UpdateJobTemplate]
-> Read UpdateJobTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobTemplate]
$creadListPrec :: ReadPrec [UpdateJobTemplate]
readPrec :: ReadPrec UpdateJobTemplate
$creadPrec :: ReadPrec UpdateJobTemplate
readList :: ReadS [UpdateJobTemplate]
$creadList :: ReadS [UpdateJobTemplate]
readsPrec :: Int -> ReadS UpdateJobTemplate
$creadsPrec :: Int -> ReadS UpdateJobTemplate
Prelude.Read, Int -> UpdateJobTemplate -> ShowS
[UpdateJobTemplate] -> ShowS
UpdateJobTemplate -> String
(Int -> UpdateJobTemplate -> ShowS)
-> (UpdateJobTemplate -> String)
-> ([UpdateJobTemplate] -> ShowS)
-> Show UpdateJobTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobTemplate] -> ShowS
$cshowList :: [UpdateJobTemplate] -> ShowS
show :: UpdateJobTemplate -> String
$cshow :: UpdateJobTemplate -> String
showsPrec :: Int -> UpdateJobTemplate -> ShowS
$cshowsPrec :: Int -> UpdateJobTemplate -> ShowS
Prelude.Show, (forall x. UpdateJobTemplate -> Rep UpdateJobTemplate x)
-> (forall x. Rep UpdateJobTemplate x -> UpdateJobTemplate)
-> Generic UpdateJobTemplate
forall x. Rep UpdateJobTemplate x -> UpdateJobTemplate
forall x. UpdateJobTemplate -> Rep UpdateJobTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJobTemplate x -> UpdateJobTemplate
$cfrom :: forall x. UpdateJobTemplate -> Rep UpdateJobTemplate x
Prelude.Generic)
newUpdateJobTemplate ::
Prelude.Text ->
UpdateJobTemplate
newUpdateJobTemplate :: Text -> UpdateJobTemplate
newUpdateJobTemplate Text
pName_ =
UpdateJobTemplate' :: Maybe AccelerationSettings
-> Maybe Int
-> Maybe StatusUpdateInterval
-> Maybe JobTemplateSettings
-> Maybe Text
-> Maybe [HopDestination]
-> Maybe Text
-> Maybe Text
-> Text
-> UpdateJobTemplate
UpdateJobTemplate'
{ $sel:accelerationSettings:UpdateJobTemplate' :: Maybe AccelerationSettings
accelerationSettings =
Maybe AccelerationSettings
forall a. Maybe a
Prelude.Nothing,
$sel:priority:UpdateJobTemplate' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:statusUpdateInterval:UpdateJobTemplate' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
forall a. Maybe a
Prelude.Nothing,
$sel:settings:UpdateJobTemplate' :: Maybe JobTemplateSettings
settings = Maybe JobTemplateSettings
forall a. Maybe a
Prelude.Nothing,
$sel:category:UpdateJobTemplate' :: Maybe Text
category = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hopDestinations:UpdateJobTemplate' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
forall a. Maybe a
Prelude.Nothing,
$sel:queue:UpdateJobTemplate' :: Maybe Text
queue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateJobTemplate' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateJobTemplate' :: Text
name = Text
pName_
}
updateJobTemplate_accelerationSettings :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe AccelerationSettings)
updateJobTemplate_accelerationSettings :: (Maybe AccelerationSettings -> f (Maybe AccelerationSettings))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_accelerationSettings = (UpdateJobTemplate -> Maybe AccelerationSettings)
-> (UpdateJobTemplate
-> Maybe AccelerationSettings -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate
UpdateJobTemplate
(Maybe AccelerationSettings)
(Maybe AccelerationSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe AccelerationSettings
accelerationSettings :: Maybe AccelerationSettings
$sel:accelerationSettings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe AccelerationSettings
accelerationSettings} -> Maybe AccelerationSettings
accelerationSettings) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe AccelerationSettings
a -> UpdateJobTemplate
s {$sel:accelerationSettings:UpdateJobTemplate' :: Maybe AccelerationSettings
accelerationSettings = Maybe AccelerationSettings
a} :: UpdateJobTemplate)
updateJobTemplate_priority :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe Prelude.Int)
updateJobTemplate_priority :: (Maybe Int -> f (Maybe Int))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_priority = (UpdateJobTemplate -> Maybe Int)
-> (UpdateJobTemplate -> Maybe Int -> UpdateJobTemplate)
-> Lens UpdateJobTemplate UpdateJobTemplate (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe Int
priority :: Maybe Int
$sel:priority:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Int
priority} -> Maybe Int
priority) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe Int
a -> UpdateJobTemplate
s {$sel:priority:UpdateJobTemplate' :: Maybe Int
priority = Maybe Int
a} :: UpdateJobTemplate)
updateJobTemplate_statusUpdateInterval :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe StatusUpdateInterval)
updateJobTemplate_statusUpdateInterval :: (Maybe StatusUpdateInterval -> f (Maybe StatusUpdateInterval))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_statusUpdateInterval = (UpdateJobTemplate -> Maybe StatusUpdateInterval)
-> (UpdateJobTemplate
-> Maybe StatusUpdateInterval -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate
UpdateJobTemplate
(Maybe StatusUpdateInterval)
(Maybe StatusUpdateInterval)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe StatusUpdateInterval
statusUpdateInterval :: Maybe StatusUpdateInterval
$sel:statusUpdateInterval:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe StatusUpdateInterval
statusUpdateInterval} -> Maybe StatusUpdateInterval
statusUpdateInterval) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe StatusUpdateInterval
a -> UpdateJobTemplate
s {$sel:statusUpdateInterval:UpdateJobTemplate' :: Maybe StatusUpdateInterval
statusUpdateInterval = Maybe StatusUpdateInterval
a} :: UpdateJobTemplate)
updateJobTemplate_settings :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe JobTemplateSettings)
updateJobTemplate_settings :: (Maybe JobTemplateSettings -> f (Maybe JobTemplateSettings))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_settings = (UpdateJobTemplate -> Maybe JobTemplateSettings)
-> (UpdateJobTemplate
-> Maybe JobTemplateSettings -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate
UpdateJobTemplate
(Maybe JobTemplateSettings)
(Maybe JobTemplateSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe JobTemplateSettings
settings :: Maybe JobTemplateSettings
$sel:settings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe JobTemplateSettings
settings} -> Maybe JobTemplateSettings
settings) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe JobTemplateSettings
a -> UpdateJobTemplate
s {$sel:settings:UpdateJobTemplate' :: Maybe JobTemplateSettings
settings = Maybe JobTemplateSettings
a} :: UpdateJobTemplate)
updateJobTemplate_category :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe Prelude.Text)
updateJobTemplate_category :: (Maybe Text -> f (Maybe Text))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_category = (UpdateJobTemplate -> Maybe Text)
-> (UpdateJobTemplate -> Maybe Text -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate UpdateJobTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe Text
category :: Maybe Text
$sel:category:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
category} -> Maybe Text
category) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe Text
a -> UpdateJobTemplate
s {$sel:category:UpdateJobTemplate' :: Maybe Text
category = Maybe Text
a} :: UpdateJobTemplate)
updateJobTemplate_hopDestinations :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe [HopDestination])
updateJobTemplate_hopDestinations :: (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_hopDestinations = (UpdateJobTemplate -> Maybe [HopDestination])
-> (UpdateJobTemplate
-> Maybe [HopDestination] -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate
UpdateJobTemplate
(Maybe [HopDestination])
(Maybe [HopDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe [HopDestination]
hopDestinations :: Maybe [HopDestination]
$sel:hopDestinations:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe [HopDestination]
hopDestinations} -> Maybe [HopDestination]
hopDestinations) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe [HopDestination]
a -> UpdateJobTemplate
s {$sel:hopDestinations:UpdateJobTemplate' :: Maybe [HopDestination]
hopDestinations = Maybe [HopDestination]
a} :: UpdateJobTemplate) ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> UpdateJobTemplate -> f UpdateJobTemplate)
-> ((Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> (Maybe [HopDestination] -> f (Maybe [HopDestination]))
-> UpdateJobTemplate
-> f UpdateJobTemplate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[HopDestination] [HopDestination] [HopDestination] [HopDestination]
-> Iso
(Maybe [HopDestination])
(Maybe [HopDestination])
(Maybe [HopDestination])
(Maybe [HopDestination])
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
[HopDestination] [HopDestination] [HopDestination] [HopDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateJobTemplate_queue :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe Prelude.Text)
updateJobTemplate_queue :: (Maybe Text -> f (Maybe Text))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_queue = (UpdateJobTemplate -> Maybe Text)
-> (UpdateJobTemplate -> Maybe Text -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate UpdateJobTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe Text
queue :: Maybe Text
$sel:queue:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
queue} -> Maybe Text
queue) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe Text
a -> UpdateJobTemplate
s {$sel:queue:UpdateJobTemplate' :: Maybe Text
queue = Maybe Text
a} :: UpdateJobTemplate)
updateJobTemplate_description :: Lens.Lens' UpdateJobTemplate (Prelude.Maybe Prelude.Text)
updateJobTemplate_description :: (Maybe Text -> f (Maybe Text))
-> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_description = (UpdateJobTemplate -> Maybe Text)
-> (UpdateJobTemplate -> Maybe Text -> UpdateJobTemplate)
-> Lens
UpdateJobTemplate UpdateJobTemplate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Maybe Text
description :: Maybe Text
$sel:description:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Maybe Text
a -> UpdateJobTemplate
s {$sel:description:UpdateJobTemplate' :: Maybe Text
description = Maybe Text
a} :: UpdateJobTemplate)
updateJobTemplate_name :: Lens.Lens' UpdateJobTemplate Prelude.Text
updateJobTemplate_name :: (Text -> f Text) -> UpdateJobTemplate -> f UpdateJobTemplate
updateJobTemplate_name = (UpdateJobTemplate -> Text)
-> (UpdateJobTemplate -> Text -> UpdateJobTemplate)
-> Lens UpdateJobTemplate UpdateJobTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplate' {Text
name :: Text
$sel:name:UpdateJobTemplate' :: UpdateJobTemplate -> Text
name} -> Text
name) (\s :: UpdateJobTemplate
s@UpdateJobTemplate' {} Text
a -> UpdateJobTemplate
s {$sel:name:UpdateJobTemplate' :: Text
name = Text
a} :: UpdateJobTemplate)
instance Core.AWSRequest UpdateJobTemplate where
type
AWSResponse UpdateJobTemplate =
UpdateJobTemplateResponse
request :: UpdateJobTemplate -> Request UpdateJobTemplate
request = Service -> UpdateJobTemplate -> Request UpdateJobTemplate
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateJobTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateJobTemplate)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateJobTemplate))
-> Logger
-> Service
-> Proxy UpdateJobTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateJobTemplate)))
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 JobTemplate -> Int -> UpdateJobTemplateResponse
UpdateJobTemplateResponse'
(Maybe JobTemplate -> Int -> UpdateJobTemplateResponse)
-> Either String (Maybe JobTemplate)
-> Either String (Int -> UpdateJobTemplateResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe JobTemplate)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobTemplate")
Either String (Int -> UpdateJobTemplateResponse)
-> Either String Int -> Either String UpdateJobTemplateResponse
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 UpdateJobTemplate
instance Prelude.NFData UpdateJobTemplate
instance Core.ToHeaders UpdateJobTemplate where
toHeaders :: UpdateJobTemplate -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateJobTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 UpdateJobTemplate where
toJSON :: UpdateJobTemplate -> Value
toJSON UpdateJobTemplate' {Maybe Int
Maybe [HopDestination]
Maybe Text
Maybe AccelerationSettings
Maybe StatusUpdateInterval
Maybe JobTemplateSettings
Text
name :: Text
description :: Maybe Text
queue :: Maybe Text
hopDestinations :: Maybe [HopDestination]
category :: Maybe Text
settings :: Maybe JobTemplateSettings
statusUpdateInterval :: Maybe StatusUpdateInterval
priority :: Maybe Int
accelerationSettings :: Maybe AccelerationSettings
$sel:name:UpdateJobTemplate' :: UpdateJobTemplate -> Text
$sel:description:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:queue:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:hopDestinations:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe [HopDestination]
$sel:category:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:settings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe JobTemplateSettings
$sel:statusUpdateInterval:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe StatusUpdateInterval
$sel:priority:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Int
$sel:accelerationSettings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe AccelerationSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"accelerationSettings" Text -> AccelerationSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AccelerationSettings -> Pair)
-> Maybe AccelerationSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccelerationSettings
accelerationSettings,
(Text
"priority" 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
priority,
(Text
"statusUpdateInterval" Text -> StatusUpdateInterval -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StatusUpdateInterval -> Pair)
-> Maybe StatusUpdateInterval -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StatusUpdateInterval
statusUpdateInterval,
(Text
"settings" Text -> JobTemplateSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobTemplateSettings -> Pair)
-> Maybe JobTemplateSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobTemplateSettings
settings,
(Text
"category" 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
category,
(Text
"hopDestinations" Text -> [HopDestination] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([HopDestination] -> Pair) -> Maybe [HopDestination] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [HopDestination]
hopDestinations,
(Text
"queue" 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
queue,
(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
]
)
instance Core.ToPath UpdateJobTemplate where
toPath :: UpdateJobTemplate -> ByteString
toPath UpdateJobTemplate' {Maybe Int
Maybe [HopDestination]
Maybe Text
Maybe AccelerationSettings
Maybe StatusUpdateInterval
Maybe JobTemplateSettings
Text
name :: Text
description :: Maybe Text
queue :: Maybe Text
hopDestinations :: Maybe [HopDestination]
category :: Maybe Text
settings :: Maybe JobTemplateSettings
statusUpdateInterval :: Maybe StatusUpdateInterval
priority :: Maybe Int
accelerationSettings :: Maybe AccelerationSettings
$sel:name:UpdateJobTemplate' :: UpdateJobTemplate -> Text
$sel:description:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:queue:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:hopDestinations:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe [HopDestination]
$sel:category:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Text
$sel:settings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe JobTemplateSettings
$sel:statusUpdateInterval:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe StatusUpdateInterval
$sel:priority:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe Int
$sel:accelerationSettings:UpdateJobTemplate' :: UpdateJobTemplate -> Maybe AccelerationSettings
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2017-08-29/jobTemplates/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery UpdateJobTemplate where
toQuery :: UpdateJobTemplate -> QueryString
toQuery = QueryString -> UpdateJobTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateJobTemplateResponse = UpdateJobTemplateResponse'
{
UpdateJobTemplateResponse -> Maybe JobTemplate
jobTemplate :: Prelude.Maybe JobTemplate,
UpdateJobTemplateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool
(UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool)
-> (UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool)
-> Eq UpdateJobTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool
$c/= :: UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool
== :: UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool
$c== :: UpdateJobTemplateResponse -> UpdateJobTemplateResponse -> Bool
Prelude.Eq, ReadPrec [UpdateJobTemplateResponse]
ReadPrec UpdateJobTemplateResponse
Int -> ReadS UpdateJobTemplateResponse
ReadS [UpdateJobTemplateResponse]
(Int -> ReadS UpdateJobTemplateResponse)
-> ReadS [UpdateJobTemplateResponse]
-> ReadPrec UpdateJobTemplateResponse
-> ReadPrec [UpdateJobTemplateResponse]
-> Read UpdateJobTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobTemplateResponse]
$creadListPrec :: ReadPrec [UpdateJobTemplateResponse]
readPrec :: ReadPrec UpdateJobTemplateResponse
$creadPrec :: ReadPrec UpdateJobTemplateResponse
readList :: ReadS [UpdateJobTemplateResponse]
$creadList :: ReadS [UpdateJobTemplateResponse]
readsPrec :: Int -> ReadS UpdateJobTemplateResponse
$creadsPrec :: Int -> ReadS UpdateJobTemplateResponse
Prelude.Read, Int -> UpdateJobTemplateResponse -> ShowS
[UpdateJobTemplateResponse] -> ShowS
UpdateJobTemplateResponse -> String
(Int -> UpdateJobTemplateResponse -> ShowS)
-> (UpdateJobTemplateResponse -> String)
-> ([UpdateJobTemplateResponse] -> ShowS)
-> Show UpdateJobTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobTemplateResponse] -> ShowS
$cshowList :: [UpdateJobTemplateResponse] -> ShowS
show :: UpdateJobTemplateResponse -> String
$cshow :: UpdateJobTemplateResponse -> String
showsPrec :: Int -> UpdateJobTemplateResponse -> ShowS
$cshowsPrec :: Int -> UpdateJobTemplateResponse -> ShowS
Prelude.Show, (forall x.
UpdateJobTemplateResponse -> Rep UpdateJobTemplateResponse x)
-> (forall x.
Rep UpdateJobTemplateResponse x -> UpdateJobTemplateResponse)
-> Generic UpdateJobTemplateResponse
forall x.
Rep UpdateJobTemplateResponse x -> UpdateJobTemplateResponse
forall x.
UpdateJobTemplateResponse -> Rep UpdateJobTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateJobTemplateResponse x -> UpdateJobTemplateResponse
$cfrom :: forall x.
UpdateJobTemplateResponse -> Rep UpdateJobTemplateResponse x
Prelude.Generic)
newUpdateJobTemplateResponse ::
Prelude.Int ->
UpdateJobTemplateResponse
newUpdateJobTemplateResponse :: Int -> UpdateJobTemplateResponse
newUpdateJobTemplateResponse Int
pHttpStatus_ =
UpdateJobTemplateResponse' :: Maybe JobTemplate -> Int -> UpdateJobTemplateResponse
UpdateJobTemplateResponse'
{ $sel:jobTemplate:UpdateJobTemplateResponse' :: Maybe JobTemplate
jobTemplate =
Maybe JobTemplate
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateJobTemplateResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateJobTemplateResponse_jobTemplate :: Lens.Lens' UpdateJobTemplateResponse (Prelude.Maybe JobTemplate)
updateJobTemplateResponse_jobTemplate :: (Maybe JobTemplate -> f (Maybe JobTemplate))
-> UpdateJobTemplateResponse -> f UpdateJobTemplateResponse
updateJobTemplateResponse_jobTemplate = (UpdateJobTemplateResponse -> Maybe JobTemplate)
-> (UpdateJobTemplateResponse
-> Maybe JobTemplate -> UpdateJobTemplateResponse)
-> Lens
UpdateJobTemplateResponse
UpdateJobTemplateResponse
(Maybe JobTemplate)
(Maybe JobTemplate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplateResponse' {Maybe JobTemplate
jobTemplate :: Maybe JobTemplate
$sel:jobTemplate:UpdateJobTemplateResponse' :: UpdateJobTemplateResponse -> Maybe JobTemplate
jobTemplate} -> Maybe JobTemplate
jobTemplate) (\s :: UpdateJobTemplateResponse
s@UpdateJobTemplateResponse' {} Maybe JobTemplate
a -> UpdateJobTemplateResponse
s {$sel:jobTemplate:UpdateJobTemplateResponse' :: Maybe JobTemplate
jobTemplate = Maybe JobTemplate
a} :: UpdateJobTemplateResponse)
updateJobTemplateResponse_httpStatus :: Lens.Lens' UpdateJobTemplateResponse Prelude.Int
updateJobTemplateResponse_httpStatus :: (Int -> f Int)
-> UpdateJobTemplateResponse -> f UpdateJobTemplateResponse
updateJobTemplateResponse_httpStatus = (UpdateJobTemplateResponse -> Int)
-> (UpdateJobTemplateResponse -> Int -> UpdateJobTemplateResponse)
-> Lens UpdateJobTemplateResponse UpdateJobTemplateResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobTemplateResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateJobTemplateResponse' :: UpdateJobTemplateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateJobTemplateResponse
s@UpdateJobTemplateResponse' {} Int
a -> UpdateJobTemplateResponse
s {$sel:httpStatus:UpdateJobTemplateResponse' :: Int
httpStatus = Int
a} :: UpdateJobTemplateResponse)
instance Prelude.NFData UpdateJobTemplateResponse