{-# 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.ElasticTranscoder.Types.Pipeline
-- 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.ElasticTranscoder.Types.Pipeline where

import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types.Notifications
import Amazonka.ElasticTranscoder.Types.PipelineOutputConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The pipeline (queue) that is used to manage jobs.
--
-- /See:/ 'newPipeline' smart constructor.
data Pipeline = Pipeline'
  { -- | The current status of the pipeline:
    --
    -- -   @Active@: The pipeline is processing jobs.
    --
    -- -   @Paused@: The pipeline is not currently processing jobs.
    Pipeline -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the pipeline.
    Pipeline -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 bucket from which Elastic Transcoder gets media files for
    -- transcoding and the graphics files, if any, that you want to use for
    -- watermarks.
    Pipeline -> Maybe Text
inputBucket :: Prelude.Maybe Prelude.Text,
    -- | Information about the Amazon S3 bucket in which you want Elastic
    -- Transcoder to save transcoded files and playlists. Either you specify
    -- both @ContentConfig@ and @ThumbnailConfig@, or you specify
    -- @OutputBucket@.
    --
    -- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
    --     Transcoder to save transcoded files and playlists.
    --
    -- -   __Permissions__: A list of the users and\/or predefined Amazon S3
    --     groups you want to have access to transcoded files and playlists,
    --     and the type of access that you want them to have.
    --
    --     -   GranteeType: The type of value that appears in the @Grantee@
    --         object:
    --
    --         -   @Canonical@: Either the canonical user ID for an AWS account
    --             or an origin access identity for an Amazon CloudFront
    --             distribution.
    --
    --         -   @Email@: The registered email address of an AWS account.
    --
    --         -   @Group@: One of the following predefined Amazon S3 groups:
    --             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
    --
    --     -   @Grantee@: The AWS user or group that you want to have access to
    --         transcoded files and playlists.
    --
    --     -   @Access@: The permission that you want to give to the AWS user
    --         that is listed in @Grantee@. Valid values include:
    --
    --         -   @READ@: The grantee can read the objects and metadata for
    --             objects that Elastic Transcoder adds to the Amazon S3
    --             bucket.
    --
    --         -   @READ_ACP@: The grantee can read the object ACL for objects
    --             that Elastic Transcoder adds to the Amazon S3 bucket.
    --
    --         -   @WRITE_ACP@: The grantee can write the ACL for the objects
    --             that Elastic Transcoder adds to the Amazon S3 bucket.
    --
    --         -   @FULL_CONTROL@: The grantee has @READ@, @READ_ACP@, and
    --             @WRITE_ACP@ permissions for the objects that Elastic
    --             Transcoder adds to the Amazon S3 bucket.
    --
    -- -   __StorageClass__: The Amazon S3 storage class, Standard or
    --     ReducedRedundancy, that you want Elastic Transcoder to assign to the
    --     video files and playlists that it stores in your Amazon S3 bucket.
    Pipeline -> Maybe PipelineOutputConfig
contentConfig :: Prelude.Maybe PipelineOutputConfig,
    -- | The Amazon S3 bucket in which you want Elastic Transcoder to save
    -- transcoded files, thumbnails, and playlists. Either you specify this
    -- value, or you specify both @ContentConfig@ and @ThumbnailConfig@.
    Pipeline -> Maybe Text
outputBucket :: Prelude.Maybe Prelude.Text,
    -- | The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder
    -- uses to transcode jobs for this pipeline.
    Pipeline -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
    -- | The name of the pipeline. We recommend that the name be unique within
    -- the AWS account, but uniqueness is not enforced.
    --
    -- Constraints: Maximum 40 characters
    Pipeline -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The AWS Key Management Service (AWS KMS) key that you want to use with
    -- this pipeline.
    --
    -- If you use either @s3@ or @s3-aws-kms@ as your @Encryption:Mode@, you
    -- don\'t need to provide a key with your job because a default key, known
    -- as an AWS-KMS key, is created for you automatically. You need to provide
    -- an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if
    -- you are using an @Encryption:Mode@ of @aes-cbc-pkcs7@, @aes-ctr@, or
    -- @aes-gcm@.
    Pipeline -> Maybe Text
awsKmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the pipeline. You use this value to identify the
    -- pipeline in which you want to perform a variety of operations, such as
    -- creating a job or a preset.
    Pipeline -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Simple Notification Service (Amazon SNS) topic that you want
    -- to notify to report job status.
    --
    -- To receive notifications, you must also subscribe to the new topic in
    -- the Amazon SNS console.
    --
    -- -   __Progressing__ (optional): The Amazon Simple Notification Service
    --     (Amazon SNS) topic that you want to notify when Elastic Transcoder
    --     has started to process the job.
    --
    -- -   __Complete__ (optional): The Amazon SNS topic that you want to
    --     notify when Elastic Transcoder has finished processing the job.
    --
    -- -   __Warning__ (optional): The Amazon SNS topic that you want to notify
    --     when Elastic Transcoder encounters a warning condition.
    --
    -- -   __Error__ (optional): The Amazon SNS topic that you want to notify
    --     when Elastic Transcoder encounters an error condition.
    Pipeline -> Maybe Notifications
notifications :: Prelude.Maybe Notifications,
    -- | Information about the Amazon S3 bucket in which you want Elastic
    -- Transcoder to save thumbnail files. Either you specify both
    -- @ContentConfig@ and @ThumbnailConfig@, or you specify @OutputBucket@.
    --
    -- -   @Bucket@: The Amazon S3 bucket in which you want Elastic Transcoder
    --     to save thumbnail files.
    --
    -- -   @Permissions@: A list of the users and\/or predefined Amazon S3
    --     groups you want to have access to thumbnail files, and the type of
    --     access that you want them to have.
    --
    --     -   GranteeType: The type of value that appears in the Grantee
    --         object:
    --
    --         -   @Canonical@: Either the canonical user ID for an AWS account
    --             or an origin access identity for an Amazon CloudFront
    --             distribution.
    --
    --             A canonical user ID is not the same as an AWS account
    --             number.
    --
    --         -   @Email@: The registered email address of an AWS account.
    --
    --         -   @Group@: One of the following predefined Amazon S3 groups:
    --             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
    --
    --     -   @Grantee@: The AWS user or group that you want to have access to
    --         thumbnail files.
    --
    --     -   Access: The permission that you want to give to the AWS user
    --         that is listed in Grantee. Valid values include:
    --
    --         -   @READ@: The grantee can read the thumbnails and metadata for
    --             thumbnails that Elastic Transcoder adds to the Amazon S3
    --             bucket.
    --
    --         -   @READ_ACP@: The grantee can read the object ACL for
    --             thumbnails that Elastic Transcoder adds to the Amazon S3
    --             bucket.
    --
    --         -   @WRITE_ACP@: The grantee can write the ACL for the
    --             thumbnails that Elastic Transcoder adds to the Amazon S3
    --             bucket.
    --
    --         -   @FULL_CONTROL@: The grantee has READ, READ_ACP, and
    --             WRITE_ACP permissions for the thumbnails that Elastic
    --             Transcoder adds to the Amazon S3 bucket.
    --
    -- -   @StorageClass@: The Amazon S3 storage class, @Standard@ or
    --     @ReducedRedundancy@, that you want Elastic Transcoder to assign to
    --     the thumbnails that it stores in your Amazon S3 bucket.
    Pipeline -> Maybe PipelineOutputConfig
thumbnailConfig :: Prelude.Maybe PipelineOutputConfig
  }
  deriving (Pipeline -> Pipeline -> Bool
(Pipeline -> Pipeline -> Bool)
-> (Pipeline -> Pipeline -> Bool) -> Eq Pipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Pipeline -> Pipeline -> Bool
$c/= :: Pipeline -> Pipeline -> Bool
== :: Pipeline -> Pipeline -> Bool
$c== :: Pipeline -> Pipeline -> Bool
Prelude.Eq, ReadPrec [Pipeline]
ReadPrec Pipeline
Int -> ReadS Pipeline
ReadS [Pipeline]
(Int -> ReadS Pipeline)
-> ReadS [Pipeline]
-> ReadPrec Pipeline
-> ReadPrec [Pipeline]
-> Read Pipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Pipeline]
$creadListPrec :: ReadPrec [Pipeline]
readPrec :: ReadPrec Pipeline
$creadPrec :: ReadPrec Pipeline
readList :: ReadS [Pipeline]
$creadList :: ReadS [Pipeline]
readsPrec :: Int -> ReadS Pipeline
$creadsPrec :: Int -> ReadS Pipeline
Prelude.Read, Int -> Pipeline -> ShowS
[Pipeline] -> ShowS
Pipeline -> String
(Int -> Pipeline -> ShowS)
-> (Pipeline -> String) -> ([Pipeline] -> ShowS) -> Show Pipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Pipeline] -> ShowS
$cshowList :: [Pipeline] -> ShowS
show :: Pipeline -> String
$cshow :: Pipeline -> String
showsPrec :: Int -> Pipeline -> ShowS
$cshowsPrec :: Int -> Pipeline -> ShowS
Prelude.Show, (forall x. Pipeline -> Rep Pipeline x)
-> (forall x. Rep Pipeline x -> Pipeline) -> Generic Pipeline
forall x. Rep Pipeline x -> Pipeline
forall x. Pipeline -> Rep Pipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Pipeline x -> Pipeline
$cfrom :: forall x. Pipeline -> Rep Pipeline x
Prelude.Generic)

-- |
-- Create a value of 'Pipeline' 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', 'pipeline_status' - The current status of the pipeline:
--
-- -   @Active@: The pipeline is processing jobs.
--
-- -   @Paused@: The pipeline is not currently processing jobs.
--
-- 'arn', 'pipeline_arn' - The Amazon Resource Name (ARN) for the pipeline.
--
-- 'inputBucket', 'pipeline_inputBucket' - The Amazon S3 bucket from which Elastic Transcoder gets media files for
-- transcoding and the graphics files, if any, that you want to use for
-- watermarks.
--
-- 'contentConfig', 'pipeline_contentConfig' - Information about the Amazon S3 bucket in which you want Elastic
-- Transcoder to save transcoded files and playlists. Either you specify
-- both @ContentConfig@ and @ThumbnailConfig@, or you specify
-- @OutputBucket@.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save transcoded files and playlists.
--
-- -   __Permissions__: A list of the users and\/or predefined Amazon S3
--     groups you want to have access to transcoded files and playlists,
--     and the type of access that you want them to have.
--
--     -   GranteeType: The type of value that appears in the @Grantee@
--         object:
--
--         -   @Canonical@: Either the canonical user ID for an AWS account
--             or an origin access identity for an Amazon CloudFront
--             distribution.
--
--         -   @Email@: The registered email address of an AWS account.
--
--         -   @Group@: One of the following predefined Amazon S3 groups:
--             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
--
--     -   @Grantee@: The AWS user or group that you want to have access to
--         transcoded files and playlists.
--
--     -   @Access@: The permission that you want to give to the AWS user
--         that is listed in @Grantee@. Valid values include:
--
--         -   @READ@: The grantee can read the objects and metadata for
--             objects that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @READ_ACP@: The grantee can read the object ACL for objects
--             that Elastic Transcoder adds to the Amazon S3 bucket.
--
--         -   @WRITE_ACP@: The grantee can write the ACL for the objects
--             that Elastic Transcoder adds to the Amazon S3 bucket.
--
--         -   @FULL_CONTROL@: The grantee has @READ@, @READ_ACP@, and
--             @WRITE_ACP@ permissions for the objects that Elastic
--             Transcoder adds to the Amazon S3 bucket.
--
-- -   __StorageClass__: The Amazon S3 storage class, Standard or
--     ReducedRedundancy, that you want Elastic Transcoder to assign to the
--     video files and playlists that it stores in your Amazon S3 bucket.
--
-- 'outputBucket', 'pipeline_outputBucket' - The Amazon S3 bucket in which you want Elastic Transcoder to save
-- transcoded files, thumbnails, and playlists. Either you specify this
-- value, or you specify both @ContentConfig@ and @ThumbnailConfig@.
--
-- 'role'', 'pipeline_role' - The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder
-- uses to transcode jobs for this pipeline.
--
-- 'name', 'pipeline_name' - The name of the pipeline. We recommend that the name be unique within
-- the AWS account, but uniqueness is not enforced.
--
-- Constraints: Maximum 40 characters
--
-- 'awsKmsKeyArn', 'pipeline_awsKmsKeyArn' - The AWS Key Management Service (AWS KMS) key that you want to use with
-- this pipeline.
--
-- If you use either @s3@ or @s3-aws-kms@ as your @Encryption:Mode@, you
-- don\'t need to provide a key with your job because a default key, known
-- as an AWS-KMS key, is created for you automatically. You need to provide
-- an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if
-- you are using an @Encryption:Mode@ of @aes-cbc-pkcs7@, @aes-ctr@, or
-- @aes-gcm@.
--
-- 'id', 'pipeline_id' - The identifier for the pipeline. You use this value to identify the
-- pipeline in which you want to perform a variety of operations, such as
-- creating a job or a preset.
--
-- 'notifications', 'pipeline_notifications' - The Amazon Simple Notification Service (Amazon SNS) topic that you want
-- to notify to report job status.
--
-- To receive notifications, you must also subscribe to the new topic in
-- the Amazon SNS console.
--
-- -   __Progressing__ (optional): The Amazon Simple Notification Service
--     (Amazon SNS) topic that you want to notify when Elastic Transcoder
--     has started to process the job.
--
-- -   __Complete__ (optional): The Amazon SNS topic that you want to
--     notify when Elastic Transcoder has finished processing the job.
--
-- -   __Warning__ (optional): The Amazon SNS topic that you want to notify
--     when Elastic Transcoder encounters a warning condition.
--
-- -   __Error__ (optional): The Amazon SNS topic that you want to notify
--     when Elastic Transcoder encounters an error condition.
--
-- 'thumbnailConfig', 'pipeline_thumbnailConfig' - Information about the Amazon S3 bucket in which you want Elastic
-- Transcoder to save thumbnail files. Either you specify both
-- @ContentConfig@ and @ThumbnailConfig@, or you specify @OutputBucket@.
--
-- -   @Bucket@: The Amazon S3 bucket in which you want Elastic Transcoder
--     to save thumbnail files.
--
-- -   @Permissions@: A list of the users and\/or predefined Amazon S3
--     groups you want to have access to thumbnail files, and the type of
--     access that you want them to have.
--
--     -   GranteeType: The type of value that appears in the Grantee
--         object:
--
--         -   @Canonical@: Either the canonical user ID for an AWS account
--             or an origin access identity for an Amazon CloudFront
--             distribution.
--
--             A canonical user ID is not the same as an AWS account
--             number.
--
--         -   @Email@: The registered email address of an AWS account.
--
--         -   @Group@: One of the following predefined Amazon S3 groups:
--             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
--
--     -   @Grantee@: The AWS user or group that you want to have access to
--         thumbnail files.
--
--     -   Access: The permission that you want to give to the AWS user
--         that is listed in Grantee. Valid values include:
--
--         -   @READ@: The grantee can read the thumbnails and metadata for
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @READ_ACP@: The grantee can read the object ACL for
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @WRITE_ACP@: The grantee can write the ACL for the
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @FULL_CONTROL@: The grantee has READ, READ_ACP, and
--             WRITE_ACP permissions for the thumbnails that Elastic
--             Transcoder adds to the Amazon S3 bucket.
--
-- -   @StorageClass@: The Amazon S3 storage class, @Standard@ or
--     @ReducedRedundancy@, that you want Elastic Transcoder to assign to
--     the thumbnails that it stores in your Amazon S3 bucket.
newPipeline ::
  Pipeline
newPipeline :: Pipeline
newPipeline =
  Pipeline' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PipelineOutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Notifications
-> Maybe PipelineOutputConfig
-> Pipeline
Pipeline'
    { $sel:status:Pipeline' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Pipeline' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:inputBucket:Pipeline' :: Maybe Text
inputBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentConfig:Pipeline' :: Maybe PipelineOutputConfig
contentConfig = Maybe PipelineOutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:outputBucket:Pipeline' :: Maybe Text
outputBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:role':Pipeline' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Pipeline' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsKmsKeyArn:Pipeline' :: Maybe Text
awsKmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Pipeline' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notifications:Pipeline' :: Maybe Notifications
notifications = Maybe Notifications
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailConfig:Pipeline' :: Maybe PipelineOutputConfig
thumbnailConfig = Maybe PipelineOutputConfig
forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the pipeline:
--
-- -   @Active@: The pipeline is processing jobs.
--
-- -   @Paused@: The pipeline is not currently processing jobs.
pipeline_status :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_status :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_status = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
status :: Maybe Text
$sel:status:Pipeline' :: Pipeline -> Maybe Text
status} -> Maybe Text
status) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:status:Pipeline' :: Maybe Text
status = Maybe Text
a} :: Pipeline)

-- | The Amazon Resource Name (ARN) for the pipeline.
pipeline_arn :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_arn :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_arn = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
arn :: Maybe Text
$sel:arn:Pipeline' :: Pipeline -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:arn:Pipeline' :: Maybe Text
arn = Maybe Text
a} :: Pipeline)

-- | The Amazon S3 bucket from which Elastic Transcoder gets media files for
-- transcoding and the graphics files, if any, that you want to use for
-- watermarks.
pipeline_inputBucket :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_inputBucket :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_inputBucket = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
inputBucket :: Maybe Text
$sel:inputBucket:Pipeline' :: Pipeline -> Maybe Text
inputBucket} -> Maybe Text
inputBucket) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:inputBucket:Pipeline' :: Maybe Text
inputBucket = Maybe Text
a} :: Pipeline)

-- | Information about the Amazon S3 bucket in which you want Elastic
-- Transcoder to save transcoded files and playlists. Either you specify
-- both @ContentConfig@ and @ThumbnailConfig@, or you specify
-- @OutputBucket@.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save transcoded files and playlists.
--
-- -   __Permissions__: A list of the users and\/or predefined Amazon S3
--     groups you want to have access to transcoded files and playlists,
--     and the type of access that you want them to have.
--
--     -   GranteeType: The type of value that appears in the @Grantee@
--         object:
--
--         -   @Canonical@: Either the canonical user ID for an AWS account
--             or an origin access identity for an Amazon CloudFront
--             distribution.
--
--         -   @Email@: The registered email address of an AWS account.
--
--         -   @Group@: One of the following predefined Amazon S3 groups:
--             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
--
--     -   @Grantee@: The AWS user or group that you want to have access to
--         transcoded files and playlists.
--
--     -   @Access@: The permission that you want to give to the AWS user
--         that is listed in @Grantee@. Valid values include:
--
--         -   @READ@: The grantee can read the objects and metadata for
--             objects that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @READ_ACP@: The grantee can read the object ACL for objects
--             that Elastic Transcoder adds to the Amazon S3 bucket.
--
--         -   @WRITE_ACP@: The grantee can write the ACL for the objects
--             that Elastic Transcoder adds to the Amazon S3 bucket.
--
--         -   @FULL_CONTROL@: The grantee has @READ@, @READ_ACP@, and
--             @WRITE_ACP@ permissions for the objects that Elastic
--             Transcoder adds to the Amazon S3 bucket.
--
-- -   __StorageClass__: The Amazon S3 storage class, Standard or
--     ReducedRedundancy, that you want Elastic Transcoder to assign to the
--     video files and playlists that it stores in your Amazon S3 bucket.
pipeline_contentConfig :: Lens.Lens' Pipeline (Prelude.Maybe PipelineOutputConfig)
pipeline_contentConfig :: (Maybe PipelineOutputConfig -> f (Maybe PipelineOutputConfig))
-> Pipeline -> f Pipeline
pipeline_contentConfig = (Pipeline -> Maybe PipelineOutputConfig)
-> (Pipeline -> Maybe PipelineOutputConfig -> Pipeline)
-> Lens
     Pipeline
     Pipeline
     (Maybe PipelineOutputConfig)
     (Maybe PipelineOutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe PipelineOutputConfig
contentConfig :: Maybe PipelineOutputConfig
$sel:contentConfig:Pipeline' :: Pipeline -> Maybe PipelineOutputConfig
contentConfig} -> Maybe PipelineOutputConfig
contentConfig) (\s :: Pipeline
s@Pipeline' {} Maybe PipelineOutputConfig
a -> Pipeline
s {$sel:contentConfig:Pipeline' :: Maybe PipelineOutputConfig
contentConfig = Maybe PipelineOutputConfig
a} :: Pipeline)

-- | The Amazon S3 bucket in which you want Elastic Transcoder to save
-- transcoded files, thumbnails, and playlists. Either you specify this
-- value, or you specify both @ContentConfig@ and @ThumbnailConfig@.
pipeline_outputBucket :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_outputBucket :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_outputBucket = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
outputBucket :: Maybe Text
$sel:outputBucket:Pipeline' :: Pipeline -> Maybe Text
outputBucket} -> Maybe Text
outputBucket) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:outputBucket:Pipeline' :: Maybe Text
outputBucket = Maybe Text
a} :: Pipeline)

-- | The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder
-- uses to transcode jobs for this pipeline.
pipeline_role :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_role :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_role = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
role' :: Maybe Text
$sel:role':Pipeline' :: Pipeline -> Maybe Text
role'} -> Maybe Text
role') (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:role':Pipeline' :: Maybe Text
role' = Maybe Text
a} :: Pipeline)

-- | The name of the pipeline. We recommend that the name be unique within
-- the AWS account, but uniqueness is not enforced.
--
-- Constraints: Maximum 40 characters
pipeline_name :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_name :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_name = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
name :: Maybe Text
$sel:name:Pipeline' :: Pipeline -> Maybe Text
name} -> Maybe Text
name) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:name:Pipeline' :: Maybe Text
name = Maybe Text
a} :: Pipeline)

-- | The AWS Key Management Service (AWS KMS) key that you want to use with
-- this pipeline.
--
-- If you use either @s3@ or @s3-aws-kms@ as your @Encryption:Mode@, you
-- don\'t need to provide a key with your job because a default key, known
-- as an AWS-KMS key, is created for you automatically. You need to provide
-- an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if
-- you are using an @Encryption:Mode@ of @aes-cbc-pkcs7@, @aes-ctr@, or
-- @aes-gcm@.
pipeline_awsKmsKeyArn :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_awsKmsKeyArn :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_awsKmsKeyArn = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
awsKmsKeyArn :: Maybe Text
$sel:awsKmsKeyArn:Pipeline' :: Pipeline -> Maybe Text
awsKmsKeyArn} -> Maybe Text
awsKmsKeyArn) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:awsKmsKeyArn:Pipeline' :: Maybe Text
awsKmsKeyArn = Maybe Text
a} :: Pipeline)

-- | The identifier for the pipeline. You use this value to identify the
-- pipeline in which you want to perform a variety of operations, such as
-- creating a job or a preset.
pipeline_id :: Lens.Lens' Pipeline (Prelude.Maybe Prelude.Text)
pipeline_id :: (Maybe Text -> f (Maybe Text)) -> Pipeline -> f Pipeline
pipeline_id = (Pipeline -> Maybe Text)
-> (Pipeline -> Maybe Text -> Pipeline)
-> Lens Pipeline Pipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Text
id :: Maybe Text
$sel:id:Pipeline' :: Pipeline -> Maybe Text
id} -> Maybe Text
id) (\s :: Pipeline
s@Pipeline' {} Maybe Text
a -> Pipeline
s {$sel:id:Pipeline' :: Maybe Text
id = Maybe Text
a} :: Pipeline)

-- | The Amazon Simple Notification Service (Amazon SNS) topic that you want
-- to notify to report job status.
--
-- To receive notifications, you must also subscribe to the new topic in
-- the Amazon SNS console.
--
-- -   __Progressing__ (optional): The Amazon Simple Notification Service
--     (Amazon SNS) topic that you want to notify when Elastic Transcoder
--     has started to process the job.
--
-- -   __Complete__ (optional): The Amazon SNS topic that you want to
--     notify when Elastic Transcoder has finished processing the job.
--
-- -   __Warning__ (optional): The Amazon SNS topic that you want to notify
--     when Elastic Transcoder encounters a warning condition.
--
-- -   __Error__ (optional): The Amazon SNS topic that you want to notify
--     when Elastic Transcoder encounters an error condition.
pipeline_notifications :: Lens.Lens' Pipeline (Prelude.Maybe Notifications)
pipeline_notifications :: (Maybe Notifications -> f (Maybe Notifications))
-> Pipeline -> f Pipeline
pipeline_notifications = (Pipeline -> Maybe Notifications)
-> (Pipeline -> Maybe Notifications -> Pipeline)
-> Lens
     Pipeline Pipeline (Maybe Notifications) (Maybe Notifications)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe Notifications
notifications :: Maybe Notifications
$sel:notifications:Pipeline' :: Pipeline -> Maybe Notifications
notifications} -> Maybe Notifications
notifications) (\s :: Pipeline
s@Pipeline' {} Maybe Notifications
a -> Pipeline
s {$sel:notifications:Pipeline' :: Maybe Notifications
notifications = Maybe Notifications
a} :: Pipeline)

-- | Information about the Amazon S3 bucket in which you want Elastic
-- Transcoder to save thumbnail files. Either you specify both
-- @ContentConfig@ and @ThumbnailConfig@, or you specify @OutputBucket@.
--
-- -   @Bucket@: The Amazon S3 bucket in which you want Elastic Transcoder
--     to save thumbnail files.
--
-- -   @Permissions@: A list of the users and\/or predefined Amazon S3
--     groups you want to have access to thumbnail files, and the type of
--     access that you want them to have.
--
--     -   GranteeType: The type of value that appears in the Grantee
--         object:
--
--         -   @Canonical@: Either the canonical user ID for an AWS account
--             or an origin access identity for an Amazon CloudFront
--             distribution.
--
--             A canonical user ID is not the same as an AWS account
--             number.
--
--         -   @Email@: The registered email address of an AWS account.
--
--         -   @Group@: One of the following predefined Amazon S3 groups:
--             @AllUsers@, @AuthenticatedUsers@, or @LogDelivery@.
--
--     -   @Grantee@: The AWS user or group that you want to have access to
--         thumbnail files.
--
--     -   Access: The permission that you want to give to the AWS user
--         that is listed in Grantee. Valid values include:
--
--         -   @READ@: The grantee can read the thumbnails and metadata for
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @READ_ACP@: The grantee can read the object ACL for
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @WRITE_ACP@: The grantee can write the ACL for the
--             thumbnails that Elastic Transcoder adds to the Amazon S3
--             bucket.
--
--         -   @FULL_CONTROL@: The grantee has READ, READ_ACP, and
--             WRITE_ACP permissions for the thumbnails that Elastic
--             Transcoder adds to the Amazon S3 bucket.
--
-- -   @StorageClass@: The Amazon S3 storage class, @Standard@ or
--     @ReducedRedundancy@, that you want Elastic Transcoder to assign to
--     the thumbnails that it stores in your Amazon S3 bucket.
pipeline_thumbnailConfig :: Lens.Lens' Pipeline (Prelude.Maybe PipelineOutputConfig)
pipeline_thumbnailConfig :: (Maybe PipelineOutputConfig -> f (Maybe PipelineOutputConfig))
-> Pipeline -> f Pipeline
pipeline_thumbnailConfig = (Pipeline -> Maybe PipelineOutputConfig)
-> (Pipeline -> Maybe PipelineOutputConfig -> Pipeline)
-> Lens
     Pipeline
     Pipeline
     (Maybe PipelineOutputConfig)
     (Maybe PipelineOutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Pipeline' {Maybe PipelineOutputConfig
thumbnailConfig :: Maybe PipelineOutputConfig
$sel:thumbnailConfig:Pipeline' :: Pipeline -> Maybe PipelineOutputConfig
thumbnailConfig} -> Maybe PipelineOutputConfig
thumbnailConfig) (\s :: Pipeline
s@Pipeline' {} Maybe PipelineOutputConfig
a -> Pipeline
s {$sel:thumbnailConfig:Pipeline' :: Maybe PipelineOutputConfig
thumbnailConfig = Maybe PipelineOutputConfig
a} :: Pipeline)

instance Core.FromJSON Pipeline where
  parseJSON :: Value -> Parser Pipeline
parseJSON =
    String -> (Object -> Parser Pipeline) -> Value -> Parser Pipeline
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Pipeline"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe PipelineOutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Notifications
-> Maybe PipelineOutputConfig
-> Pipeline
Pipeline'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe PipelineOutputConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Notifications
 -> Maybe PipelineOutputConfig
 -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PipelineOutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PipelineOutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PipelineOutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"Arn")
            Parser
  (Maybe Text
   -> Maybe PipelineOutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe PipelineOutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"InputBucket")
            Parser
  (Maybe PipelineOutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe PipelineOutputConfig)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineOutputConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContentConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"OutputBucket")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"Role")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Notifications
      -> Maybe PipelineOutputConfig
      -> Pipeline)
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
"Name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Notifications
   -> Maybe PipelineOutputConfig
   -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Notifications -> Maybe PipelineOutputConfig -> Pipeline)
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
"AwsKmsKeyArn")
            Parser
  (Maybe Text
   -> Maybe Notifications -> Maybe PipelineOutputConfig -> Pipeline)
-> Parser (Maybe Text)
-> Parser
     (Maybe Notifications -> Maybe PipelineOutputConfig -> Pipeline)
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
"Id")
            Parser
  (Maybe Notifications -> Maybe PipelineOutputConfig -> Pipeline)
-> Parser (Maybe Notifications)
-> Parser (Maybe PipelineOutputConfig -> Pipeline)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Notifications)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Notifications")
            Parser (Maybe PipelineOutputConfig -> Pipeline)
-> Parser (Maybe PipelineOutputConfig) -> Parser Pipeline
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PipelineOutputConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ThumbnailConfig")
      )

instance Prelude.Hashable Pipeline

instance Prelude.NFData Pipeline