{-# 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-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 a specific job.
module Amazonka.AmplifyBackend.UpdateBackendJob
  ( -- * Creating a Request
    UpdateBackendJob (..),
    newUpdateBackendJob,

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

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

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

import Amazonka.AmplifyBackend.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 status.
    UpdateBackendJob -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Filters the list of response objects to include only those with the
    -- specified operation name.
    UpdateBackendJob -> Maybe Text
operation :: 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
(UpdateBackendJob -> UpdateBackendJob -> Bool)
-> (UpdateBackendJob -> UpdateBackendJob -> Bool)
-> Eq UpdateBackendJob
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]
(Int -> ReadS UpdateBackendJob)
-> ReadS [UpdateBackendJob]
-> ReadPrec UpdateBackendJob
-> ReadPrec [UpdateBackendJob]
-> Read 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
(Int -> UpdateBackendJob -> ShowS)
-> (UpdateBackendJob -> String)
-> ([UpdateBackendJob] -> ShowS)
-> Show UpdateBackendJob
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. UpdateBackendJob -> Rep UpdateBackendJob x)
-> (forall x. Rep UpdateBackendJob x -> UpdateBackendJob)
-> Generic UpdateBackendJob
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:
--
-- 'status', 'updateBackendJob_status' - Filters the list of response objects to include only those with the
-- specified status.
--
-- 'operation', 'updateBackendJob_operation' - Filters the list of response objects to include only those with the
-- specified operation name.
--
-- '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' :: Maybe Text
-> Maybe Text -> Text -> Text -> Text -> UpdateBackendJob
UpdateBackendJob'
      { $sel:status:UpdateBackendJob' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:operation:UpdateBackendJob' :: Maybe Text
operation = Maybe Text
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 status.
updateBackendJob_status :: Lens.Lens' UpdateBackendJob (Prelude.Maybe Prelude.Text)
updateBackendJob_status :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJob -> f UpdateBackendJob
updateBackendJob_status = (UpdateBackendJob -> Maybe Text)
-> (UpdateBackendJob -> Maybe Text -> UpdateBackendJob)
-> Lens UpdateBackendJob UpdateBackendJob (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJob -> f UpdateBackendJob
updateBackendJob_operation = (UpdateBackendJob -> Maybe Text)
-> (UpdateBackendJob -> Maybe Text -> UpdateBackendJob)
-> Lens UpdateBackendJob UpdateBackendJob (Maybe Text) (Maybe Text)
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)

-- | The app ID.
updateBackendJob_appId :: Lens.Lens' UpdateBackendJob Prelude.Text
updateBackendJob_appId :: (Text -> f Text) -> UpdateBackendJob -> f UpdateBackendJob
updateBackendJob_appId = (UpdateBackendJob -> Text)
-> (UpdateBackendJob -> Text -> UpdateBackendJob)
-> Lens UpdateBackendJob UpdateBackendJob Text Text
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 :: (Text -> f Text) -> UpdateBackendJob -> f UpdateBackendJob
updateBackendJob_backendEnvironmentName = (UpdateBackendJob -> Text)
-> (UpdateBackendJob -> Text -> UpdateBackendJob)
-> Lens UpdateBackendJob UpdateBackendJob Text Text
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 :: (Text -> f Text) -> UpdateBackendJob -> f UpdateBackendJob
updateBackendJob_jobId = (UpdateBackendJob -> Text)
-> (UpdateBackendJob -> Text -> UpdateBackendJob)
-> Lens UpdateBackendJob UpdateBackendJob Text Text
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 :: UpdateBackendJob -> Request UpdateBackendJob
request = Service -> UpdateBackendJob -> Request UpdateBackendJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateBackendJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBackendJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateBackendJob))
-> Logger
-> Service
-> Proxy UpdateBackendJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateBackendJob)))
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateBackendJobResponse
UpdateBackendJobResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"jobId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"operation")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"error")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"updateTime")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"appId")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"backendEnvironmentName")
            Either String (Maybe Text -> Int -> UpdateBackendJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateBackendJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createTime")
            Either String (Int -> UpdateBackendJobResponse)
-> Either String Int -> Either String UpdateBackendJobResponse
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 UpdateBackendJob

instance Prelude.NFData UpdateBackendJob

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

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

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

-- | /See:/ 'newUpdateBackendJobResponse' smart constructor.
data UpdateBackendJobResponse = UpdateBackendJobResponse'
  { -- | The current status of the request.
    UpdateBackendJobResponse -> Maybe Text
status :: 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,
    -- | If the request fails, this error is returned.
    UpdateBackendJobResponse -> Maybe Text
error :: Prelude.Maybe Prelude.Text,
    -- | The time when the job was last updated.
    UpdateBackendJobResponse -> Maybe Text
updateTime :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | The response's http status code.
    UpdateBackendJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool
(UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool)
-> (UpdateBackendJobResponse -> UpdateBackendJobResponse -> Bool)
-> Eq UpdateBackendJobResponse
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]
(Int -> ReadS UpdateBackendJobResponse)
-> ReadS [UpdateBackendJobResponse]
-> ReadPrec UpdateBackendJobResponse
-> ReadPrec [UpdateBackendJobResponse]
-> Read 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
(Int -> UpdateBackendJobResponse -> ShowS)
-> (UpdateBackendJobResponse -> String)
-> ([UpdateBackendJobResponse] -> ShowS)
-> Show UpdateBackendJobResponse
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.
 UpdateBackendJobResponse -> Rep UpdateBackendJobResponse x)
-> (forall x.
    Rep UpdateBackendJobResponse x -> UpdateBackendJobResponse)
-> Generic UpdateBackendJobResponse
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:
--
-- 'status', 'updateBackendJobResponse_status' - The current status of the request.
--
-- 'jobId', 'updateBackendJobResponse_jobId' - The ID for the job.
--
-- 'operation', 'updateBackendJobResponse_operation' - The name of the operation.
--
-- 'error', 'updateBackendJobResponse_error' - If the request fails, this error is returned.
--
-- 'updateTime', 'updateBackendJobResponse_updateTime' - The time when the job was last updated.
--
-- '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.
--
-- 'httpStatus', 'updateBackendJobResponse_httpStatus' - The response's http status code.
newUpdateBackendJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBackendJobResponse
newUpdateBackendJobResponse :: Int -> UpdateBackendJobResponse
newUpdateBackendJobResponse Int
pHttpStatus_ =
  UpdateBackendJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateBackendJobResponse
UpdateBackendJobResponse'
    { $sel:status:UpdateBackendJobResponse' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:UpdateBackendJobResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operation:UpdateBackendJobResponse' :: Maybe Text
operation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:error:UpdateBackendJobResponse' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updateTime:UpdateBackendJobResponse' :: Maybe Text
updateTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:UpdateBackendJobResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backendEnvironmentName:UpdateBackendJobResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:UpdateBackendJobResponse' :: Maybe Text
createTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateBackendJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the request.
updateBackendJobResponse_status :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_status :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_status = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 ID for the job.
updateBackendJobResponse_jobId :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_jobId = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_operation = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | If the request fails, this error is returned.
updateBackendJobResponse_error :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_error :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_error = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 time when the job was last updated.
updateBackendJobResponse_updateTime :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_updateTime :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_updateTime = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 app ID.
updateBackendJobResponse_appId :: Lens.Lens' UpdateBackendJobResponse (Prelude.Maybe Prelude.Text)
updateBackendJobResponse_appId :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_appId = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_backendEnvironmentName = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_createTime = (UpdateBackendJobResponse -> Maybe Text)
-> (UpdateBackendJobResponse
    -> Maybe Text -> UpdateBackendJobResponse)
-> Lens
     UpdateBackendJobResponse
     UpdateBackendJobResponse
     (Maybe Text)
     (Maybe Text)
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)

-- | The response's http status code.
updateBackendJobResponse_httpStatus :: Lens.Lens' UpdateBackendJobResponse Prelude.Int
updateBackendJobResponse_httpStatus :: (Int -> f Int)
-> UpdateBackendJobResponse -> f UpdateBackendJobResponse
updateBackendJobResponse_httpStatus = (UpdateBackendJobResponse -> Int)
-> (UpdateBackendJobResponse -> Int -> UpdateBackendJobResponse)
-> Lens UpdateBackendJobResponse UpdateBackendJobResponse Int Int
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