{-# 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.GetBackendJob
-- 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)
--
-- Returns information about a specific job.
module Amazonka.AmplifyBackend.GetBackendJob
  ( -- * Creating a Request
    GetBackendJob (..),
    newGetBackendJob,

    -- * Request Lenses
    getBackendJob_appId,
    getBackendJob_backendEnvironmentName,
    getBackendJob_jobId,

    -- * Destructuring the Response
    GetBackendJobResponse (..),
    newGetBackendJobResponse,

    -- * Response Lenses
    getBackendJobResponse_status,
    getBackendJobResponse_jobId,
    getBackendJobResponse_operation,
    getBackendJobResponse_error,
    getBackendJobResponse_updateTime,
    getBackendJobResponse_appId,
    getBackendJobResponse_backendEnvironmentName,
    getBackendJobResponse_createTime,
    getBackendJobResponse_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

-- | /See:/ 'newGetBackendJob' smart constructor.
data GetBackendJob = GetBackendJob'
  { -- | The app ID.
    GetBackendJob -> Text
appId :: Prelude.Text,
    -- | The name of the backend environment.
    GetBackendJob -> Text
backendEnvironmentName :: Prelude.Text,
    -- | The ID for the job.
    GetBackendJob -> Text
jobId :: Prelude.Text
  }
  deriving (GetBackendJob -> GetBackendJob -> Bool
(GetBackendJob -> GetBackendJob -> Bool)
-> (GetBackendJob -> GetBackendJob -> Bool) -> Eq GetBackendJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBackendJob -> GetBackendJob -> Bool
$c/= :: GetBackendJob -> GetBackendJob -> Bool
== :: GetBackendJob -> GetBackendJob -> Bool
$c== :: GetBackendJob -> GetBackendJob -> Bool
Prelude.Eq, ReadPrec [GetBackendJob]
ReadPrec GetBackendJob
Int -> ReadS GetBackendJob
ReadS [GetBackendJob]
(Int -> ReadS GetBackendJob)
-> ReadS [GetBackendJob]
-> ReadPrec GetBackendJob
-> ReadPrec [GetBackendJob]
-> Read GetBackendJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBackendJob]
$creadListPrec :: ReadPrec [GetBackendJob]
readPrec :: ReadPrec GetBackendJob
$creadPrec :: ReadPrec GetBackendJob
readList :: ReadS [GetBackendJob]
$creadList :: ReadS [GetBackendJob]
readsPrec :: Int -> ReadS GetBackendJob
$creadsPrec :: Int -> ReadS GetBackendJob
Prelude.Read, Int -> GetBackendJob -> ShowS
[GetBackendJob] -> ShowS
GetBackendJob -> String
(Int -> GetBackendJob -> ShowS)
-> (GetBackendJob -> String)
-> ([GetBackendJob] -> ShowS)
-> Show GetBackendJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBackendJob] -> ShowS
$cshowList :: [GetBackendJob] -> ShowS
show :: GetBackendJob -> String
$cshow :: GetBackendJob -> String
showsPrec :: Int -> GetBackendJob -> ShowS
$cshowsPrec :: Int -> GetBackendJob -> ShowS
Prelude.Show, (forall x. GetBackendJob -> Rep GetBackendJob x)
-> (forall x. Rep GetBackendJob x -> GetBackendJob)
-> Generic GetBackendJob
forall x. Rep GetBackendJob x -> GetBackendJob
forall x. GetBackendJob -> Rep GetBackendJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBackendJob x -> GetBackendJob
$cfrom :: forall x. GetBackendJob -> Rep GetBackendJob x
Prelude.Generic)

-- |
-- Create a value of 'GetBackendJob' 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', 'getBackendJob_appId' - The app ID.
--
-- 'backendEnvironmentName', 'getBackendJob_backendEnvironmentName' - The name of the backend environment.
--
-- 'jobId', 'getBackendJob_jobId' - The ID for the job.
newGetBackendJob ::
  -- | 'appId'
  Prelude.Text ->
  -- | 'backendEnvironmentName'
  Prelude.Text ->
  -- | 'jobId'
  Prelude.Text ->
  GetBackendJob
newGetBackendJob :: Text -> Text -> Text -> GetBackendJob
newGetBackendJob
  Text
pAppId_
  Text
pBackendEnvironmentName_
  Text
pJobId_ =
    GetBackendJob' :: Text -> Text -> Text -> GetBackendJob
GetBackendJob'
      { $sel:appId:GetBackendJob' :: Text
appId = Text
pAppId_,
        $sel:backendEnvironmentName:GetBackendJob' :: Text
backendEnvironmentName = Text
pBackendEnvironmentName_,
        $sel:jobId:GetBackendJob' :: Text
jobId = Text
pJobId_
      }

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

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

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

instance Core.AWSRequest GetBackendJob where
  type
    AWSResponse GetBackendJob =
      GetBackendJobResponse
  request :: GetBackendJob -> Request GetBackendJob
request = Service -> GetBackendJob -> Request GetBackendJob
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBackendJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetBackendJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetBackendJob))
-> Logger
-> Service
-> Proxy GetBackendJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetBackendJob)))
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
-> GetBackendJobResponse
GetBackendJobResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetBackendJobResponse)
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
   -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetBackendJobResponse)
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
   -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetBackendJobResponse)
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
   -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetBackendJobResponse)
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
   -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> GetBackendJobResponse)
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 -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetBackendJobResponse)
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 -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetBackendJobResponse)
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 -> GetBackendJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetBackendJobResponse)
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 -> GetBackendJobResponse)
-> Either String Int -> Either String GetBackendJobResponse
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 GetBackendJob

instance Prelude.NFData GetBackendJob

instance Core.ToHeaders GetBackendJob where
  toHeaders :: GetBackendJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBackendJob -> 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.ToPath GetBackendJob where
  toPath :: GetBackendJob -> ByteString
toPath GetBackendJob' {Text
jobId :: Text
backendEnvironmentName :: Text
appId :: Text
$sel:jobId:GetBackendJob' :: GetBackendJob -> Text
$sel:backendEnvironmentName:GetBackendJob' :: GetBackendJob -> Text
$sel:appId:GetBackendJob' :: GetBackendJob -> 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 GetBackendJob where
  toQuery :: GetBackendJob -> QueryString
toQuery = QueryString -> GetBackendJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'GetBackendJobResponse' 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', 'getBackendJobResponse_status' - The current status of the request.
--
-- 'jobId', 'getBackendJobResponse_jobId' - The ID for the job.
--
-- 'operation', 'getBackendJobResponse_operation' - The name of the operation.
--
-- 'error', 'getBackendJobResponse_error' - If the request fails, this error is returned.
--
-- 'updateTime', 'getBackendJobResponse_updateTime' - The time when the job was last updated.
--
-- 'appId', 'getBackendJobResponse_appId' - The app ID.
--
-- 'backendEnvironmentName', 'getBackendJobResponse_backendEnvironmentName' - The name of the backend environment.
--
-- 'createTime', 'getBackendJobResponse_createTime' - The time when the job was created.
--
-- 'httpStatus', 'getBackendJobResponse_httpStatus' - The response's http status code.
newGetBackendJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBackendJobResponse
newGetBackendJobResponse :: Int -> GetBackendJobResponse
newGetBackendJobResponse Int
pHttpStatus_ =
  GetBackendJobResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> GetBackendJobResponse
GetBackendJobResponse'
    { $sel:status:GetBackendJobResponse' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:GetBackendJobResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operation:GetBackendJobResponse' :: Maybe Text
operation = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:error:GetBackendJobResponse' :: Maybe Text
error = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updateTime:GetBackendJobResponse' :: Maybe Text
updateTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:GetBackendJobResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backendEnvironmentName:GetBackendJobResponse' :: Maybe Text
backendEnvironmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:GetBackendJobResponse' :: Maybe Text
createTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBackendJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

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

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

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

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

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

instance Prelude.NFData GetBackendJobResponse