{-# 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.ImportExport.CreateJob
-- 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)
--
-- This operation initiates the process of scheduling an upload or download
-- of your data. You include in the request a manifest that describes the
-- data transfer specifics. The response to the request includes a job ID,
-- which you can use in other operations, a signature that you use to
-- identify your storage device, and the address where you should ship your
-- storage device.
module Amazonka.ImportExport.CreateJob
  ( -- * Creating a Request
    CreateJob (..),
    newCreateJob,

    -- * Request Lenses
    createJob_aPIVersion,
    createJob_manifestAddendum,
    createJob_jobType,
    createJob_manifest,
    createJob_validateOnly,

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

    -- * Response Lenses
    createJobResponse_signature,
    createJobResponse_jobType,
    createJobResponse_jobId,
    createJobResponse_signatureFileContents,
    createJobResponse_warningMessage,
    createJobResponse_artifactList,
    createJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImportExport.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Input structure for the CreateJob operation.
--
-- /See:/ 'newCreateJob' smart constructor.
data CreateJob = CreateJob'
  { CreateJob -> Maybe Text
aPIVersion :: Prelude.Maybe Prelude.Text,
    CreateJob -> Maybe Text
manifestAddendum :: Prelude.Maybe Prelude.Text,
    CreateJob -> JobType
jobType :: JobType,
    CreateJob -> Text
manifest :: Prelude.Text,
    CreateJob -> Bool
validateOnly :: Prelude.Bool
  }
  deriving (CreateJob -> CreateJob -> Bool
(CreateJob -> CreateJob -> Bool)
-> (CreateJob -> CreateJob -> Bool) -> Eq CreateJob
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]
(Int -> ReadS CreateJob)
-> ReadS [CreateJob]
-> ReadPrec CreateJob
-> ReadPrec [CreateJob]
-> Read 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
(Int -> CreateJob -> ShowS)
-> (CreateJob -> String)
-> ([CreateJob] -> ShowS)
-> Show CreateJob
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. CreateJob -> Rep CreateJob x)
-> (forall x. Rep CreateJob x -> CreateJob) -> Generic CreateJob
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:
--
-- 'aPIVersion', 'createJob_aPIVersion' - Undocumented member.
--
-- 'manifestAddendum', 'createJob_manifestAddendum' - Undocumented member.
--
-- 'jobType', 'createJob_jobType' - Undocumented member.
--
-- 'manifest', 'createJob_manifest' - Undocumented member.
--
-- 'validateOnly', 'createJob_validateOnly' - Undocumented member.
newCreateJob ::
  -- | 'jobType'
  JobType ->
  -- | 'manifest'
  Prelude.Text ->
  -- | 'validateOnly'
  Prelude.Bool ->
  CreateJob
newCreateJob :: JobType -> Text -> Bool -> CreateJob
newCreateJob JobType
pJobType_ Text
pManifest_ Bool
pValidateOnly_ =
  CreateJob' :: Maybe Text -> Maybe Text -> JobType -> Text -> Bool -> CreateJob
CreateJob'
    { $sel:aPIVersion:CreateJob' :: Maybe Text
aPIVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:manifestAddendum:CreateJob' :: Maybe Text
manifestAddendum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobType:CreateJob' :: JobType
jobType = JobType
pJobType_,
      $sel:manifest:CreateJob' :: Text
manifest = Text
pManifest_,
      $sel:validateOnly:CreateJob' :: Bool
validateOnly = Bool
pValidateOnly_
    }

-- | Undocumented member.
createJob_aPIVersion :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_aPIVersion :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_aPIVersion = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
aPIVersion :: Maybe Text
$sel:aPIVersion:CreateJob' :: CreateJob -> Maybe Text
aPIVersion} -> Maybe Text
aPIVersion) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:aPIVersion:CreateJob' :: Maybe Text
aPIVersion = Maybe Text
a} :: CreateJob)

-- | Undocumented member.
createJob_manifestAddendum :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_manifestAddendum :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_manifestAddendum = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
manifestAddendum :: Maybe Text
$sel:manifestAddendum:CreateJob' :: CreateJob -> Maybe Text
manifestAddendum} -> Maybe Text
manifestAddendum) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:manifestAddendum:CreateJob' :: Maybe Text
manifestAddendum = Maybe Text
a} :: CreateJob)

-- | Undocumented member.
createJob_jobType :: Lens.Lens' CreateJob JobType
createJob_jobType :: (JobType -> f JobType) -> CreateJob -> f CreateJob
createJob_jobType = (CreateJob -> JobType)
-> (CreateJob -> JobType -> CreateJob)
-> Lens CreateJob CreateJob JobType JobType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {JobType
jobType :: JobType
$sel:jobType:CreateJob' :: CreateJob -> JobType
jobType} -> JobType
jobType) (\s :: CreateJob
s@CreateJob' {} JobType
a -> CreateJob
s {$sel:jobType:CreateJob' :: JobType
jobType = JobType
a} :: CreateJob)

-- | Undocumented member.
createJob_manifest :: Lens.Lens' CreateJob Prelude.Text
createJob_manifest :: (Text -> f Text) -> CreateJob -> f CreateJob
createJob_manifest = (CreateJob -> Text)
-> (CreateJob -> Text -> CreateJob)
-> Lens CreateJob CreateJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Text
manifest :: Text
$sel:manifest:CreateJob' :: CreateJob -> Text
manifest} -> Text
manifest) (\s :: CreateJob
s@CreateJob' {} Text
a -> CreateJob
s {$sel:manifest:CreateJob' :: Text
manifest = Text
a} :: CreateJob)

-- | Undocumented member.
createJob_validateOnly :: Lens.Lens' CreateJob Prelude.Bool
createJob_validateOnly :: (Bool -> f Bool) -> CreateJob -> f CreateJob
createJob_validateOnly = (CreateJob -> Bool)
-> (CreateJob -> Bool -> CreateJob)
-> Lens CreateJob CreateJob Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Bool
validateOnly :: Bool
$sel:validateOnly:CreateJob' :: CreateJob -> Bool
validateOnly} -> Bool
validateOnly) (\s :: CreateJob
s@CreateJob' {} Bool
a -> CreateJob
s {$sel:validateOnly:CreateJob' :: Bool
validateOnly = Bool
a} :: CreateJob)

instance Core.AWSRequest CreateJob where
  type AWSResponse CreateJob = CreateJobResponse
  request :: CreateJob -> Request CreateJob
request = Service -> CreateJob -> Request CreateJob
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateJob))
-> Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateJobResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe JobType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Artifact]
-> Int
-> CreateJobResponse
CreateJobResponse'
            (Maybe Text
 -> Maybe JobType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Artifact]
 -> Int
 -> CreateJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe JobType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Artifact]
      -> Int
      -> CreateJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Signature")
            Either
  String
  (Maybe JobType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Artifact]
   -> Int
   -> CreateJobResponse)
-> Either String (Maybe JobType)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Artifact]
      -> Int
      -> CreateJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe JobType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"JobType")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Artifact]
   -> Int
   -> CreateJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe [Artifact] -> Int -> CreateJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"JobId")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe [Artifact] -> Int -> CreateJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe [Artifact] -> Int -> CreateJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SignatureFileContents")
            Either
  String (Maybe Text -> Maybe [Artifact] -> Int -> CreateJobResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Artifact] -> Int -> CreateJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"WarningMessage")
            Either String (Maybe [Artifact] -> Int -> CreateJobResponse)
-> Either String (Maybe [Artifact])
-> Either String (Int -> CreateJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ArtifactList" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Artifact]))
-> Either String (Maybe [Artifact])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Artifact])
-> [Node] -> Either String (Maybe [Artifact])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Artifact]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> CreateJobResponse)
-> Either String Int -> Either String CreateJobResponse
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 CreateJob

instance Prelude.NFData CreateJob

instance Core.ToHeaders CreateJob where
  toHeaders :: CreateJob -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery CreateJob where
  toQuery :: CreateJob -> QueryString
toQuery CreateJob' {Bool
Maybe Text
Text
JobType
validateOnly :: Bool
manifest :: Text
jobType :: JobType
manifestAddendum :: Maybe Text
aPIVersion :: Maybe Text
$sel:validateOnly:CreateJob' :: CreateJob -> Bool
$sel:manifest:CreateJob' :: CreateJob -> Text
$sel:jobType:CreateJob' :: CreateJob -> JobType
$sel:manifestAddendum:CreateJob' :: CreateJob -> Maybe Text
$sel:aPIVersion:CreateJob' :: CreateJob -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ QueryString
"Operation=CreateJob",
        ByteString
"Action" ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateJob" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-06-01" :: Prelude.ByteString),
        ByteString
"APIVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
aPIVersion,
        ByteString
"ManifestAddendum" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
manifestAddendum,
        ByteString
"JobType" ByteString -> JobType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: JobType
jobType,
        ByteString
"Manifest" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
manifest,
        ByteString
"ValidateOnly" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
validateOnly
      ]

-- | Output structure for the CreateJob operation.
--
-- /See:/ 'newCreateJobResponse' smart constructor.
data CreateJobResponse = CreateJobResponse'
  { CreateJobResponse -> Maybe Text
signature :: Prelude.Maybe Prelude.Text,
    CreateJobResponse -> Maybe JobType
jobType :: Prelude.Maybe JobType,
    CreateJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    CreateJobResponse -> Maybe Text
signatureFileContents :: Prelude.Maybe Prelude.Text,
    CreateJobResponse -> Maybe Text
warningMessage :: Prelude.Maybe Prelude.Text,
    CreateJobResponse -> Maybe [Artifact]
artifactList :: Prelude.Maybe [Artifact],
    -- | The response's http status code.
    CreateJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateJobResponse -> CreateJobResponse -> Bool
(CreateJobResponse -> CreateJobResponse -> Bool)
-> (CreateJobResponse -> CreateJobResponse -> Bool)
-> Eq CreateJobResponse
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]
(Int -> ReadS CreateJobResponse)
-> ReadS [CreateJobResponse]
-> ReadPrec CreateJobResponse
-> ReadPrec [CreateJobResponse]
-> Read 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
(Int -> CreateJobResponse -> ShowS)
-> (CreateJobResponse -> String)
-> ([CreateJobResponse] -> ShowS)
-> Show CreateJobResponse
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. CreateJobResponse -> Rep CreateJobResponse x)
-> (forall x. Rep CreateJobResponse x -> CreateJobResponse)
-> Generic CreateJobResponse
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:
--
-- 'signature', 'createJobResponse_signature' - Undocumented member.
--
-- 'jobType', 'createJobResponse_jobType' - Undocumented member.
--
-- 'jobId', 'createJobResponse_jobId' - Undocumented member.
--
-- 'signatureFileContents', 'createJobResponse_signatureFileContents' - Undocumented member.
--
-- 'warningMessage', 'createJobResponse_warningMessage' - Undocumented member.
--
-- 'artifactList', 'createJobResponse_artifactList' - Undocumented member.
--
-- 'httpStatus', 'createJobResponse_httpStatus' - The response's http status code.
newCreateJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
  CreateJobResponse' :: Maybe Text
-> Maybe JobType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Artifact]
-> Int
-> CreateJobResponse
CreateJobResponse'
    { $sel:signature:CreateJobResponse' :: Maybe Text
signature = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobType:CreateJobResponse' :: Maybe JobType
jobType = Maybe JobType
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:CreateJobResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signatureFileContents:CreateJobResponse' :: Maybe Text
signatureFileContents = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:warningMessage:CreateJobResponse' :: Maybe Text
warningMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactList:CreateJobResponse' :: Maybe [Artifact]
artifactList = Maybe [Artifact]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createJobResponse_signature :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_signature :: (Maybe Text -> f (Maybe Text))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_signature = (CreateJobResponse -> Maybe Text)
-> (CreateJobResponse -> Maybe Text -> CreateJobResponse)
-> Lens
     CreateJobResponse CreateJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
signature :: Maybe Text
$sel:signature:CreateJobResponse' :: CreateJobResponse -> Maybe Text
signature} -> Maybe Text
signature) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:signature:CreateJobResponse' :: Maybe Text
signature = Maybe Text
a} :: CreateJobResponse)

-- | Undocumented member.
createJobResponse_jobType :: Lens.Lens' CreateJobResponse (Prelude.Maybe JobType)
createJobResponse_jobType :: (Maybe JobType -> f (Maybe JobType))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_jobType = (CreateJobResponse -> Maybe JobType)
-> (CreateJobResponse -> Maybe JobType -> CreateJobResponse)
-> Lens
     CreateJobResponse CreateJobResponse (Maybe JobType) (Maybe JobType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe JobType
jobType :: Maybe JobType
$sel:jobType:CreateJobResponse' :: CreateJobResponse -> Maybe JobType
jobType} -> Maybe JobType
jobType) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe JobType
a -> CreateJobResponse
s {$sel:jobType:CreateJobResponse' :: Maybe JobType
jobType = Maybe JobType
a} :: CreateJobResponse)

-- | Undocumented member.
createJobResponse_jobId :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_jobId = (CreateJobResponse -> Maybe Text)
-> (CreateJobResponse -> Maybe Text -> CreateJobResponse)
-> Lens
     CreateJobResponse CreateJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:CreateJobResponse' :: CreateJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:jobId:CreateJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: CreateJobResponse)

-- | Undocumented member.
createJobResponse_signatureFileContents :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_signatureFileContents :: (Maybe Text -> f (Maybe Text))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_signatureFileContents = (CreateJobResponse -> Maybe Text)
-> (CreateJobResponse -> Maybe Text -> CreateJobResponse)
-> Lens
     CreateJobResponse CreateJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
signatureFileContents :: Maybe Text
$sel:signatureFileContents:CreateJobResponse' :: CreateJobResponse -> Maybe Text
signatureFileContents} -> Maybe Text
signatureFileContents) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:signatureFileContents:CreateJobResponse' :: Maybe Text
signatureFileContents = Maybe Text
a} :: CreateJobResponse)

-- | Undocumented member.
createJobResponse_warningMessage :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_warningMessage :: (Maybe Text -> f (Maybe Text))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_warningMessage = (CreateJobResponse -> Maybe Text)
-> (CreateJobResponse -> Maybe Text -> CreateJobResponse)
-> Lens
     CreateJobResponse CreateJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
warningMessage :: Maybe Text
$sel:warningMessage:CreateJobResponse' :: CreateJobResponse -> Maybe Text
warningMessage} -> Maybe Text
warningMessage) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:warningMessage:CreateJobResponse' :: Maybe Text
warningMessage = Maybe Text
a} :: CreateJobResponse)

-- | Undocumented member.
createJobResponse_artifactList :: Lens.Lens' CreateJobResponse (Prelude.Maybe [Artifact])
createJobResponse_artifactList :: (Maybe [Artifact] -> f (Maybe [Artifact]))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_artifactList = (CreateJobResponse -> Maybe [Artifact])
-> (CreateJobResponse -> Maybe [Artifact] -> CreateJobResponse)
-> Lens
     CreateJobResponse
     CreateJobResponse
     (Maybe [Artifact])
     (Maybe [Artifact])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe [Artifact]
artifactList :: Maybe [Artifact]
$sel:artifactList:CreateJobResponse' :: CreateJobResponse -> Maybe [Artifact]
artifactList} -> Maybe [Artifact]
artifactList) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe [Artifact]
a -> CreateJobResponse
s {$sel:artifactList:CreateJobResponse' :: Maybe [Artifact]
artifactList = Maybe [Artifact]
a} :: CreateJobResponse) ((Maybe [Artifact] -> f (Maybe [Artifact]))
 -> CreateJobResponse -> f CreateJobResponse)
-> ((Maybe [Artifact] -> f (Maybe [Artifact]))
    -> Maybe [Artifact] -> f (Maybe [Artifact]))
-> (Maybe [Artifact] -> f (Maybe [Artifact]))
-> CreateJobResponse
-> f CreateJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Artifact] [Artifact] [Artifact] [Artifact]
-> Iso
     (Maybe [Artifact])
     (Maybe [Artifact])
     (Maybe [Artifact])
     (Maybe [Artifact])
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 AnIso [Artifact] [Artifact] [Artifact] [Artifact]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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