{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Signer.Types.SigningJob
-- 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)
module Amazonka.Signer.Types.SigningJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Signer.Types.SignedObject
import Amazonka.Signer.Types.SigningMaterial
import Amazonka.Signer.Types.SigningStatus
import Amazonka.Signer.Types.Source

-- | Contains information about a signing job.
--
-- /See:/ 'newSigningJob' smart constructor.
data SigningJob = SigningJob'
  { -- | The status of the signing job.
    SigningJob -> Maybe SigningStatus
status :: Prelude.Maybe SigningStatus,
    -- | The name of a signing platform.
    SigningJob -> Maybe Text
platformDisplayName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the signing job.
    SigningJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the signing job was created.
    SigningJob -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | A @SigningMaterial@ object that contains the Amazon Resource Name (ARN)
    -- of the certificate used for the signing job.
    SigningJob -> Maybe SigningMaterial
signingMaterial :: Prelude.Maybe SigningMaterial,
    -- | Indicates whether the signing job is revoked.
    SigningJob -> Maybe Bool
isRevoked :: Prelude.Maybe Prelude.Bool,
    -- | The time when the signature of a signing job expires.
    SigningJob -> Maybe POSIX
signatureExpiresAt :: Prelude.Maybe Core.POSIX,
    -- | The version of the signing profile that created a signing job.
    SigningJob -> Maybe Text
profileVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the signing profile that created a signing job.
    SigningJob -> Maybe Text
profileName :: Prelude.Maybe Prelude.Text,
    -- | A @SignedObject@ structure that contains information about a signing
    -- job\'s signed code image.
    SigningJob -> Maybe SignedObject
signedObject :: Prelude.Maybe SignedObject,
    -- | The unique identifier for a signing platform.
    SigningJob -> Maybe Text
platformId :: Prelude.Maybe Prelude.Text,
    -- | A @Source@ that contains information about a signing job\'s code image
    -- source.
    SigningJob -> Maybe Source
source :: Prelude.Maybe Source,
    -- | The AWS account ID of the job invoker.
    SigningJob -> Maybe Text
jobInvoker :: Prelude.Maybe Prelude.Text,
    -- | The AWS account ID of the job owner.
    SigningJob -> Maybe Text
jobOwner :: Prelude.Maybe Prelude.Text
  }
  deriving (SigningJob -> SigningJob -> Bool
(SigningJob -> SigningJob -> Bool)
-> (SigningJob -> SigningJob -> Bool) -> Eq SigningJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigningJob -> SigningJob -> Bool
$c/= :: SigningJob -> SigningJob -> Bool
== :: SigningJob -> SigningJob -> Bool
$c== :: SigningJob -> SigningJob -> Bool
Prelude.Eq, ReadPrec [SigningJob]
ReadPrec SigningJob
Int -> ReadS SigningJob
ReadS [SigningJob]
(Int -> ReadS SigningJob)
-> ReadS [SigningJob]
-> ReadPrec SigningJob
-> ReadPrec [SigningJob]
-> Read SigningJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SigningJob]
$creadListPrec :: ReadPrec [SigningJob]
readPrec :: ReadPrec SigningJob
$creadPrec :: ReadPrec SigningJob
readList :: ReadS [SigningJob]
$creadList :: ReadS [SigningJob]
readsPrec :: Int -> ReadS SigningJob
$creadsPrec :: Int -> ReadS SigningJob
Prelude.Read, Int -> SigningJob -> ShowS
[SigningJob] -> ShowS
SigningJob -> String
(Int -> SigningJob -> ShowS)
-> (SigningJob -> String)
-> ([SigningJob] -> ShowS)
-> Show SigningJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigningJob] -> ShowS
$cshowList :: [SigningJob] -> ShowS
show :: SigningJob -> String
$cshow :: SigningJob -> String
showsPrec :: Int -> SigningJob -> ShowS
$cshowsPrec :: Int -> SigningJob -> ShowS
Prelude.Show, (forall x. SigningJob -> Rep SigningJob x)
-> (forall x. Rep SigningJob x -> SigningJob) -> Generic SigningJob
forall x. Rep SigningJob x -> SigningJob
forall x. SigningJob -> Rep SigningJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SigningJob x -> SigningJob
$cfrom :: forall x. SigningJob -> Rep SigningJob x
Prelude.Generic)

-- |
-- Create a value of 'SigningJob' 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', 'signingJob_status' - The status of the signing job.
--
-- 'platformDisplayName', 'signingJob_platformDisplayName' - The name of a signing platform.
--
-- 'jobId', 'signingJob_jobId' - The ID of the signing job.
--
-- 'createdAt', 'signingJob_createdAt' - The date and time that the signing job was created.
--
-- 'signingMaterial', 'signingJob_signingMaterial' - A @SigningMaterial@ object that contains the Amazon Resource Name (ARN)
-- of the certificate used for the signing job.
--
-- 'isRevoked', 'signingJob_isRevoked' - Indicates whether the signing job is revoked.
--
-- 'signatureExpiresAt', 'signingJob_signatureExpiresAt' - The time when the signature of a signing job expires.
--
-- 'profileVersion', 'signingJob_profileVersion' - The version of the signing profile that created a signing job.
--
-- 'profileName', 'signingJob_profileName' - The name of the signing profile that created a signing job.
--
-- 'signedObject', 'signingJob_signedObject' - A @SignedObject@ structure that contains information about a signing
-- job\'s signed code image.
--
-- 'platformId', 'signingJob_platformId' - The unique identifier for a signing platform.
--
-- 'source', 'signingJob_source' - A @Source@ that contains information about a signing job\'s code image
-- source.
--
-- 'jobInvoker', 'signingJob_jobInvoker' - The AWS account ID of the job invoker.
--
-- 'jobOwner', 'signingJob_jobOwner' - The AWS account ID of the job owner.
newSigningJob ::
  SigningJob
newSigningJob :: SigningJob
newSigningJob =
  SigningJob' :: Maybe SigningStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe SigningMaterial
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe SignedObject
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe Text
-> SigningJob
SigningJob'
    { $sel:status:SigningJob' :: Maybe SigningStatus
status = Maybe SigningStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:platformDisplayName:SigningJob' :: Maybe Text
platformDisplayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:SigningJob' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:SigningJob' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:signingMaterial:SigningJob' :: Maybe SigningMaterial
signingMaterial = Maybe SigningMaterial
forall a. Maybe a
Prelude.Nothing,
      $sel:isRevoked:SigningJob' :: Maybe Bool
isRevoked = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:signatureExpiresAt:SigningJob' :: Maybe POSIX
signatureExpiresAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:profileVersion:SigningJob' :: Maybe Text
profileVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:profileName:SigningJob' :: Maybe Text
profileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:signedObject:SigningJob' :: Maybe SignedObject
signedObject = Maybe SignedObject
forall a. Maybe a
Prelude.Nothing,
      $sel:platformId:SigningJob' :: Maybe Text
platformId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:SigningJob' :: Maybe Source
source = Maybe Source
forall a. Maybe a
Prelude.Nothing,
      $sel:jobInvoker:SigningJob' :: Maybe Text
jobInvoker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:jobOwner:SigningJob' :: Maybe Text
jobOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the signing job.
signingJob_status :: Lens.Lens' SigningJob (Prelude.Maybe SigningStatus)
signingJob_status :: (Maybe SigningStatus -> f (Maybe SigningStatus))
-> SigningJob -> f SigningJob
signingJob_status = (SigningJob -> Maybe SigningStatus)
-> (SigningJob -> Maybe SigningStatus -> SigningJob)
-> Lens
     SigningJob SigningJob (Maybe SigningStatus) (Maybe SigningStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe SigningStatus
status :: Maybe SigningStatus
$sel:status:SigningJob' :: SigningJob -> Maybe SigningStatus
status} -> Maybe SigningStatus
status) (\s :: SigningJob
s@SigningJob' {} Maybe SigningStatus
a -> SigningJob
s {$sel:status:SigningJob' :: Maybe SigningStatus
status = Maybe SigningStatus
a} :: SigningJob)

-- | The name of a signing platform.
signingJob_platformDisplayName :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_platformDisplayName :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_platformDisplayName = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
platformDisplayName :: Maybe Text
$sel:platformDisplayName:SigningJob' :: SigningJob -> Maybe Text
platformDisplayName} -> Maybe Text
platformDisplayName) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:platformDisplayName:SigningJob' :: Maybe Text
platformDisplayName = Maybe Text
a} :: SigningJob)

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

-- | The date and time that the signing job was created.
signingJob_createdAt :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.UTCTime)
signingJob_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> SigningJob -> f SigningJob
signingJob_createdAt = (SigningJob -> Maybe POSIX)
-> (SigningJob -> Maybe POSIX -> SigningJob)
-> Lens SigningJob SigningJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SigningJob' :: SigningJob -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SigningJob
s@SigningJob' {} Maybe POSIX
a -> SigningJob
s {$sel:createdAt:SigningJob' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SigningJob) ((Maybe POSIX -> f (Maybe POSIX)) -> SigningJob -> f SigningJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningJob
-> f SigningJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A @SigningMaterial@ object that contains the Amazon Resource Name (ARN)
-- of the certificate used for the signing job.
signingJob_signingMaterial :: Lens.Lens' SigningJob (Prelude.Maybe SigningMaterial)
signingJob_signingMaterial :: (Maybe SigningMaterial -> f (Maybe SigningMaterial))
-> SigningJob -> f SigningJob
signingJob_signingMaterial = (SigningJob -> Maybe SigningMaterial)
-> (SigningJob -> Maybe SigningMaterial -> SigningJob)
-> Lens
     SigningJob
     SigningJob
     (Maybe SigningMaterial)
     (Maybe SigningMaterial)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe SigningMaterial
signingMaterial :: Maybe SigningMaterial
$sel:signingMaterial:SigningJob' :: SigningJob -> Maybe SigningMaterial
signingMaterial} -> Maybe SigningMaterial
signingMaterial) (\s :: SigningJob
s@SigningJob' {} Maybe SigningMaterial
a -> SigningJob
s {$sel:signingMaterial:SigningJob' :: Maybe SigningMaterial
signingMaterial = Maybe SigningMaterial
a} :: SigningJob)

-- | Indicates whether the signing job is revoked.
signingJob_isRevoked :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Bool)
signingJob_isRevoked :: (Maybe Bool -> f (Maybe Bool)) -> SigningJob -> f SigningJob
signingJob_isRevoked = (SigningJob -> Maybe Bool)
-> (SigningJob -> Maybe Bool -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Bool
isRevoked :: Maybe Bool
$sel:isRevoked:SigningJob' :: SigningJob -> Maybe Bool
isRevoked} -> Maybe Bool
isRevoked) (\s :: SigningJob
s@SigningJob' {} Maybe Bool
a -> SigningJob
s {$sel:isRevoked:SigningJob' :: Maybe Bool
isRevoked = Maybe Bool
a} :: SigningJob)

-- | The time when the signature of a signing job expires.
signingJob_signatureExpiresAt :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.UTCTime)
signingJob_signatureExpiresAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> SigningJob -> f SigningJob
signingJob_signatureExpiresAt = (SigningJob -> Maybe POSIX)
-> (SigningJob -> Maybe POSIX -> SigningJob)
-> Lens SigningJob SigningJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe POSIX
signatureExpiresAt :: Maybe POSIX
$sel:signatureExpiresAt:SigningJob' :: SigningJob -> Maybe POSIX
signatureExpiresAt} -> Maybe POSIX
signatureExpiresAt) (\s :: SigningJob
s@SigningJob' {} Maybe POSIX
a -> SigningJob
s {$sel:signatureExpiresAt:SigningJob' :: Maybe POSIX
signatureExpiresAt = Maybe POSIX
a} :: SigningJob) ((Maybe POSIX -> f (Maybe POSIX)) -> SigningJob -> f SigningJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SigningJob
-> f SigningJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The version of the signing profile that created a signing job.
signingJob_profileVersion :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_profileVersion :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_profileVersion = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
profileVersion :: Maybe Text
$sel:profileVersion:SigningJob' :: SigningJob -> Maybe Text
profileVersion} -> Maybe Text
profileVersion) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:profileVersion:SigningJob' :: Maybe Text
profileVersion = Maybe Text
a} :: SigningJob)

-- | The name of the signing profile that created a signing job.
signingJob_profileName :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_profileName :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_profileName = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
profileName :: Maybe Text
$sel:profileName:SigningJob' :: SigningJob -> Maybe Text
profileName} -> Maybe Text
profileName) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:profileName:SigningJob' :: Maybe Text
profileName = Maybe Text
a} :: SigningJob)

-- | A @SignedObject@ structure that contains information about a signing
-- job\'s signed code image.
signingJob_signedObject :: Lens.Lens' SigningJob (Prelude.Maybe SignedObject)
signingJob_signedObject :: (Maybe SignedObject -> f (Maybe SignedObject))
-> SigningJob -> f SigningJob
signingJob_signedObject = (SigningJob -> Maybe SignedObject)
-> (SigningJob -> Maybe SignedObject -> SigningJob)
-> Lens
     SigningJob SigningJob (Maybe SignedObject) (Maybe SignedObject)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe SignedObject
signedObject :: Maybe SignedObject
$sel:signedObject:SigningJob' :: SigningJob -> Maybe SignedObject
signedObject} -> Maybe SignedObject
signedObject) (\s :: SigningJob
s@SigningJob' {} Maybe SignedObject
a -> SigningJob
s {$sel:signedObject:SigningJob' :: Maybe SignedObject
signedObject = Maybe SignedObject
a} :: SigningJob)

-- | The unique identifier for a signing platform.
signingJob_platformId :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_platformId :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_platformId = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
platformId :: Maybe Text
$sel:platformId:SigningJob' :: SigningJob -> Maybe Text
platformId} -> Maybe Text
platformId) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:platformId:SigningJob' :: Maybe Text
platformId = Maybe Text
a} :: SigningJob)

-- | A @Source@ that contains information about a signing job\'s code image
-- source.
signingJob_source :: Lens.Lens' SigningJob (Prelude.Maybe Source)
signingJob_source :: (Maybe Source -> f (Maybe Source)) -> SigningJob -> f SigningJob
signingJob_source = (SigningJob -> Maybe Source)
-> (SigningJob -> Maybe Source -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Source) (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Source
source :: Maybe Source
$sel:source:SigningJob' :: SigningJob -> Maybe Source
source} -> Maybe Source
source) (\s :: SigningJob
s@SigningJob' {} Maybe Source
a -> SigningJob
s {$sel:source:SigningJob' :: Maybe Source
source = Maybe Source
a} :: SigningJob)

-- | The AWS account ID of the job invoker.
signingJob_jobInvoker :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_jobInvoker :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_jobInvoker = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
jobInvoker :: Maybe Text
$sel:jobInvoker:SigningJob' :: SigningJob -> Maybe Text
jobInvoker} -> Maybe Text
jobInvoker) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:jobInvoker:SigningJob' :: Maybe Text
jobInvoker = Maybe Text
a} :: SigningJob)

-- | The AWS account ID of the job owner.
signingJob_jobOwner :: Lens.Lens' SigningJob (Prelude.Maybe Prelude.Text)
signingJob_jobOwner :: (Maybe Text -> f (Maybe Text)) -> SigningJob -> f SigningJob
signingJob_jobOwner = (SigningJob -> Maybe Text)
-> (SigningJob -> Maybe Text -> SigningJob)
-> Lens SigningJob SigningJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningJob' {Maybe Text
jobOwner :: Maybe Text
$sel:jobOwner:SigningJob' :: SigningJob -> Maybe Text
jobOwner} -> Maybe Text
jobOwner) (\s :: SigningJob
s@SigningJob' {} Maybe Text
a -> SigningJob
s {$sel:jobOwner:SigningJob' :: Maybe Text
jobOwner = Maybe Text
a} :: SigningJob)

instance Core.FromJSON SigningJob where
  parseJSON :: Value -> Parser SigningJob
parseJSON =
    String
-> (Object -> Parser SigningJob) -> Value -> Parser SigningJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SigningJob"
      ( \Object
x ->
          Maybe SigningStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe SigningMaterial
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe SignedObject
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe Text
-> SigningJob
SigningJob'
            (Maybe SigningStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe SigningMaterial
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe SignedObject
 -> Maybe Text
 -> Maybe Source
 -> Maybe Text
 -> Maybe Text
 -> SigningJob)
-> Parser (Maybe SigningStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe SigningMaterial
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SigningStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe SigningMaterial
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe SigningMaterial
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platformDisplayName")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe SigningMaterial
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe SigningMaterial
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobId")
            Parser
  (Maybe POSIX
   -> Maybe SigningMaterial
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe SigningMaterial
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
            Parser
  (Maybe SigningMaterial
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe SigningMaterial)
-> Parser
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SigningMaterial)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signingMaterial")
            Parser
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe Bool)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"isRevoked")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signatureExpiresAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"profileVersion")
            Parser
  (Maybe Text
   -> Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe SignedObject
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe Text
      -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"profileName")
            Parser
  (Maybe SignedObject
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe Text
   -> SigningJob)
-> Parser (Maybe SignedObject)
-> Parser
     (Maybe Text
      -> Maybe Source -> Maybe Text -> Maybe Text -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SignedObject)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"signedObject")
            Parser
  (Maybe Text
   -> Maybe Source -> Maybe Text -> Maybe Text -> SigningJob)
-> Parser (Maybe Text)
-> Parser (Maybe Source -> Maybe Text -> Maybe Text -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platformId")
            Parser (Maybe Source -> Maybe Text -> Maybe Text -> SigningJob)
-> Parser (Maybe Source)
-> Parser (Maybe Text -> Maybe Text -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Source)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"source")
            Parser (Maybe Text -> Maybe Text -> SigningJob)
-> Parser (Maybe Text) -> Parser (Maybe Text -> SigningJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobInvoker")
            Parser (Maybe Text -> SigningJob)
-> Parser (Maybe Text) -> Parser SigningJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"jobOwner")
      )

instance Prelude.Hashable SigningJob

instance Prelude.NFData SigningJob