{-# 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.DataExchange.CreateJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This operation creates a job.
module Amazonka.DataExchange.CreateJob
  ( -- * Creating a Request
    CreateJob (..),
    newCreateJob,

    -- * Request Lenses
    createJob_details,
    createJob_type,

    -- * Destructuring the Response
    CreateJobResponse (..),
    newCreateJobResponse,

    -- * Response Lenses
    createJobResponse_arn,
    createJobResponse_createdAt,
    createJobResponse_details,
    createJobResponse_errors,
    createJobResponse_id,
    createJobResponse_state,
    createJobResponse_type,
    createJobResponse_updatedAt,
    createJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateJob' smart constructor.
data CreateJob = CreateJob'
  { -- | The details for the CreateJob request.
    CreateJob -> RequestDetails
details :: RequestDetails,
    -- | The type of job to be created.
    CreateJob -> Type
type' :: Type
  }
  deriving (CreateJob -> CreateJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJob -> CreateJob -> Bool
$c/= :: CreateJob -> CreateJob -> Bool
== :: CreateJob -> CreateJob -> Bool
$c== :: CreateJob -> CreateJob -> Bool
Prelude.Eq, ReadPrec [CreateJob]
ReadPrec CreateJob
Int -> ReadS CreateJob
ReadS [CreateJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJob]
$creadListPrec :: ReadPrec [CreateJob]
readPrec :: ReadPrec CreateJob
$creadPrec :: ReadPrec CreateJob
readList :: ReadS [CreateJob]
$creadList :: ReadS [CreateJob]
readsPrec :: Int -> ReadS CreateJob
$creadsPrec :: Int -> ReadS CreateJob
Prelude.Read, Int -> CreateJob -> ShowS
[CreateJob] -> ShowS
CreateJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJob] -> ShowS
$cshowList :: [CreateJob] -> ShowS
show :: CreateJob -> String
$cshow :: CreateJob -> String
showsPrec :: Int -> CreateJob -> ShowS
$cshowsPrec :: Int -> CreateJob -> ShowS
Prelude.Show, forall x. Rep CreateJob x -> CreateJob
forall x. CreateJob -> Rep CreateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJob x -> CreateJob
$cfrom :: forall x. CreateJob -> Rep CreateJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateJob' 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:
--
-- 'details', 'createJob_details' - The details for the CreateJob request.
--
-- 'type'', 'createJob_type' - The type of job to be created.
newCreateJob ::
  -- | 'details'
  RequestDetails ->
  -- | 'type''
  Type ->
  CreateJob
newCreateJob :: RequestDetails -> Type -> CreateJob
newCreateJob RequestDetails
pDetails_ Type
pType_ =
  CreateJob' {$sel:details:CreateJob' :: RequestDetails
details = RequestDetails
pDetails_, $sel:type':CreateJob' :: Type
type' = Type
pType_}

-- | The details for the CreateJob request.
createJob_details :: Lens.Lens' CreateJob RequestDetails
createJob_details :: Lens' CreateJob RequestDetails
createJob_details = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {RequestDetails
details :: RequestDetails
$sel:details:CreateJob' :: CreateJob -> RequestDetails
details} -> RequestDetails
details) (\s :: CreateJob
s@CreateJob' {} RequestDetails
a -> CreateJob
s {$sel:details:CreateJob' :: RequestDetails
details = RequestDetails
a} :: CreateJob)

-- | The type of job to be created.
createJob_type :: Lens.Lens' CreateJob Type
createJob_type :: Lens' CreateJob Type
createJob_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Type
type' :: Type
$sel:type':CreateJob' :: CreateJob -> Type
type'} -> Type
type') (\s :: CreateJob
s@CreateJob' {} Type
a -> CreateJob
s {$sel:type':CreateJob' :: Type
type' = Type
a} :: CreateJob)

instance Core.AWSRequest CreateJob where
  type AWSResponse CreateJob = CreateJobResponse
  request :: (Service -> Service) -> CreateJob -> Request CreateJob
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 CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
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 ISO8601
-> Maybe ResponseDetails
-> Maybe [JobError]
-> Maybe Text
-> Maybe State
-> Maybe Type
-> Maybe ISO8601
-> Int
-> CreateJobResponse
CreateJobResponse'
            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
"Arn")
            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
"CreatedAt")
            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
"Details")
            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
"Errors" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"Id")
            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
"State")
            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
"Type")
            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
"UpdatedAt")
            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 CreateJob where
  hashWithSalt :: Int -> CreateJob -> Int
hashWithSalt Int
_salt CreateJob' {RequestDetails
Type
type' :: Type
details :: RequestDetails
$sel:type':CreateJob' :: CreateJob -> Type
$sel:details:CreateJob' :: CreateJob -> RequestDetails
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RequestDetails
details
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Type
type'

instance Prelude.NFData CreateJob where
  rnf :: CreateJob -> ()
rnf CreateJob' {RequestDetails
Type
type' :: Type
details :: RequestDetails
$sel:type':CreateJob' :: CreateJob -> Type
$sel:details:CreateJob' :: CreateJob -> RequestDetails
..} =
    forall a. NFData a => a -> ()
Prelude.rnf RequestDetails
details seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Type
type'

instance Data.ToHeaders CreateJob where
  toHeaders :: CreateJob -> 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 CreateJob where
  toJSON :: CreateJob -> Value
toJSON CreateJob' {RequestDetails
Type
type' :: Type
details :: RequestDetails
$sel:type':CreateJob' :: CreateJob -> Type
$sel:details:CreateJob' :: CreateJob -> RequestDetails
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"Details" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= RequestDetails
details),
            forall a. a -> Maybe a
Prelude.Just (Key
"Type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Type
type')
          ]
      )

instance Data.ToPath CreateJob where
  toPath :: CreateJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/jobs"

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

-- | /See:/ 'newCreateJobResponse' smart constructor.
data CreateJobResponse = CreateJobResponse'
  { -- | The ARN for the job.
    CreateJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the job was created, in ISO 8601 format.
    CreateJobResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | Details about the job.
    CreateJobResponse -> Maybe ResponseDetails
details :: Prelude.Maybe ResponseDetails,
    -- | The errors associated with jobs.
    CreateJobResponse -> Maybe [JobError]
errors :: Prelude.Maybe [JobError],
    -- | The unique identifier for the job.
    CreateJobResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The state of the job.
    CreateJobResponse -> Maybe State
state :: Prelude.Maybe State,
    -- | The job type.
    CreateJobResponse -> Maybe Type
type' :: Prelude.Maybe Type,
    -- | The date and time that the job was last updated, in ISO 8601 format.
    CreateJobResponse -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    CreateJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateJobResponse -> CreateJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobResponse -> CreateJobResponse -> Bool
$c/= :: CreateJobResponse -> CreateJobResponse -> Bool
== :: CreateJobResponse -> CreateJobResponse -> Bool
$c== :: CreateJobResponse -> CreateJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateJobResponse]
ReadPrec CreateJobResponse
Int -> ReadS CreateJobResponse
ReadS [CreateJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobResponse]
$creadListPrec :: ReadPrec [CreateJobResponse]
readPrec :: ReadPrec CreateJobResponse
$creadPrec :: ReadPrec CreateJobResponse
readList :: ReadS [CreateJobResponse]
$creadList :: ReadS [CreateJobResponse]
readsPrec :: Int -> ReadS CreateJobResponse
$creadsPrec :: Int -> ReadS CreateJobResponse
Prelude.Read, Int -> CreateJobResponse -> ShowS
[CreateJobResponse] -> ShowS
CreateJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobResponse] -> ShowS
$cshowList :: [CreateJobResponse] -> ShowS
show :: CreateJobResponse -> String
$cshow :: CreateJobResponse -> String
showsPrec :: Int -> CreateJobResponse -> ShowS
$cshowsPrec :: Int -> CreateJobResponse -> ShowS
Prelude.Show, forall x. Rep CreateJobResponse x -> CreateJobResponse
forall x. CreateJobResponse -> Rep CreateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobResponse x -> CreateJobResponse
$cfrom :: forall x. CreateJobResponse -> Rep CreateJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateJobResponse' 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:
--
-- 'arn', 'createJobResponse_arn' - The ARN for the job.
--
-- 'createdAt', 'createJobResponse_createdAt' - The date and time that the job was created, in ISO 8601 format.
--
-- 'details', 'createJobResponse_details' - Details about the job.
--
-- 'errors', 'createJobResponse_errors' - The errors associated with jobs.
--
-- 'id', 'createJobResponse_id' - The unique identifier for the job.
--
-- 'state', 'createJobResponse_state' - The state of the job.
--
-- 'type'', 'createJobResponse_type' - The job type.
--
-- 'updatedAt', 'createJobResponse_updatedAt' - The date and time that the job was last updated, in ISO 8601 format.
--
-- 'httpStatus', 'createJobResponse_httpStatus' - The response's http status code.
newCreateJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
  CreateJobResponse'
    { $sel:arn:CreateJobResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateJobResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:details:CreateJobResponse' :: Maybe ResponseDetails
details = forall a. Maybe a
Prelude.Nothing,
      $sel:errors:CreateJobResponse' :: Maybe [JobError]
errors = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateJobResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:state:CreateJobResponse' :: Maybe State
state = forall a. Maybe a
Prelude.Nothing,
      $sel:type':CreateJobResponse' :: Maybe Type
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:CreateJobResponse' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN for the job.
createJobResponse_arn :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_arn :: Lens' CreateJobResponse (Maybe Text)
createJobResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateJobResponse' :: CreateJobResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:arn:CreateJobResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateJobResponse)

-- | The date and time that the job was created, in ISO 8601 format.
createJobResponse_createdAt :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.UTCTime)
createJobResponse_createdAt :: Lens' CreateJobResponse (Maybe UTCTime)
createJobResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:CreateJobResponse' :: CreateJobResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe ISO8601
a -> CreateJobResponse
s {$sel:createdAt:CreateJobResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: CreateJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Details about the job.
createJobResponse_details :: Lens.Lens' CreateJobResponse (Prelude.Maybe ResponseDetails)
createJobResponse_details :: Lens' CreateJobResponse (Maybe ResponseDetails)
createJobResponse_details = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe ResponseDetails
details :: Maybe ResponseDetails
$sel:details:CreateJobResponse' :: CreateJobResponse -> Maybe ResponseDetails
details} -> Maybe ResponseDetails
details) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe ResponseDetails
a -> CreateJobResponse
s {$sel:details:CreateJobResponse' :: Maybe ResponseDetails
details = Maybe ResponseDetails
a} :: CreateJobResponse)

-- | The errors associated with jobs.
createJobResponse_errors :: Lens.Lens' CreateJobResponse (Prelude.Maybe [JobError])
createJobResponse_errors :: Lens' CreateJobResponse (Maybe [JobError])
createJobResponse_errors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe [JobError]
errors :: Maybe [JobError]
$sel:errors:CreateJobResponse' :: CreateJobResponse -> Maybe [JobError]
errors} -> Maybe [JobError]
errors) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe [JobError]
a -> CreateJobResponse
s {$sel:errors:CreateJobResponse' :: Maybe [JobError]
errors = Maybe [JobError]
a} :: CreateJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier for the job.
createJobResponse_id :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_id :: Lens' CreateJobResponse (Maybe Text)
createJobResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateJobResponse' :: CreateJobResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:id:CreateJobResponse' :: Maybe Text
id = Maybe Text
a} :: CreateJobResponse)

-- | The state of the job.
createJobResponse_state :: Lens.Lens' CreateJobResponse (Prelude.Maybe State)
createJobResponse_state :: Lens' CreateJobResponse (Maybe State)
createJobResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe State
state :: Maybe State
$sel:state:CreateJobResponse' :: CreateJobResponse -> Maybe State
state} -> Maybe State
state) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe State
a -> CreateJobResponse
s {$sel:state:CreateJobResponse' :: Maybe State
state = Maybe State
a} :: CreateJobResponse)

-- | The job type.
createJobResponse_type :: Lens.Lens' CreateJobResponse (Prelude.Maybe Type)
createJobResponse_type :: Lens' CreateJobResponse (Maybe Type)
createJobResponse_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Type
type' :: Maybe Type
$sel:type':CreateJobResponse' :: CreateJobResponse -> Maybe Type
type'} -> Maybe Type
type') (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Type
a -> CreateJobResponse
s {$sel:type':CreateJobResponse' :: Maybe Type
type' = Maybe Type
a} :: CreateJobResponse)

-- | The date and time that the job was last updated, in ISO 8601 format.
createJobResponse_updatedAt :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.UTCTime)
createJobResponse_updatedAt :: Lens' CreateJobResponse (Maybe UTCTime)
createJobResponse_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:CreateJobResponse' :: CreateJobResponse -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe ISO8601
a -> CreateJobResponse
s {$sel:updatedAt:CreateJobResponse' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: CreateJobResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

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

instance Prelude.NFData CreateJobResponse where
  rnf :: CreateJobResponse -> ()
rnf CreateJobResponse' {Int
Maybe [JobError]
Maybe Text
Maybe ISO8601
Maybe State
Maybe ResponseDetails
Maybe Type
httpStatus :: Int
updatedAt :: Maybe ISO8601
type' :: Maybe Type
state :: Maybe State
id :: Maybe Text
errors :: Maybe [JobError]
details :: Maybe ResponseDetails
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
$sel:updatedAt:CreateJobResponse' :: CreateJobResponse -> Maybe ISO8601
$sel:type':CreateJobResponse' :: CreateJobResponse -> Maybe Type
$sel:state:CreateJobResponse' :: CreateJobResponse -> Maybe State
$sel:id:CreateJobResponse' :: CreateJobResponse -> Maybe Text
$sel:errors:CreateJobResponse' :: CreateJobResponse -> Maybe [JobError]
$sel:details:CreateJobResponse' :: CreateJobResponse -> Maybe ResponseDetails
$sel:createdAt:CreateJobResponse' :: CreateJobResponse -> Maybe ISO8601
$sel:arn:CreateJobResponse' :: CreateJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResponseDetails
details
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [JobError]
errors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe State
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Type
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus