{-# 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.AmplifyBackend.UpdateBackendJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a specific job.
module Amazonka.AmplifyBackend.UpdateBackendJob
  ( -- * Creating a Request
    UpdateBackendJob (..),
    newUpdateBackendJob,

    -- * Request Lenses
    updateBackendJob_operation,
    updateBackendJob_status,
    updateBackendJob_appId,
    updateBackendJob_backendEnvironmentName,
    updateBackendJob_jobId,

    -- * Destructuring the Response
    UpdateBackendJobResponse (..),
    newUpdateBackendJobResponse,

    -- * Response Lenses
    updateBackendJobResponse_appId,
    updateBackendJobResponse_backendEnvironmentName,
    updateBackendJobResponse_createTime,
    updateBackendJobResponse_error,
    updateBackendJobResponse_jobId,
    updateBackendJobResponse_operation,
    updateBackendJobResponse_status,
    updateBackendJobResponse_updateTime,
    updateBackendJobResponse_httpStatus,
  )
where

import Amazonka.AmplifyBackend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The request body for GetBackendJob.
--
-- /See:/ 'newUpdateBackendJob' smart constructor.
data UpdateBackendJob = UpdateBackendJob'
  { -- | Filters the list of response objects to include only those with the
    -- specified operation name.
    UpdateBackendJob -> Maybe Text
operation :: Prelude.Maybe Prelude.Text,
    -- | Filters the list of response objects to include only those with the
    -- specified status.
    UpdateBackendJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The app ID.
    UpdateBackendJob -> Text
appId :: Prelude.Text,
    -- | The name of the backend environment.
    UpdateBackendJob -> Text
backendEnvironmentName :: Prelude.Text,
    -- | The ID for the job.
    UpdateBackendJob -> Text
jobId :: Prelude.Text
  }
  deriving (UpdateBackendJob -> UpdateBackendJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBackendJob -> UpdateBackendJob -> Bool
$c/= :: UpdateBackendJob -> UpdateBackendJob -> Bool
== :: UpdateBackendJob -> UpdateBackendJob -> Bool
$c== :: UpdateBackendJob -> UpdateBackendJob -> Bool
Prelude.Eq, ReadPrec [UpdateBackendJob]
ReadPrec UpdateBackendJob
Int -> ReadS UpdateBackendJob
ReadS [UpdateBackendJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBackendJob]
$creadListPrec :: ReadPrec [UpdateBackendJob]
readPrec :: ReadPrec UpdateBackendJob
$creadPrec :: ReadPrec UpdateBackendJob
readList :: ReadS [UpdateBackendJob]
$creadList :: ReadS [UpdateBackendJob]
readsPrec :: Int -> ReadS UpdateBackendJob
$creadsPrec :: Int -> ReadS UpdateBackendJob
Prelude.Read, Int -> UpdateBackendJob -> ShowS
[UpdateBackendJob] -> ShowS
UpdateBackendJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBackendJob] -> ShowS
$cshowList :: [UpdateBackendJob] -> ShowS
show :: UpdateBackendJob -> String
$cshow :: UpdateBackendJob -> String
showsPrec :: Int -> UpdateBackendJob -> ShowS
$cshowsPrec :: Int -> UpdateBackendJob -> ShowS
Prelude.Show, forall x. Rep UpdateBackendJob x -> UpdateBackendJob
forall x. UpdateBackendJob -> Rep UpdateBackendJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateBackendJob x -> UpdateBackendJob
$cfrom :: forall x. UpdateBackendJob -> Rep UpdateBackendJob x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBackendJob' 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:
--
-- 'operation', 'updateBackendJob_operation' - Filters the list of response objects to include only those with the
-- specified operation name.
--
-- 'status', 'updateBackendJob_status' - Filters the list of response objects to include only those with the
-- specified status.
--
-- 'appId', 'updateBackendJob_appId' - The app ID.
--
-- 'backendEnvironmentName', 'updateBackendJob_backendEnvironmentName' - The name of the backend environment.
--
-- 'jobId', 'updateBackendJob_jobId' - The ID for the job.
newUpdateBackendJob ::
  -- | 'appId'
  Prelude.Text ->
  -- | 'backendEnvironmentName'
  Prelude.Text ->
  -- | 'jobId'
  Prelude.Text ->
  UpdateBackendJob
newUpdateBackendJob :: Text -> Text -> Text -> UpdateBackendJob
newUpdateBackendJob
  Text
pAppId_
  Text
pBackendEnvironmentName_
  Text
pJobId_ =
    UpdateBackendJob'
      { $sel:operation:UpdateBackendJob' :: Maybe Text
operation = forall a. Maybe a
Prelude.Nothing,
        $sel:status:UpdateBackendJob' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
        $sel:appId:UpdateBackendJob' :: Text
appId = Text
pAppId_,
        $sel:backendEnvironmentName:UpdateBackendJob' :: Text
backendEnvironmentName = Text
pBackendEnvironmentName_,
        $sel:jobId:UpdateBackendJob' :: Text
jobId = Text
pJobId_
      }

-- | Filters the list of response objects to include only those with the
-- specified operation name.
updateBackendJob_operation :: Lens.Lens' UpdateBackendJob (Prelude.Maybe Prelude.Text)
updateBackendJob_operation :: Lens' UpdateBackendJob (Maybe Text)
updateBackendJob_operation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJob' {Maybe Text
operation :: Maybe Text
$sel:operation:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
operation} -> Maybe Text
operation) (\s :: UpdateBackendJob
s@UpdateBackendJob' {} Maybe Text
a -> UpdateBackendJob
s {$sel:operation:UpdateBackendJob' :: Maybe Text
operation = Maybe Text
a} :: UpdateBackendJob)

-- | Filters the list of response objects to include only those with the
-- specified status.
updateBackendJob_status :: Lens.Lens' UpdateBackendJob (Prelude.Maybe Prelude.Text)
updateBackendJob_status :: Lens' UpdateBackendJob (Maybe Text)
updateBackendJob_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJob' {Maybe Text
status :: Maybe Text
$sel:status:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
status} -> Maybe Text
status) (\s :: UpdateBackendJob
s@UpdateBackendJob' {} Maybe Text
a -> UpdateBackendJob
s {$sel:status:UpdateBackendJob' :: Maybe Text
status = Maybe Text
a} :: UpdateBackendJob)

-- | The app ID.
updateBackendJob_appId :: Lens.Lens' UpdateBackendJob Prelude.Text
updateBackendJob_appId :: Lens' UpdateBackendJob Text
updateBackendJob_appId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJob' {Text
appId :: Text
$sel:appId:UpdateBackendJob' :: UpdateBackendJob -> Text
appId} -> Text
appId) (\s :: UpdateBackendJob
s@UpdateBackendJob' {} Text
a -> UpdateBackendJob
s {$sel:appId:UpdateBackendJob' :: Text
appId = Text
a} :: UpdateBackendJob)

-- | The name of the backend environment.
updateBackendJob_backendEnvironmentName :: Lens.Lens' UpdateBackendJob Prelude.Text
updateBackendJob_backendEnvironmentName :: Lens' UpdateBackendJob Text
updateBackendJob_backendEnvironmentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJob' {Text
backendEnvironmentName :: Text
$sel:backendEnvironmentName:UpdateBackendJob' :: UpdateBackendJob -> Text
backendEnvironmentName} -> Text
backendEnvironmentName) (\s :: UpdateBackendJob
s@UpdateBackendJob' {} Text
a -> UpdateBackendJob
s {$sel:backendEnvironmentName:UpdateBackendJob' :: Text
backendEnvironmentName = Text
a} :: UpdateBackendJob)

-- | The ID for the job.
updateBackendJob_jobId :: Lens.Lens' UpdateBackendJob Prelude.Text
updateBackendJob_jobId :: Lens' UpdateBackendJob Text
updateBackendJob_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJob' {Text
jobId :: Text
$sel:jobId:UpdateBackendJob' :: UpdateBackendJob -> Text
jobId} -> Text
jobId) (\s :: UpdateBackendJob
s@UpdateBackendJob' {} Text
a -> UpdateBackendJob
s {$sel:jobId:UpdateBackendJob' :: Text
jobId = Text
a} :: UpdateBackendJob)

instance Core.AWSRequest UpdateBackendJob where
  type
    AWSResponse UpdateBackendJob =
      UpdateBackendJobResponse
  request :: (Service -> Service)
-> UpdateBackendJob -> Request UpdateBackendJob
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 UpdateBackendJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBackendJob)))
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
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateBackendJobResponse
UpdateBackendJobResponse'
            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
"appId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"backendEnvironmentName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"createTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"error")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"jobId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"operation")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"updateTime")
            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 UpdateBackendJob where
  hashWithSalt :: Int -> UpdateBackendJob -> Int
hashWithSalt Int
_salt UpdateBackendJob' {Maybe Text
Text
jobId :: Text
backendEnvironmentName :: Text
appId :: Text
status :: Maybe Text
operation :: Maybe Text
$sel:jobId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:backendEnvironmentName:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:appId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:status:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
$sel:operation:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
backendEnvironmentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobId

instance Prelude.NFData UpdateBackendJob where
  rnf :: UpdateBackendJob -> ()
rnf UpdateBackendJob' {Maybe Text
Text
jobId :: Text
backendEnvironmentName :: Text
appId :: Text
status :: Maybe Text
operation :: Maybe Text
$sel:jobId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:backendEnvironmentName:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:appId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:status:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
$sel:operation:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
backendEnvironmentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jobId

instance Data.ToHeaders UpdateBackendJob where
  toHeaders :: UpdateBackendJob -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateBackendJob where
  toJSON :: UpdateBackendJob -> Value
toJSON UpdateBackendJob' {Maybe Text
Text
jobId :: Text
backendEnvironmentName :: Text
appId :: Text
status :: Maybe Text
operation :: Maybe Text
$sel:jobId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:backendEnvironmentName:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:appId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:status:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
$sel:operation:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"operation" 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
operation,
            (Key
"status" 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
status
          ]
      )

instance Data.ToPath UpdateBackendJob where
  toPath :: UpdateBackendJob -> ByteString
toPath UpdateBackendJob' {Maybe Text
Text
jobId :: Text
backendEnvironmentName :: Text
appId :: Text
status :: Maybe Text
operation :: Maybe Text
$sel:jobId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:backendEnvironmentName:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:appId:UpdateBackendJob' :: UpdateBackendJob -> Text
$sel:status:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
$sel:operation:UpdateBackendJob' :: UpdateBackendJob -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/backend/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
appId,
        ByteString
"/job/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
backendEnvironmentName,
        ByteString
"/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
jobId
      ]

instance Data.ToQuery UpdateBackendJob where
  toQuery :: UpdateBackendJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateBackendJobResponse' smart constructor.
data UpdateBackendJobResponse = UpdateBackendJobResponse'
  { -- | The app ID.
    UpdateBackendJobResponse -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | The name of the backend environment.
    UpdateBackendJobResponse -> Maybe Text
backendEnvironmentName :: Prelude.Maybe Prelude.Text,
    -- | The time when the job was created.
    UpdateBackendJobResponse -> Maybe Text
createTime :: Prelude.Maybe Prelude.Text,
    -- | If the request fails, this error is returned.
    UpdateBackendJobResponse -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
    -- | The ID for the job.
    UpdateBackendJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The name of the operation.
    UpdateBackendJobResponse -> Maybe Text
operation :: Prelude.Maybe Prelude.Text,
    -- | The current status of the request.
    UpdateBackendJobResponse -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The time when the job was last updated.
    UpdateBackendJobResponse -> Maybe Text
updateTime :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateBackendJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
$c/= :: UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
== :: UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
$c== :: UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
Prelude.Eq, ReadPrec [UpdateBackendJobResponse]
ReadPrec UpdateBackendJobResponse
Int -> ReadS UpdateBackendJobResponse
ReadS [UpdateBackendJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBackendJobResponse]
$creadListPrec :: ReadPrec [UpdateBackendJobResponse]
readPrec :: ReadPrec UpdateBackendJobResponse
$creadPrec :: ReadPrec UpdateBackendJobResponse
readList :: ReadS [UpdateBackendJobResponse]
$creadList :: ReadS [UpdateBackendJobResponse]
readsPrec :: Int -> ReadS UpdateBackendJobResponse
$creadsPrec :: Int -> ReadS UpdateBackendJobResponse
Prelude.Read, Int -> UpdateBackendJobResponse -> ShowS
[UpdateBackendJobResponse] -> ShowS
UpdateBackendJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBackendJobResponse] -> ShowS
$cshowList :: [UpdateBackendJobResponse] -> ShowS
show :: UpdateBackendJobResponse -> String
$cshow :: UpdateBackendJobResponse -> String
showsPrec :: Int -> UpdateBackendJobResponse -> ShowS
$cshowsPrec :: Int -> UpdateBackendJobResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateBackendJobResponse x -> UpdateBackendJobResponse
forall x.
UpdateBackendJobResponse -> Rep UpdateBackendJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBackendJobResponse x -> UpdateBackendJobResponse
$cfrom :: forall x.
UpdateBackendJobResponse -> Rep UpdateBackendJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBackendJobResponse' 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:
--
-- 'appId', 'updateBackendJobResponse_appId' - The app ID.
--
-- 'backendEnvironmentName', 'updateBackendJobResponse_backendEnvironmentName' - The name of the backend environment.
--
-- 'createTime', 'updateBackendJobResponse_createTime' - The time when the job was created.
--
-- 'error', 'updateBackendJobResponse_error' - If the request fails, this error is returned.
--
-- 'jobId', 'updateBackendJobResponse_jobId' - The ID for the job.
--
-- 'operation', 'updateBackendJobResponse_operation' - The name of the operation.
--
-- 'status', 'updateBackendJobResponse_status' - The current status of the request.
--
-- 'updateTime', 'updateBackendJobResponse_updateTime' - The time when the job was last updated.
--
-- 'httpStatus', 'updateBackendJobResponse_httpStatus' - The response's http status code.
newUpdateBackendJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBackendJobResponse
newUpdateBackendJobResponse :: Int -> UpdateBackendJobResponse
newUpdateBackendJobResponse Int
pHttpStatus_ =
  UpdateBackendJobResponse'
    { $sel:appId:UpdateBackendJobResponse' :: Maybe Text
appId = forall a. Maybe a
Prelude.Nothing,
      $sel:backendEnvironmentName:UpdateBackendJobResponse' :: Maybe Text
backendEnvironmentName = forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:UpdateBackendJobResponse' :: Maybe Text
createTime = forall a. Maybe a
Prelude.Nothing,
      $sel:error:UpdateBackendJobResponse' :: Maybe Text
error = forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:UpdateBackendJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:operation:UpdateBackendJobResponse' :: Maybe Text
operation = forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateBackendJobResponse' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:updateTime:UpdateBackendJobResponse' :: Maybe Text
updateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateBackendJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The app ID.
updateBackendJobResponse_appId :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_appId :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_appId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
appId :: Maybe Text
$sel:appId:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
appId} -> Maybe Text
appId) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:appId:UpdateBackendJobResponse' :: Maybe Text
appId = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The name of the backend environment.
updateBackendJobResponse_backendEnvironmentName :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_backendEnvironmentName :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_backendEnvironmentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
backendEnvironmentName :: Maybe Text
$sel:backendEnvironmentName:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
backendEnvironmentName} -> Maybe Text
backendEnvironmentName) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:backendEnvironmentName:UpdateBackendJobResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The time when the job was created.
updateBackendJobResponse_createTime :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_createTime :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
createTime :: Maybe Text
$sel:createTime:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
createTime} -> Maybe Text
createTime) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:createTime:UpdateBackendJobResponse' :: Maybe Text
createTime = Maybe Text
a} :: UpdateBackendJobResponse)

-- | If the request fails, this error is returned.
updateBackendJobResponse_error :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_error :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_error = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
error :: Maybe Text
$sel:error:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
error} -> Maybe Text
error) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:error:UpdateBackendJobResponse' :: Maybe Text
error = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The ID for the job.
updateBackendJobResponse_jobId :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_jobId :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:jobId:UpdateBackendJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The name of the operation.
updateBackendJobResponse_operation :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_operation :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_operation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
operation :: Maybe Text
$sel:operation:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
operation} -> Maybe Text
operation) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:operation:UpdateBackendJobResponse' :: Maybe Text
operation = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The current status of the request.
updateBackendJobResponse_status :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_status :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
status :: Maybe Text
$sel:status:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
status} -> Maybe Text
status) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:status:UpdateBackendJobResponse' :: Maybe Text
status = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The time when the job was last updated.
updateBackendJobResponse_updateTime :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_updateTime :: Lens' UpdateBackendJobResponse (Maybe Text)
updateBackendJobResponse_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Maybe Text
updateTime :: Maybe Text
$sel:updateTime:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
updateTime} -> Maybe Text
updateTime) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Maybe Text
a -> UpdateBackendJobResponse
s {$sel:updateTime:UpdateBackendJobResponse' :: Maybe Text
updateTime = Maybe Text
a} :: UpdateBackendJobResponse)

-- | The response's http status code.
updateBackendJobResponse_httpStatus :: Lens.Lens' UpdateBackendJobResponse Prelude.Int
updateBackendJobResponse_httpStatus :: Lens' UpdateBackendJobResponse Int
updateBackendJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBackendJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateBackendJobResponse
s@UpdateBackendJobResponse' {} Int
a -> UpdateBackendJobResponse
s {$sel:httpStatus:UpdateBackendJobResponse' :: Int
httpStatus = Int
a} :: UpdateBackendJobResponse)

instance Prelude.NFData UpdateBackendJobResponse where
  rnf :: UpdateBackendJobResponse -> ()
rnf UpdateBackendJobResponse' {Int
Maybe Text
httpStatus :: Int
updateTime :: Maybe Text
status :: Maybe Text
operation :: Maybe Text
jobId :: Maybe Text
error :: Maybe Text
createTime :: Maybe Text
backendEnvironmentName :: Maybe Text
appId :: Maybe Text
$sel:httpStatus:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Int
$sel:updateTime:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:status:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:operation:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:jobId:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:error:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:createTime:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:backendEnvironmentName:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
$sel:appId:UpdateBackendJobResponse' :: UpdateBackendJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
backendEnvironmentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
error
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
updateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus