{-# 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.CodePipeline.Types.ThirdPartyJobData
-- 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.CodePipeline.Types.ThirdPartyJobData where

import Amazonka.CodePipeline.Types.AWSSessionCredentials
import Amazonka.CodePipeline.Types.ActionConfiguration
import Amazonka.CodePipeline.Types.ActionTypeId
import Amazonka.CodePipeline.Types.Artifact
import Amazonka.CodePipeline.Types.EncryptionKey
import Amazonka.CodePipeline.Types.PipelineContext
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents information about the job data for a partner action.
--
-- /See:/ 'newThirdPartyJobData' smart constructor.
data ThirdPartyJobData = ThirdPartyJobData'
  { -- | A system-generated token, such as a AWS CodeDeploy deployment ID, that a
    -- job requires to continue the job asynchronously.
    ThirdPartyJobData -> Maybe Text
continuationToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the artifact that is the result of the action, if any. This
    -- name might be system-generated, such as \"MyBuiltApp\", or it might be
    -- defined by the user when the action is created.
    ThirdPartyJobData -> Maybe [Artifact]
outputArtifacts :: Prelude.Maybe [Artifact],
    -- | Represents an AWS session credentials object. These credentials are
    -- temporary credentials that are issued by AWS Secure Token Service (STS).
    -- They can be used to access input and output artifacts in the S3 bucket
    -- used to store artifact for the pipeline in AWS CodePipeline.
    ThirdPartyJobData -> Maybe (Sensitive AWSSessionCredentials)
artifactCredentials :: Prelude.Maybe (Core.Sensitive AWSSessionCredentials),
    -- | Represents information about a pipeline to a job worker.
    --
    -- Does not include @pipelineArn@ and @pipelineExecutionId@ for ThirdParty
    -- jobs.
    ThirdPartyJobData -> Maybe PipelineContext
pipelineContext :: Prelude.Maybe PipelineContext,
    -- | The encryption key used to encrypt and decrypt data in the artifact
    -- store for the pipeline, such as an AWS Key Management Service (AWS KMS)
    -- key. This is optional and might not be present.
    ThirdPartyJobData -> Maybe EncryptionKey
encryptionKey :: Prelude.Maybe EncryptionKey,
    -- | Represents information about an action type.
    ThirdPartyJobData -> Maybe ActionTypeId
actionTypeId :: Prelude.Maybe ActionTypeId,
    -- | The name of the artifact that is worked on by the action, if any. This
    -- name might be system-generated, such as \"MyApp\", or it might be
    -- defined by the user when the action is created. The input artifact name
    -- must match the name of an output artifact generated by an action in an
    -- earlier action or stage of the pipeline.
    ThirdPartyJobData -> Maybe [Artifact]
inputArtifacts :: Prelude.Maybe [Artifact],
    -- | Represents information about an action configuration.
    ThirdPartyJobData -> Maybe ActionConfiguration
actionConfiguration :: Prelude.Maybe ActionConfiguration
  }
  deriving (ThirdPartyJobData -> ThirdPartyJobData -> Bool
(ThirdPartyJobData -> ThirdPartyJobData -> Bool)
-> (ThirdPartyJobData -> ThirdPartyJobData -> Bool)
-> Eq ThirdPartyJobData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ThirdPartyJobData -> ThirdPartyJobData -> Bool
$c/= :: ThirdPartyJobData -> ThirdPartyJobData -> Bool
== :: ThirdPartyJobData -> ThirdPartyJobData -> Bool
$c== :: ThirdPartyJobData -> ThirdPartyJobData -> Bool
Prelude.Eq, Int -> ThirdPartyJobData -> ShowS
[ThirdPartyJobData] -> ShowS
ThirdPartyJobData -> String
(Int -> ThirdPartyJobData -> ShowS)
-> (ThirdPartyJobData -> String)
-> ([ThirdPartyJobData] -> ShowS)
-> Show ThirdPartyJobData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ThirdPartyJobData] -> ShowS
$cshowList :: [ThirdPartyJobData] -> ShowS
show :: ThirdPartyJobData -> String
$cshow :: ThirdPartyJobData -> String
showsPrec :: Int -> ThirdPartyJobData -> ShowS
$cshowsPrec :: Int -> ThirdPartyJobData -> ShowS
Prelude.Show, (forall x. ThirdPartyJobData -> Rep ThirdPartyJobData x)
-> (forall x. Rep ThirdPartyJobData x -> ThirdPartyJobData)
-> Generic ThirdPartyJobData
forall x. Rep ThirdPartyJobData x -> ThirdPartyJobData
forall x. ThirdPartyJobData -> Rep ThirdPartyJobData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ThirdPartyJobData x -> ThirdPartyJobData
$cfrom :: forall x. ThirdPartyJobData -> Rep ThirdPartyJobData x
Prelude.Generic)

-- |
-- Create a value of 'ThirdPartyJobData' 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:
--
-- 'continuationToken', 'thirdPartyJobData_continuationToken' - A system-generated token, such as a AWS CodeDeploy deployment ID, that a
-- job requires to continue the job asynchronously.
--
-- 'outputArtifacts', 'thirdPartyJobData_outputArtifacts' - The name of the artifact that is the result of the action, if any. This
-- name might be system-generated, such as \"MyBuiltApp\", or it might be
-- defined by the user when the action is created.
--
-- 'artifactCredentials', 'thirdPartyJobData_artifactCredentials' - Represents an AWS session credentials object. These credentials are
-- temporary credentials that are issued by AWS Secure Token Service (STS).
-- They can be used to access input and output artifacts in the S3 bucket
-- used to store artifact for the pipeline in AWS CodePipeline.
--
-- 'pipelineContext', 'thirdPartyJobData_pipelineContext' - Represents information about a pipeline to a job worker.
--
-- Does not include @pipelineArn@ and @pipelineExecutionId@ for ThirdParty
-- jobs.
--
-- 'encryptionKey', 'thirdPartyJobData_encryptionKey' - The encryption key used to encrypt and decrypt data in the artifact
-- store for the pipeline, such as an AWS Key Management Service (AWS KMS)
-- key. This is optional and might not be present.
--
-- 'actionTypeId', 'thirdPartyJobData_actionTypeId' - Represents information about an action type.
--
-- 'inputArtifacts', 'thirdPartyJobData_inputArtifacts' - The name of the artifact that is worked on by the action, if any. This
-- name might be system-generated, such as \"MyApp\", or it might be
-- defined by the user when the action is created. The input artifact name
-- must match the name of an output artifact generated by an action in an
-- earlier action or stage of the pipeline.
--
-- 'actionConfiguration', 'thirdPartyJobData_actionConfiguration' - Represents information about an action configuration.
newThirdPartyJobData ::
  ThirdPartyJobData
newThirdPartyJobData :: ThirdPartyJobData
newThirdPartyJobData =
  ThirdPartyJobData' :: Maybe Text
-> Maybe [Artifact]
-> Maybe (Sensitive AWSSessionCredentials)
-> Maybe PipelineContext
-> Maybe EncryptionKey
-> Maybe ActionTypeId
-> Maybe [Artifact]
-> Maybe ActionConfiguration
-> ThirdPartyJobData
ThirdPartyJobData'
    { $sel:continuationToken:ThirdPartyJobData' :: Maybe Text
continuationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputArtifacts:ThirdPartyJobData' :: Maybe [Artifact]
outputArtifacts = Maybe [Artifact]
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactCredentials:ThirdPartyJobData' :: Maybe (Sensitive AWSSessionCredentials)
artifactCredentials = Maybe (Sensitive AWSSessionCredentials)
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineContext:ThirdPartyJobData' :: Maybe PipelineContext
pipelineContext = Maybe PipelineContext
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionKey:ThirdPartyJobData' :: Maybe EncryptionKey
encryptionKey = Maybe EncryptionKey
forall a. Maybe a
Prelude.Nothing,
      $sel:actionTypeId:ThirdPartyJobData' :: Maybe ActionTypeId
actionTypeId = Maybe ActionTypeId
forall a. Maybe a
Prelude.Nothing,
      $sel:inputArtifacts:ThirdPartyJobData' :: Maybe [Artifact]
inputArtifacts = Maybe [Artifact]
forall a. Maybe a
Prelude.Nothing,
      $sel:actionConfiguration:ThirdPartyJobData' :: Maybe ActionConfiguration
actionConfiguration = Maybe ActionConfiguration
forall a. Maybe a
Prelude.Nothing
    }

-- | A system-generated token, such as a AWS CodeDeploy deployment ID, that a
-- job requires to continue the job asynchronously.
thirdPartyJobData_continuationToken :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe Prelude.Text)
thirdPartyJobData_continuationToken :: (Maybe Text -> f (Maybe Text))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_continuationToken = (ThirdPartyJobData -> Maybe Text)
-> (ThirdPartyJobData -> Maybe Text -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData ThirdPartyJobData (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe Text
continuationToken :: Maybe Text
$sel:continuationToken:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe Text
continuationToken} -> Maybe Text
continuationToken) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe Text
a -> ThirdPartyJobData
s {$sel:continuationToken:ThirdPartyJobData' :: Maybe Text
continuationToken = Maybe Text
a} :: ThirdPartyJobData)

-- | The name of the artifact that is the result of the action, if any. This
-- name might be system-generated, such as \"MyBuiltApp\", or it might be
-- defined by the user when the action is created.
thirdPartyJobData_outputArtifacts :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe [Artifact])
thirdPartyJobData_outputArtifacts :: (Maybe [Artifact] -> f (Maybe [Artifact]))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_outputArtifacts = (ThirdPartyJobData -> Maybe [Artifact])
-> (ThirdPartyJobData -> Maybe [Artifact] -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe [Artifact])
     (Maybe [Artifact])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe [Artifact]
outputArtifacts :: Maybe [Artifact]
$sel:outputArtifacts:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe [Artifact]
outputArtifacts} -> Maybe [Artifact]
outputArtifacts) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe [Artifact]
a -> ThirdPartyJobData
s {$sel:outputArtifacts:ThirdPartyJobData' :: Maybe [Artifact]
outputArtifacts = Maybe [Artifact]
a} :: ThirdPartyJobData) ((Maybe [Artifact] -> f (Maybe [Artifact]))
 -> ThirdPartyJobData -> f ThirdPartyJobData)
-> ((Maybe [Artifact] -> f (Maybe [Artifact]))
    -> Maybe [Artifact] -> f (Maybe [Artifact]))
-> (Maybe [Artifact] -> f (Maybe [Artifact]))
-> ThirdPartyJobData
-> f ThirdPartyJobData
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

-- | Represents an AWS session credentials object. These credentials are
-- temporary credentials that are issued by AWS Secure Token Service (STS).
-- They can be used to access input and output artifacts in the S3 bucket
-- used to store artifact for the pipeline in AWS CodePipeline.
thirdPartyJobData_artifactCredentials :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe AWSSessionCredentials)
thirdPartyJobData_artifactCredentials :: (Maybe AWSSessionCredentials -> f (Maybe AWSSessionCredentials))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_artifactCredentials = (ThirdPartyJobData -> Maybe (Sensitive AWSSessionCredentials))
-> (ThirdPartyJobData
    -> Maybe (Sensitive AWSSessionCredentials) -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe (Sensitive AWSSessionCredentials))
     (Maybe (Sensitive AWSSessionCredentials))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe (Sensitive AWSSessionCredentials)
artifactCredentials :: Maybe (Sensitive AWSSessionCredentials)
$sel:artifactCredentials:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe (Sensitive AWSSessionCredentials)
artifactCredentials} -> Maybe (Sensitive AWSSessionCredentials)
artifactCredentials) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe (Sensitive AWSSessionCredentials)
a -> ThirdPartyJobData
s {$sel:artifactCredentials:ThirdPartyJobData' :: Maybe (Sensitive AWSSessionCredentials)
artifactCredentials = Maybe (Sensitive AWSSessionCredentials)
a} :: ThirdPartyJobData) ((Maybe (Sensitive AWSSessionCredentials)
  -> f (Maybe (Sensitive AWSSessionCredentials)))
 -> ThirdPartyJobData -> f ThirdPartyJobData)
-> ((Maybe AWSSessionCredentials
     -> f (Maybe AWSSessionCredentials))
    -> Maybe (Sensitive AWSSessionCredentials)
    -> f (Maybe (Sensitive AWSSessionCredentials)))
-> (Maybe AWSSessionCredentials -> f (Maybe AWSSessionCredentials))
-> ThirdPartyJobData
-> f ThirdPartyJobData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive AWSSessionCredentials)
  (Sensitive AWSSessionCredentials)
  AWSSessionCredentials
  AWSSessionCredentials
-> Iso
     (Maybe (Sensitive AWSSessionCredentials))
     (Maybe (Sensitive AWSSessionCredentials))
     (Maybe AWSSessionCredentials)
     (Maybe AWSSessionCredentials)
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
  (Sensitive AWSSessionCredentials)
  (Sensitive AWSSessionCredentials)
  AWSSessionCredentials
  AWSSessionCredentials
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Represents information about a pipeline to a job worker.
--
-- Does not include @pipelineArn@ and @pipelineExecutionId@ for ThirdParty
-- jobs.
thirdPartyJobData_pipelineContext :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe PipelineContext)
thirdPartyJobData_pipelineContext :: (Maybe PipelineContext -> f (Maybe PipelineContext))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_pipelineContext = (ThirdPartyJobData -> Maybe PipelineContext)
-> (ThirdPartyJobData
    -> Maybe PipelineContext -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe PipelineContext)
     (Maybe PipelineContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe PipelineContext
pipelineContext :: Maybe PipelineContext
$sel:pipelineContext:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe PipelineContext
pipelineContext} -> Maybe PipelineContext
pipelineContext) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe PipelineContext
a -> ThirdPartyJobData
s {$sel:pipelineContext:ThirdPartyJobData' :: Maybe PipelineContext
pipelineContext = Maybe PipelineContext
a} :: ThirdPartyJobData)

-- | The encryption key used to encrypt and decrypt data in the artifact
-- store for the pipeline, such as an AWS Key Management Service (AWS KMS)
-- key. This is optional and might not be present.
thirdPartyJobData_encryptionKey :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe EncryptionKey)
thirdPartyJobData_encryptionKey :: (Maybe EncryptionKey -> f (Maybe EncryptionKey))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_encryptionKey = (ThirdPartyJobData -> Maybe EncryptionKey)
-> (ThirdPartyJobData -> Maybe EncryptionKey -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe EncryptionKey)
     (Maybe EncryptionKey)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe EncryptionKey
encryptionKey :: Maybe EncryptionKey
$sel:encryptionKey:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe EncryptionKey
encryptionKey} -> Maybe EncryptionKey
encryptionKey) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe EncryptionKey
a -> ThirdPartyJobData
s {$sel:encryptionKey:ThirdPartyJobData' :: Maybe EncryptionKey
encryptionKey = Maybe EncryptionKey
a} :: ThirdPartyJobData)

-- | Represents information about an action type.
thirdPartyJobData_actionTypeId :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe ActionTypeId)
thirdPartyJobData_actionTypeId :: (Maybe ActionTypeId -> f (Maybe ActionTypeId))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_actionTypeId = (ThirdPartyJobData -> Maybe ActionTypeId)
-> (ThirdPartyJobData -> Maybe ActionTypeId -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe ActionTypeId)
     (Maybe ActionTypeId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe ActionTypeId
actionTypeId :: Maybe ActionTypeId
$sel:actionTypeId:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe ActionTypeId
actionTypeId} -> Maybe ActionTypeId
actionTypeId) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe ActionTypeId
a -> ThirdPartyJobData
s {$sel:actionTypeId:ThirdPartyJobData' :: Maybe ActionTypeId
actionTypeId = Maybe ActionTypeId
a} :: ThirdPartyJobData)

-- | The name of the artifact that is worked on by the action, if any. This
-- name might be system-generated, such as \"MyApp\", or it might be
-- defined by the user when the action is created. The input artifact name
-- must match the name of an output artifact generated by an action in an
-- earlier action or stage of the pipeline.
thirdPartyJobData_inputArtifacts :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe [Artifact])
thirdPartyJobData_inputArtifacts :: (Maybe [Artifact] -> f (Maybe [Artifact]))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_inputArtifacts = (ThirdPartyJobData -> Maybe [Artifact])
-> (ThirdPartyJobData -> Maybe [Artifact] -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe [Artifact])
     (Maybe [Artifact])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe [Artifact]
inputArtifacts :: Maybe [Artifact]
$sel:inputArtifacts:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe [Artifact]
inputArtifacts} -> Maybe [Artifact]
inputArtifacts) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe [Artifact]
a -> ThirdPartyJobData
s {$sel:inputArtifacts:ThirdPartyJobData' :: Maybe [Artifact]
inputArtifacts = Maybe [Artifact]
a} :: ThirdPartyJobData) ((Maybe [Artifact] -> f (Maybe [Artifact]))
 -> ThirdPartyJobData -> f ThirdPartyJobData)
-> ((Maybe [Artifact] -> f (Maybe [Artifact]))
    -> Maybe [Artifact] -> f (Maybe [Artifact]))
-> (Maybe [Artifact] -> f (Maybe [Artifact]))
-> ThirdPartyJobData
-> f ThirdPartyJobData
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

-- | Represents information about an action configuration.
thirdPartyJobData_actionConfiguration :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe ActionConfiguration)
thirdPartyJobData_actionConfiguration :: (Maybe ActionConfiguration -> f (Maybe ActionConfiguration))
-> ThirdPartyJobData -> f ThirdPartyJobData
thirdPartyJobData_actionConfiguration = (ThirdPartyJobData -> Maybe ActionConfiguration)
-> (ThirdPartyJobData
    -> Maybe ActionConfiguration -> ThirdPartyJobData)
-> Lens
     ThirdPartyJobData
     ThirdPartyJobData
     (Maybe ActionConfiguration)
     (Maybe ActionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ThirdPartyJobData' {Maybe ActionConfiguration
actionConfiguration :: Maybe ActionConfiguration
$sel:actionConfiguration:ThirdPartyJobData' :: ThirdPartyJobData -> Maybe ActionConfiguration
actionConfiguration} -> Maybe ActionConfiguration
actionConfiguration) (\s :: ThirdPartyJobData
s@ThirdPartyJobData' {} Maybe ActionConfiguration
a -> ThirdPartyJobData
s {$sel:actionConfiguration:ThirdPartyJobData' :: Maybe ActionConfiguration
actionConfiguration = Maybe ActionConfiguration
a} :: ThirdPartyJobData)

instance Core.FromJSON ThirdPartyJobData where
  parseJSON :: Value -> Parser ThirdPartyJobData
parseJSON =
    String
-> (Object -> Parser ThirdPartyJobData)
-> Value
-> Parser ThirdPartyJobData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ThirdPartyJobData"
      ( \Object
x ->
          Maybe Text
-> Maybe [Artifact]
-> Maybe (Sensitive AWSSessionCredentials)
-> Maybe PipelineContext
-> Maybe EncryptionKey
-> Maybe ActionTypeId
-> Maybe [Artifact]
-> Maybe ActionConfiguration
-> ThirdPartyJobData
ThirdPartyJobData'
            (Maybe Text
 -> Maybe [Artifact]
 -> Maybe (Sensitive AWSSessionCredentials)
 -> Maybe PipelineContext
 -> Maybe EncryptionKey
 -> Maybe ActionTypeId
 -> Maybe [Artifact]
 -> Maybe ActionConfiguration
 -> ThirdPartyJobData)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Artifact]
      -> Maybe (Sensitive AWSSessionCredentials)
      -> Maybe PipelineContext
      -> Maybe EncryptionKey
      -> Maybe ActionTypeId
      -> Maybe [Artifact]
      -> Maybe ActionConfiguration
      -> ThirdPartyJobData)
forall (f :: * -> *) a b. Functor 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
"continuationToken")
            Parser
  (Maybe [Artifact]
   -> Maybe (Sensitive AWSSessionCredentials)
   -> Maybe PipelineContext
   -> Maybe EncryptionKey
   -> Maybe ActionTypeId
   -> Maybe [Artifact]
   -> Maybe ActionConfiguration
   -> ThirdPartyJobData)
-> Parser (Maybe [Artifact])
-> Parser
     (Maybe (Sensitive AWSSessionCredentials)
      -> Maybe PipelineContext
      -> Maybe EncryptionKey
      -> Maybe ActionTypeId
      -> Maybe [Artifact]
      -> Maybe ActionConfiguration
      -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Artifact]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"outputArtifacts"
                            Parser (Maybe (Maybe [Artifact]))
-> Maybe [Artifact] -> Parser (Maybe [Artifact])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Artifact]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (Sensitive AWSSessionCredentials)
   -> Maybe PipelineContext
   -> Maybe EncryptionKey
   -> Maybe ActionTypeId
   -> Maybe [Artifact]
   -> Maybe ActionConfiguration
   -> ThirdPartyJobData)
-> Parser (Maybe (Sensitive AWSSessionCredentials))
-> Parser
     (Maybe PipelineContext
      -> Maybe EncryptionKey
      -> Maybe ActionTypeId
      -> Maybe [Artifact]
      -> Maybe ActionConfiguration
      -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive AWSSessionCredentials))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"artifactCredentials")
            Parser
  (Maybe PipelineContext
   -> Maybe EncryptionKey
   -> Maybe ActionTypeId
   -> Maybe [Artifact]
   -> Maybe ActionConfiguration
   -> ThirdPartyJobData)
-> Parser (Maybe PipelineContext)
-> Parser
     (Maybe EncryptionKey
      -> Maybe ActionTypeId
      -> Maybe [Artifact]
      -> Maybe ActionConfiguration
      -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pipelineContext")
            Parser
  (Maybe EncryptionKey
   -> Maybe ActionTypeId
   -> Maybe [Artifact]
   -> Maybe ActionConfiguration
   -> ThirdPartyJobData)
-> Parser (Maybe EncryptionKey)
-> Parser
     (Maybe ActionTypeId
      -> Maybe [Artifact]
      -> Maybe ActionConfiguration
      -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EncryptionKey)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryptionKey")
            Parser
  (Maybe ActionTypeId
   -> Maybe [Artifact]
   -> Maybe ActionConfiguration
   -> ThirdPartyJobData)
-> Parser (Maybe ActionTypeId)
-> Parser
     (Maybe [Artifact]
      -> Maybe ActionConfiguration -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionTypeId)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actionTypeId")
            Parser
  (Maybe [Artifact]
   -> Maybe ActionConfiguration -> ThirdPartyJobData)
-> Parser (Maybe [Artifact])
-> Parser (Maybe ActionConfiguration -> ThirdPartyJobData)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Artifact]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inputArtifacts" Parser (Maybe (Maybe [Artifact]))
-> Maybe [Artifact] -> Parser (Maybe [Artifact])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Artifact]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe ActionConfiguration -> ThirdPartyJobData)
-> Parser (Maybe ActionConfiguration) -> Parser ThirdPartyJobData
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"actionConfiguration")
      )

instance Prelude.Hashable ThirdPartyJobData

instance Prelude.NFData ThirdPartyJobData