{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoT.UpdateJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates supported fields of the specified job.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateJob>
-- action.
module Amazonka.IoT.UpdateJob
  ( -- * Creating a Request
    UpdateJob (..),
    newUpdateJob,

    -- * Request Lenses
    updateJob_jobExecutionsRolloutConfig,
    updateJob_abortConfig,
    updateJob_namespaceId,
    updateJob_presignedUrlConfig,
    updateJob_description,
    updateJob_timeoutConfig,
    updateJob_jobId,

    -- * Destructuring the Response
    UpdateJobResponse (..),
    newUpdateJobResponse,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

-- | /See:/ 'newUpdateJob' smart constructor.
data UpdateJob = UpdateJob'
  { -- | Allows you to create a staged rollout of the job.
    UpdateJob -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig :: Prelude.Maybe JobExecutionsRolloutConfig,
    -- | Allows you to create criteria to abort a job.
    UpdateJob -> Maybe AbortConfig
abortConfig :: Prelude.Maybe AbortConfig,
    -- | The namespace used to indicate that a job is a customer-managed job.
    --
    -- When you specify a value for this parameter, Amazon Web Services IoT
    -- Core sends jobs notifications to MQTT topics that contain the value in
    -- the following format.
    --
    -- @$aws\/things\/THING_NAME\/jobs\/JOB_ID\/notify-namespace-NAMESPACE_ID\/@
    --
    -- The @namespaceId@ feature is in public preview.
    UpdateJob -> Maybe Text
namespaceId :: Prelude.Maybe Prelude.Text,
    -- | Configuration information for pre-signed S3 URLs.
    UpdateJob -> Maybe PresignedUrlConfig
presignedUrlConfig :: Prelude.Maybe PresignedUrlConfig,
    -- | A short text description of the job.
    UpdateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies the amount of time each device has to finish its execution of
    -- the job. The timer is started when the job execution status is set to
    -- @IN_PROGRESS@. If the job execution status is not set to another
    -- terminal state before the time expires, it will be automatically set to
    -- @TIMED_OUT@.
    UpdateJob -> Maybe TimeoutConfig
timeoutConfig :: Prelude.Maybe TimeoutConfig,
    -- | The ID of the job to be updated.
    UpdateJob -> Text
jobId :: Prelude.Text
  }
  deriving (UpdateJob -> UpdateJob -> Bool
(UpdateJob -> UpdateJob -> Bool)
-> (UpdateJob -> UpdateJob -> Bool) -> Eq UpdateJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJob -> UpdateJob -> Bool
$c/= :: UpdateJob -> UpdateJob -> Bool
== :: UpdateJob -> UpdateJob -> Bool
$c== :: UpdateJob -> UpdateJob -> Bool
Prelude.Eq, ReadPrec [UpdateJob]
ReadPrec UpdateJob
Int -> ReadS UpdateJob
ReadS [UpdateJob]
(Int -> ReadS UpdateJob)
-> ReadS [UpdateJob]
-> ReadPrec UpdateJob
-> ReadPrec [UpdateJob]
-> Read UpdateJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJob]
$creadListPrec :: ReadPrec [UpdateJob]
readPrec :: ReadPrec UpdateJob
$creadPrec :: ReadPrec UpdateJob
readList :: ReadS [UpdateJob]
$creadList :: ReadS [UpdateJob]
readsPrec :: Int -> ReadS UpdateJob
$creadsPrec :: Int -> ReadS UpdateJob
Prelude.Read, Int -> UpdateJob -> ShowS
[UpdateJob] -> ShowS
UpdateJob -> String
(Int -> UpdateJob -> ShowS)
-> (UpdateJob -> String)
-> ([UpdateJob] -> ShowS)
-> Show UpdateJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJob] -> ShowS
$cshowList :: [UpdateJob] -> ShowS
show :: UpdateJob -> String
$cshow :: UpdateJob -> String
showsPrec :: Int -> UpdateJob -> ShowS
$cshowsPrec :: Int -> UpdateJob -> ShowS
Prelude.Show, (forall x. UpdateJob -> Rep UpdateJob x)
-> (forall x. Rep UpdateJob x -> UpdateJob) -> Generic UpdateJob
forall x. Rep UpdateJob x -> UpdateJob
forall x. UpdateJob -> Rep UpdateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJob x -> UpdateJob
$cfrom :: forall x. UpdateJob -> Rep UpdateJob x
Prelude.Generic)

-- |
-- Create a value of 'UpdateJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'jobExecutionsRolloutConfig', 'updateJob_jobExecutionsRolloutConfig' - Allows you to create a staged rollout of the job.
--
-- 'abortConfig', 'updateJob_abortConfig' - Allows you to create criteria to abort a job.
--
-- 'namespaceId', 'updateJob_namespaceId' - The namespace used to indicate that a job is a customer-managed job.
--
-- When you specify a value for this parameter, Amazon Web Services IoT
-- Core sends jobs notifications to MQTT topics that contain the value in
-- the following format.
--
-- @$aws\/things\/THING_NAME\/jobs\/JOB_ID\/notify-namespace-NAMESPACE_ID\/@
--
-- The @namespaceId@ feature is in public preview.
--
-- 'presignedUrlConfig', 'updateJob_presignedUrlConfig' - Configuration information for pre-signed S3 URLs.
--
-- 'description', 'updateJob_description' - A short text description of the job.
--
-- 'timeoutConfig', 'updateJob_timeoutConfig' - Specifies the amount of time each device has to finish its execution of
-- the job. The timer is started when the job execution status is set to
-- @IN_PROGRESS@. If the job execution status is not set to another
-- terminal state before the time expires, it will be automatically set to
-- @TIMED_OUT@.
--
-- 'jobId', 'updateJob_jobId' - The ID of the job to be updated.
newUpdateJob ::
  -- | 'jobId'
  Prelude.Text ->
  UpdateJob
newUpdateJob :: Text -> UpdateJob
newUpdateJob Text
pJobId_ =
  UpdateJob' :: Maybe JobExecutionsRolloutConfig
-> Maybe AbortConfig
-> Maybe Text
-> Maybe PresignedUrlConfig
-> Maybe Text
-> Maybe TimeoutConfig
-> Text
-> UpdateJob
UpdateJob'
    { $sel:jobExecutionsRolloutConfig:UpdateJob' :: Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig =
        Maybe JobExecutionsRolloutConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:abortConfig:UpdateJob' :: Maybe AbortConfig
abortConfig = Maybe AbortConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:namespaceId:UpdateJob' :: Maybe Text
namespaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:presignedUrlConfig:UpdateJob' :: Maybe PresignedUrlConfig
presignedUrlConfig = Maybe PresignedUrlConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateJob' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutConfig:UpdateJob' :: Maybe TimeoutConfig
timeoutConfig = Maybe TimeoutConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:UpdateJob' :: Text
jobId = Text
pJobId_
    }

-- | Allows you to create a staged rollout of the job.
updateJob_jobExecutionsRolloutConfig :: Lens.Lens' UpdateJob (Prelude.Maybe JobExecutionsRolloutConfig)
updateJob_jobExecutionsRolloutConfig :: (Maybe JobExecutionsRolloutConfig
 -> f (Maybe JobExecutionsRolloutConfig))
-> UpdateJob -> f UpdateJob
updateJob_jobExecutionsRolloutConfig = (UpdateJob -> Maybe JobExecutionsRolloutConfig)
-> (UpdateJob -> Maybe JobExecutionsRolloutConfig -> UpdateJob)
-> Lens
     UpdateJob
     UpdateJob
     (Maybe JobExecutionsRolloutConfig)
     (Maybe JobExecutionsRolloutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
$sel:jobExecutionsRolloutConfig:UpdateJob' :: UpdateJob -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig} -> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig) (\s :: UpdateJob
s@UpdateJob' {} Maybe JobExecutionsRolloutConfig
a -> UpdateJob
s {$sel:jobExecutionsRolloutConfig:UpdateJob' :: Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig = Maybe JobExecutionsRolloutConfig
a} :: UpdateJob)

-- | Allows you to create criteria to abort a job.
updateJob_abortConfig :: Lens.Lens' UpdateJob (Prelude.Maybe AbortConfig)
updateJob_abortConfig :: (Maybe AbortConfig -> f (Maybe AbortConfig))
-> UpdateJob -> f UpdateJob
updateJob_abortConfig = (UpdateJob -> Maybe AbortConfig)
-> (UpdateJob -> Maybe AbortConfig -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe AbortConfig) (Maybe AbortConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe AbortConfig
abortConfig :: Maybe AbortConfig
$sel:abortConfig:UpdateJob' :: UpdateJob -> Maybe AbortConfig
abortConfig} -> Maybe AbortConfig
abortConfig) (\s :: UpdateJob
s@UpdateJob' {} Maybe AbortConfig
a -> UpdateJob
s {$sel:abortConfig:UpdateJob' :: Maybe AbortConfig
abortConfig = Maybe AbortConfig
a} :: UpdateJob)

-- | The namespace used to indicate that a job is a customer-managed job.
--
-- When you specify a value for this parameter, Amazon Web Services IoT
-- Core sends jobs notifications to MQTT topics that contain the value in
-- the following format.
--
-- @$aws\/things\/THING_NAME\/jobs\/JOB_ID\/notify-namespace-NAMESPACE_ID\/@
--
-- The @namespaceId@ feature is in public preview.
updateJob_namespaceId :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_namespaceId :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_namespaceId = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
namespaceId :: Maybe Text
$sel:namespaceId:UpdateJob' :: UpdateJob -> Maybe Text
namespaceId} -> Maybe Text
namespaceId) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:namespaceId:UpdateJob' :: Maybe Text
namespaceId = Maybe Text
a} :: UpdateJob)

-- | Configuration information for pre-signed S3 URLs.
updateJob_presignedUrlConfig :: Lens.Lens' UpdateJob (Prelude.Maybe PresignedUrlConfig)
updateJob_presignedUrlConfig :: (Maybe PresignedUrlConfig -> f (Maybe PresignedUrlConfig))
-> UpdateJob -> f UpdateJob
updateJob_presignedUrlConfig = (UpdateJob -> Maybe PresignedUrlConfig)
-> (UpdateJob -> Maybe PresignedUrlConfig -> UpdateJob)
-> Lens
     UpdateJob
     UpdateJob
     (Maybe PresignedUrlConfig)
     (Maybe PresignedUrlConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe PresignedUrlConfig
presignedUrlConfig :: Maybe PresignedUrlConfig
$sel:presignedUrlConfig:UpdateJob' :: UpdateJob -> Maybe PresignedUrlConfig
presignedUrlConfig} -> Maybe PresignedUrlConfig
presignedUrlConfig) (\s :: UpdateJob
s@UpdateJob' {} Maybe PresignedUrlConfig
a -> UpdateJob
s {$sel:presignedUrlConfig:UpdateJob' :: Maybe PresignedUrlConfig
presignedUrlConfig = Maybe PresignedUrlConfig
a} :: UpdateJob)

-- | A short text description of the job.
updateJob_description :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_description :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_description = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
description :: Maybe Text
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:description:UpdateJob' :: Maybe Text
description = Maybe Text
a} :: UpdateJob)

-- | Specifies the amount of time each device has to finish its execution of
-- the job. The timer is started when the job execution status is set to
-- @IN_PROGRESS@. If the job execution status is not set to another
-- terminal state before the time expires, it will be automatically set to
-- @TIMED_OUT@.
updateJob_timeoutConfig :: Lens.Lens' UpdateJob (Prelude.Maybe TimeoutConfig)
updateJob_timeoutConfig :: (Maybe TimeoutConfig -> f (Maybe TimeoutConfig))
-> UpdateJob -> f UpdateJob
updateJob_timeoutConfig = (UpdateJob -> Maybe TimeoutConfig)
-> (UpdateJob -> Maybe TimeoutConfig -> UpdateJob)
-> Lens
     UpdateJob UpdateJob (Maybe TimeoutConfig) (Maybe TimeoutConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe TimeoutConfig
timeoutConfig :: Maybe TimeoutConfig
$sel:timeoutConfig:UpdateJob' :: UpdateJob -> Maybe TimeoutConfig
timeoutConfig} -> Maybe TimeoutConfig
timeoutConfig) (\s :: UpdateJob
s@UpdateJob' {} Maybe TimeoutConfig
a -> UpdateJob
s {$sel:timeoutConfig:UpdateJob' :: Maybe TimeoutConfig
timeoutConfig = Maybe TimeoutConfig
a} :: UpdateJob)

-- | The ID of the job to be updated.
updateJob_jobId :: Lens.Lens' UpdateJob Prelude.Text
updateJob_jobId :: (Text -> f Text) -> UpdateJob -> f UpdateJob
updateJob_jobId = (UpdateJob -> Text)
-> (UpdateJob -> Text -> UpdateJob)
-> Lens UpdateJob UpdateJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Text
jobId :: Text
$sel:jobId:UpdateJob' :: UpdateJob -> Text
jobId} -> Text
jobId) (\s :: UpdateJob
s@UpdateJob' {} Text
a -> UpdateJob
s {$sel:jobId:UpdateJob' :: Text
jobId = Text
a} :: UpdateJob)

instance Core.AWSRequest UpdateJob where
  type AWSResponse UpdateJob = UpdateJobResponse
  request :: UpdateJob -> Request UpdateJob
request = Service -> UpdateJob -> Request UpdateJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJob)))
response = AWSResponse UpdateJob
-> Logger
-> Service
-> Proxy UpdateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateJob
UpdateJobResponse
UpdateJobResponse'

instance Prelude.Hashable UpdateJob

instance Prelude.NFData UpdateJob

instance Core.ToHeaders UpdateJob where
  toHeaders :: UpdateJob -> [Header]
toHeaders = [Header] -> UpdateJob -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON UpdateJob where
  toJSON :: UpdateJob -> Value
toJSON UpdateJob' {Maybe Text
Maybe AbortConfig
Maybe PresignedUrlConfig
Maybe JobExecutionsRolloutConfig
Maybe TimeoutConfig
Text
jobId :: Text
timeoutConfig :: Maybe TimeoutConfig
description :: Maybe Text
presignedUrlConfig :: Maybe PresignedUrlConfig
namespaceId :: Maybe Text
abortConfig :: Maybe AbortConfig
jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
$sel:jobId:UpdateJob' :: UpdateJob -> Text
$sel:timeoutConfig:UpdateJob' :: UpdateJob -> Maybe TimeoutConfig
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
$sel:presignedUrlConfig:UpdateJob' :: UpdateJob -> Maybe PresignedUrlConfig
$sel:namespaceId:UpdateJob' :: UpdateJob -> Maybe Text
$sel:abortConfig:UpdateJob' :: UpdateJob -> Maybe AbortConfig
$sel:jobExecutionsRolloutConfig:UpdateJob' :: UpdateJob -> Maybe JobExecutionsRolloutConfig
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"jobExecutionsRolloutConfig" Text -> JobExecutionsRolloutConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (JobExecutionsRolloutConfig -> Pair)
-> Maybe JobExecutionsRolloutConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobExecutionsRolloutConfig
jobExecutionsRolloutConfig,
            (Text
"abortConfig" Text -> AbortConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AbortConfig -> Pair) -> Maybe AbortConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AbortConfig
abortConfig,
            (Text
"presignedUrlConfig" Text -> PresignedUrlConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PresignedUrlConfig -> Pair)
-> Maybe PresignedUrlConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PresignedUrlConfig
presignedUrlConfig,
            (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
"timeoutConfig" Text -> TimeoutConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TimeoutConfig -> Pair) -> Maybe TimeoutConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeoutConfig
timeoutConfig
          ]
      )

instance Core.ToPath UpdateJob where
  toPath :: UpdateJob -> ByteString
toPath UpdateJob' {Maybe Text
Maybe AbortConfig
Maybe PresignedUrlConfig
Maybe JobExecutionsRolloutConfig
Maybe TimeoutConfig
Text
jobId :: Text
timeoutConfig :: Maybe TimeoutConfig
description :: Maybe Text
presignedUrlConfig :: Maybe PresignedUrlConfig
namespaceId :: Maybe Text
abortConfig :: Maybe AbortConfig
jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
$sel:jobId:UpdateJob' :: UpdateJob -> Text
$sel:timeoutConfig:UpdateJob' :: UpdateJob -> Maybe TimeoutConfig
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
$sel:presignedUrlConfig:UpdateJob' :: UpdateJob -> Maybe PresignedUrlConfig
$sel:namespaceId:UpdateJob' :: UpdateJob -> Maybe Text
$sel:abortConfig:UpdateJob' :: UpdateJob -> Maybe AbortConfig
$sel:jobExecutionsRolloutConfig:UpdateJob' :: UpdateJob -> Maybe JobExecutionsRolloutConfig
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/jobs/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
jobId]

instance Core.ToQuery UpdateJob where
  toQuery :: UpdateJob -> QueryString
toQuery UpdateJob' {Maybe Text
Maybe AbortConfig
Maybe PresignedUrlConfig
Maybe JobExecutionsRolloutConfig
Maybe TimeoutConfig
Text
jobId :: Text
timeoutConfig :: Maybe TimeoutConfig
description :: Maybe Text
presignedUrlConfig :: Maybe PresignedUrlConfig
namespaceId :: Maybe Text
abortConfig :: Maybe AbortConfig
jobExecutionsRolloutConfig :: Maybe JobExecutionsRolloutConfig
$sel:jobId:UpdateJob' :: UpdateJob -> Text
$sel:timeoutConfig:UpdateJob' :: UpdateJob -> Maybe TimeoutConfig
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
$sel:presignedUrlConfig:UpdateJob' :: UpdateJob -> Maybe PresignedUrlConfig
$sel:namespaceId:UpdateJob' :: UpdateJob -> Maybe Text
$sel:abortConfig:UpdateJob' :: UpdateJob -> Maybe AbortConfig
$sel:jobExecutionsRolloutConfig:UpdateJob' :: UpdateJob -> Maybe JobExecutionsRolloutConfig
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"namespaceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
namespaceId]

-- | /See:/ 'newUpdateJobResponse' smart constructor.
data UpdateJobResponse = UpdateJobResponse'
  {
  }
  deriving (UpdateJobResponse -> UpdateJobResponse -> Bool
(UpdateJobResponse -> UpdateJobResponse -> Bool)
-> (UpdateJobResponse -> UpdateJobResponse -> Bool)
-> Eq UpdateJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobResponse -> UpdateJobResponse -> Bool
$c/= :: UpdateJobResponse -> UpdateJobResponse -> Bool
== :: UpdateJobResponse -> UpdateJobResponse -> Bool
$c== :: UpdateJobResponse -> UpdateJobResponse -> Bool
Prelude.Eq, ReadPrec [UpdateJobResponse]
ReadPrec UpdateJobResponse
Int -> ReadS UpdateJobResponse
ReadS [UpdateJobResponse]
(Int -> ReadS UpdateJobResponse)
-> ReadS [UpdateJobResponse]
-> ReadPrec UpdateJobResponse
-> ReadPrec [UpdateJobResponse]
-> Read UpdateJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobResponse]
$creadListPrec :: ReadPrec [UpdateJobResponse]
readPrec :: ReadPrec UpdateJobResponse
$creadPrec :: ReadPrec UpdateJobResponse
readList :: ReadS [UpdateJobResponse]
$creadList :: ReadS [UpdateJobResponse]
readsPrec :: Int -> ReadS UpdateJobResponse
$creadsPrec :: Int -> ReadS UpdateJobResponse
Prelude.Read, Int -> UpdateJobResponse -> ShowS
[UpdateJobResponse] -> ShowS
UpdateJobResponse -> String
(Int -> UpdateJobResponse -> ShowS)
-> (UpdateJobResponse -> String)
-> ([UpdateJobResponse] -> ShowS)
-> Show UpdateJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobResponse] -> ShowS
$cshowList :: [UpdateJobResponse] -> ShowS
show :: UpdateJobResponse -> String
$cshow :: UpdateJobResponse -> String
showsPrec :: Int -> UpdateJobResponse -> ShowS
$cshowsPrec :: Int -> UpdateJobResponse -> ShowS
Prelude.Show, (forall x. UpdateJobResponse -> Rep UpdateJobResponse x)
-> (forall x. Rep UpdateJobResponse x -> UpdateJobResponse)
-> Generic UpdateJobResponse
forall x. Rep UpdateJobResponse x -> UpdateJobResponse
forall x. UpdateJobResponse -> Rep UpdateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJobResponse x -> UpdateJobResponse
$cfrom :: forall x. UpdateJobResponse -> Rep UpdateJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateJobResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newUpdateJobResponse ::
  UpdateJobResponse
newUpdateJobResponse :: UpdateJobResponse
newUpdateJobResponse = UpdateJobResponse
UpdateJobResponse'

instance Prelude.NFData UpdateJobResponse