{-# 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-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- 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.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | Represents information about the job data for a partner action. -- -- /See:/ 'newThirdPartyJobData' smart constructor. data ThirdPartyJobData = ThirdPartyJobData' { -- | Represents information about an action configuration. actionConfiguration :: Prelude.Maybe ActionConfiguration, -- | Represents information about an action type. actionTypeId :: Prelude.Maybe ActionTypeId, -- | 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. artifactCredentials :: Prelude.Maybe (Data.Sensitive AWSSessionCredentials), -- | A system-generated token, such as a AWS CodeDeploy deployment ID, that a -- job requires to continue the job asynchronously. continuationToken :: Prelude.Maybe Prelude.Text, -- | 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. encryptionKey :: Prelude.Maybe EncryptionKey, -- | 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. inputArtifacts :: Prelude.Maybe [Artifact], -- | 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. outputArtifacts :: Prelude.Maybe [Artifact], -- | Represents information about a pipeline to a job worker. -- -- Does not include @pipelineArn@ and @pipelineExecutionId@ for ThirdParty -- jobs. pipelineContext :: Prelude.Maybe PipelineContext } deriving (Prelude.Eq, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'ThirdPartyJobData' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'actionConfiguration', 'thirdPartyJobData_actionConfiguration' - Represents information about an action configuration. -- -- 'actionTypeId', 'thirdPartyJobData_actionTypeId' - Represents information about an action type. -- -- '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. -- -- 'continuationToken', 'thirdPartyJobData_continuationToken' - A system-generated token, such as a AWS CodeDeploy deployment ID, that a -- job requires to continue the job asynchronously. -- -- '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. -- -- '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. -- -- '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. -- -- 'pipelineContext', 'thirdPartyJobData_pipelineContext' - Represents information about a pipeline to a job worker. -- -- Does not include @pipelineArn@ and @pipelineExecutionId@ for ThirdParty -- jobs. newThirdPartyJobData :: ThirdPartyJobData newThirdPartyJobData = ThirdPartyJobData' { actionConfiguration = Prelude.Nothing, actionTypeId = Prelude.Nothing, artifactCredentials = Prelude.Nothing, continuationToken = Prelude.Nothing, encryptionKey = Prelude.Nothing, inputArtifacts = Prelude.Nothing, outputArtifacts = Prelude.Nothing, pipelineContext = Prelude.Nothing } -- | Represents information about an action configuration. thirdPartyJobData_actionConfiguration :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe ActionConfiguration) thirdPartyJobData_actionConfiguration = Lens.lens (\ThirdPartyJobData' {actionConfiguration} -> actionConfiguration) (\s@ThirdPartyJobData' {} a -> s {actionConfiguration = a} :: ThirdPartyJobData) -- | Represents information about an action type. thirdPartyJobData_actionTypeId :: Lens.Lens' ThirdPartyJobData (Prelude.Maybe ActionTypeId) thirdPartyJobData_actionTypeId = Lens.lens (\ThirdPartyJobData' {actionTypeId} -> actionTypeId) (\s@ThirdPartyJobData' {} a -> s {actionTypeId = a} :: ThirdPartyJobData) -- | 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 = Lens.lens (\ThirdPartyJobData' {artifactCredentials} -> artifactCredentials) (\s@ThirdPartyJobData' {} a -> s {artifactCredentials = a} :: ThirdPartyJobData) Prelude.. Lens.mapping Data._Sensitive -- | 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 = Lens.lens (\ThirdPartyJobData' {continuationToken} -> continuationToken) (\s@ThirdPartyJobData' {} a -> s {continuationToken = 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 = Lens.lens (\ThirdPartyJobData' {encryptionKey} -> encryptionKey) (\s@ThirdPartyJobData' {} a -> s {encryptionKey = 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 = Lens.lens (\ThirdPartyJobData' {inputArtifacts} -> inputArtifacts) (\s@ThirdPartyJobData' {} a -> s {inputArtifacts = a} :: ThirdPartyJobData) Prelude.. Lens.mapping Lens.coerced -- | 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 = Lens.lens (\ThirdPartyJobData' {outputArtifacts} -> outputArtifacts) (\s@ThirdPartyJobData' {} a -> s {outputArtifacts = a} :: ThirdPartyJobData) Prelude.. Lens.mapping Lens.coerced -- | 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 = Lens.lens (\ThirdPartyJobData' {pipelineContext} -> pipelineContext) (\s@ThirdPartyJobData' {} a -> s {pipelineContext = a} :: ThirdPartyJobData) instance Data.FromJSON ThirdPartyJobData where parseJSON = Data.withObject "ThirdPartyJobData" ( \x -> ThirdPartyJobData' Prelude.<$> (x Data..:? "actionConfiguration") Prelude.<*> (x Data..:? "actionTypeId") Prelude.<*> (x Data..:? "artifactCredentials") Prelude.<*> (x Data..:? "continuationToken") Prelude.<*> (x Data..:? "encryptionKey") Prelude.<*> (x Data..:? "inputArtifacts" Data..!= Prelude.mempty) Prelude.<*> ( x Data..:? "outputArtifacts" Data..!= Prelude.mempty ) Prelude.<*> (x Data..:? "pipelineContext") ) instance Prelude.Hashable ThirdPartyJobData where hashWithSalt _salt ThirdPartyJobData' {..} = _salt `Prelude.hashWithSalt` actionConfiguration `Prelude.hashWithSalt` actionTypeId `Prelude.hashWithSalt` artifactCredentials `Prelude.hashWithSalt` continuationToken `Prelude.hashWithSalt` encryptionKey `Prelude.hashWithSalt` inputArtifacts `Prelude.hashWithSalt` outputArtifacts `Prelude.hashWithSalt` pipelineContext instance Prelude.NFData ThirdPartyJobData where rnf ThirdPartyJobData' {..} = Prelude.rnf actionConfiguration `Prelude.seq` Prelude.rnf actionTypeId `Prelude.seq` Prelude.rnf artifactCredentials `Prelude.seq` Prelude.rnf continuationToken `Prelude.seq` Prelude.rnf encryptionKey `Prelude.seq` Prelude.rnf inputArtifacts `Prelude.seq` Prelude.rnf outputArtifacts `Prelude.seq` Prelude.rnf pipelineContext