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

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

-- |
-- Module      : Amazonka.ElasticTranscoder.UpdatePipeline
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Use the @UpdatePipeline@ operation to update settings for a pipeline.
--
-- When you change pipeline settings, your changes take effect immediately.
-- Jobs that you have already submitted and that Elastic Transcoder has not
-- started to process are affected in addition to jobs that you submit
-- after you change settings.
module Amazonka.ElasticTranscoder.UpdatePipeline
  ( -- * Creating a Request
    UpdatePipeline (..),
    newUpdatePipeline,

    -- * Request Lenses
    updatePipeline_awsKmsKeyArn,
    updatePipeline_contentConfig,
    updatePipeline_inputBucket,
    updatePipeline_name,
    updatePipeline_notifications,
    updatePipeline_role,
    updatePipeline_thumbnailConfig,
    updatePipeline_id,

    -- * Destructuring the Response
    UpdatePipelineResponse (..),
    newUpdatePipelineResponse,

    -- * Response Lenses
    updatePipelineResponse_pipeline,
    updatePipelineResponse_warnings,
    updatePipelineResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticTranscoder.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | The @UpdatePipelineRequest@ structure.
--
-- /See:/ 'newUpdatePipeline' smart constructor.
data UpdatePipeline = UpdatePipeline'
  { -- | 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@.
    UpdatePipeline -> Maybe Text
awsKmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The optional @ContentConfig@ object specifies information about the
    -- Amazon S3 bucket in which you want Elastic Transcoder to save transcoded
    -- files and playlists: which bucket to use, which users you want to have
    -- access to the files, the type of access you want users to have, and the
    -- storage class that you want to assign to the files.
    --
    -- If you specify values for @ContentConfig@, you must also specify values
    -- for @ThumbnailConfig@.
    --
    -- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
    -- the @OutputBucket@ object.
    --
    -- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
    --     Transcoder to save transcoded files and playlists.
    --
    -- -   __Permissions__ (Optional): The Permissions object specifies which
    --     users you want to have access to transcoded files and the type of
    --     access you want them to have. You can grant permissions to a maximum
    --     of 30 users and\/or predefined Amazon S3 groups.
    --
    -- -   __Grantee Type__: Specify the type of value that appears in the
    --     @Grantee@ object:
    --
    --     -   __Canonical__: The value in the @Grantee@ object is either the
    --         canonical user ID for an AWS account or an origin access
    --         identity for an Amazon CloudFront distribution. For more
    --         information about canonical user IDs, see Access Control List
    --         (ACL) Overview in the Amazon Simple Storage Service Developer
    --         Guide. For more information about using CloudFront origin access
    --         identities to require that users use CloudFront URLs instead of
    --         Amazon S3 URLs, see Using an Origin Access Identity to Restrict
    --         Access to Your Amazon S3 Content.
    --
    --         A canonical user ID is not the same as an AWS account number.
    --
    --     -   __Email__: The value in the @Grantee@ object is the registered
    --         email address of an AWS account.
    --
    --     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you
    --     can specify the canonical user ID for an AWS account, an origin
    --     access identity for a CloudFront distribution, the registered email
    --     address of an AWS account, or a predefined Amazon S3 group
    --
    -- -   __Access__: The permission that you want to give to the AWS user
    --     that you specified in @Grantee@. Permissions are granted on the
    --     files that Elastic Transcoder adds to the bucket, including
    --     playlists and video files. 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.
    UpdatePipeline -> Maybe PipelineOutputConfig
contentConfig :: Prelude.Maybe PipelineOutputConfig,
    -- | The Amazon S3 bucket in which you saved the media files that you want to
    -- transcode and the graphics that you want to use as watermarks.
    UpdatePipeline -> Maybe Text
inputBucket :: 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
    UpdatePipeline -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The topic ARN for 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__: The topic ARN for the Amazon Simple Notification
    --     Service (Amazon SNS) topic that you want to notify when Elastic
    --     Transcoder has started to process jobs that are added to this
    --     pipeline. This is the ARN that Amazon SNS returned when you created
    --     the topic.
    --
    -- -   __Complete__: The topic ARN for the Amazon SNS topic that you want
    --     to notify when Elastic Transcoder has finished processing a job.
    --     This is the ARN that Amazon SNS returned when you created the topic.
    --
    -- -   __Warning__: The topic ARN for the Amazon SNS topic that you want to
    --     notify when Elastic Transcoder encounters a warning condition. This
    --     is the ARN that Amazon SNS returned when you created the topic.
    --
    -- -   __Error__: The topic ARN for the Amazon SNS topic that you want to
    --     notify when Elastic Transcoder encounters an error condition. This
    --     is the ARN that Amazon SNS returned when you created the topic.
    UpdatePipeline -> Maybe Notifications
notifications :: Prelude.Maybe Notifications,
    -- | The IAM Amazon Resource Name (ARN) for the role that you want Elastic
    -- Transcoder to use to transcode jobs for this pipeline.
    UpdatePipeline -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
    -- | The @ThumbnailConfig@ object specifies several values, including the
    -- Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail
    -- files, which users you want to have access to the files, the type of
    -- access you want users to have, and the storage class that you want to
    -- assign to the files.
    --
    -- If you specify values for @ContentConfig@, you must also specify values
    -- for @ThumbnailConfig@ even if you don\'t want to create thumbnails.
    --
    -- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
    -- the @OutputBucket@ object.
    --
    -- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
    --     Transcoder to save thumbnail files.
    --
    -- -   __Permissions__ (Optional): The @Permissions@ object specifies which
    --     users and\/or predefined Amazon S3 groups you want to have access to
    --     thumbnail files, and the type of access you want them to have. You
    --     can grant permissions to a maximum of 30 users and\/or predefined
    --     Amazon S3 groups.
    --
    -- -   __GranteeType__: Specify the type of value that appears in the
    --     Grantee object:
    --
    --     -   __Canonical__: The value in the @Grantee@ object is 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 value in the @Grantee@ object is the registered
    --         email address of an AWS account.
    --
    --     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you can specify the
    --     canonical user ID for an AWS account, an origin access identity for
    --     a CloudFront distribution, the registered email address of an AWS
    --     account, or a predefined Amazon S3 group.
    --
    -- -   __Access__: The permission that you want to give to the AWS user
    --     that you specified in @Grantee@. Permissions are granted on the
    --     thumbnail files that Elastic Transcoder adds to the bucket. Valid
    --     values include:
    --
    --     -   @READ@: The grantee can read the thumbnails and metadata for
    --         objects 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.
    UpdatePipeline -> Maybe PipelineOutputConfig
thumbnailConfig :: Prelude.Maybe PipelineOutputConfig,
    -- | The ID of the pipeline that you want to update.
    UpdatePipeline -> Text
id :: Prelude.Text
  }
  deriving (UpdatePipeline -> UpdatePipeline -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePipeline -> UpdatePipeline -> Bool
$c/= :: UpdatePipeline -> UpdatePipeline -> Bool
== :: UpdatePipeline -> UpdatePipeline -> Bool
$c== :: UpdatePipeline -> UpdatePipeline -> Bool
Prelude.Eq, ReadPrec [UpdatePipeline]
ReadPrec UpdatePipeline
Int -> ReadS UpdatePipeline
ReadS [UpdatePipeline]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePipeline]
$creadListPrec :: ReadPrec [UpdatePipeline]
readPrec :: ReadPrec UpdatePipeline
$creadPrec :: ReadPrec UpdatePipeline
readList :: ReadS [UpdatePipeline]
$creadList :: ReadS [UpdatePipeline]
readsPrec :: Int -> ReadS UpdatePipeline
$creadsPrec :: Int -> ReadS UpdatePipeline
Prelude.Read, Int -> UpdatePipeline -> ShowS
[UpdatePipeline] -> ShowS
UpdatePipeline -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePipeline] -> ShowS
$cshowList :: [UpdatePipeline] -> ShowS
show :: UpdatePipeline -> String
$cshow :: UpdatePipeline -> String
showsPrec :: Int -> UpdatePipeline -> ShowS
$cshowsPrec :: Int -> UpdatePipeline -> ShowS
Prelude.Show, forall x. Rep UpdatePipeline x -> UpdatePipeline
forall x. UpdatePipeline -> Rep UpdatePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdatePipeline x -> UpdatePipeline
$cfrom :: forall x. UpdatePipeline -> Rep UpdatePipeline x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePipeline' 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:
--
-- 'awsKmsKeyArn', 'updatePipeline_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@.
--
-- 'contentConfig', 'updatePipeline_contentConfig' - The optional @ContentConfig@ object specifies information about the
-- Amazon S3 bucket in which you want Elastic Transcoder to save transcoded
-- files and playlists: which bucket to use, which users you want to have
-- access to the files, the type of access you want users to have, and the
-- storage class that you want to assign to the files.
--
-- If you specify values for @ContentConfig@, you must also specify values
-- for @ThumbnailConfig@.
--
-- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
-- the @OutputBucket@ object.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save transcoded files and playlists.
--
-- -   __Permissions__ (Optional): The Permissions object specifies which
--     users you want to have access to transcoded files and the type of
--     access you want them to have. You can grant permissions to a maximum
--     of 30 users and\/or predefined Amazon S3 groups.
--
-- -   __Grantee Type__: Specify the type of value that appears in the
--     @Grantee@ object:
--
--     -   __Canonical__: The value in the @Grantee@ object is either the
--         canonical user ID for an AWS account or an origin access
--         identity for an Amazon CloudFront distribution. For more
--         information about canonical user IDs, see Access Control List
--         (ACL) Overview in the Amazon Simple Storage Service Developer
--         Guide. For more information about using CloudFront origin access
--         identities to require that users use CloudFront URLs instead of
--         Amazon S3 URLs, see Using an Origin Access Identity to Restrict
--         Access to Your Amazon S3 Content.
--
--         A canonical user ID is not the same as an AWS account number.
--
--     -   __Email__: The value in the @Grantee@ object is the registered
--         email address of an AWS account.
--
--     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you
--     can specify the canonical user ID for an AWS account, an origin
--     access identity for a CloudFront distribution, the registered email
--     address of an AWS account, or a predefined Amazon S3 group
--
-- -   __Access__: The permission that you want to give to the AWS user
--     that you specified in @Grantee@. Permissions are granted on the
--     files that Elastic Transcoder adds to the bucket, including
--     playlists and video files. 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.
--
-- 'inputBucket', 'updatePipeline_inputBucket' - The Amazon S3 bucket in which you saved the media files that you want to
-- transcode and the graphics that you want to use as watermarks.
--
-- 'name', 'updatePipeline_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
--
-- 'notifications', 'updatePipeline_notifications' - The topic ARN for 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__: The topic ARN for the Amazon Simple Notification
--     Service (Amazon SNS) topic that you want to notify when Elastic
--     Transcoder has started to process jobs that are added to this
--     pipeline. This is the ARN that Amazon SNS returned when you created
--     the topic.
--
-- -   __Complete__: The topic ARN for the Amazon SNS topic that you want
--     to notify when Elastic Transcoder has finished processing a job.
--     This is the ARN that Amazon SNS returned when you created the topic.
--
-- -   __Warning__: The topic ARN for the Amazon SNS topic that you want to
--     notify when Elastic Transcoder encounters a warning condition. This
--     is the ARN that Amazon SNS returned when you created the topic.
--
-- -   __Error__: The topic ARN for the Amazon SNS topic that you want to
--     notify when Elastic Transcoder encounters an error condition. This
--     is the ARN that Amazon SNS returned when you created the topic.
--
-- 'role'', 'updatePipeline_role' - The IAM Amazon Resource Name (ARN) for the role that you want Elastic
-- Transcoder to use to transcode jobs for this pipeline.
--
-- 'thumbnailConfig', 'updatePipeline_thumbnailConfig' - The @ThumbnailConfig@ object specifies several values, including the
-- Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail
-- files, which users you want to have access to the files, the type of
-- access you want users to have, and the storage class that you want to
-- assign to the files.
--
-- If you specify values for @ContentConfig@, you must also specify values
-- for @ThumbnailConfig@ even if you don\'t want to create thumbnails.
--
-- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
-- the @OutputBucket@ object.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save thumbnail files.
--
-- -   __Permissions__ (Optional): The @Permissions@ object specifies which
--     users and\/or predefined Amazon S3 groups you want to have access to
--     thumbnail files, and the type of access you want them to have. You
--     can grant permissions to a maximum of 30 users and\/or predefined
--     Amazon S3 groups.
--
-- -   __GranteeType__: Specify the type of value that appears in the
--     Grantee object:
--
--     -   __Canonical__: The value in the @Grantee@ object is 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 value in the @Grantee@ object is the registered
--         email address of an AWS account.
--
--     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you can specify the
--     canonical user ID for an AWS account, an origin access identity for
--     a CloudFront distribution, the registered email address of an AWS
--     account, or a predefined Amazon S3 group.
--
-- -   __Access__: The permission that you want to give to the AWS user
--     that you specified in @Grantee@. Permissions are granted on the
--     thumbnail files that Elastic Transcoder adds to the bucket. Valid
--     values include:
--
--     -   @READ@: The grantee can read the thumbnails and metadata for
--         objects 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.
--
-- 'id', 'updatePipeline_id' - The ID of the pipeline that you want to update.
newUpdatePipeline ::
  -- | 'id'
  Prelude.Text ->
  UpdatePipeline
newUpdatePipeline :: Text -> UpdatePipeline
newUpdatePipeline Text
pId_ =
  UpdatePipeline'
    { $sel:awsKmsKeyArn:UpdatePipeline' :: Maybe Text
awsKmsKeyArn = forall a. Maybe a
Prelude.Nothing,
      $sel:contentConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
contentConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:inputBucket:UpdatePipeline' :: Maybe Text
inputBucket = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdatePipeline' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:notifications:UpdatePipeline' :: Maybe Notifications
notifications = forall a. Maybe a
Prelude.Nothing,
      $sel:role':UpdatePipeline' :: Maybe Text
role' = forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
thumbnailConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdatePipeline' :: Text
id = Text
pId_
    }

-- | 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@.
updatePipeline_awsKmsKeyArn :: Lens.Lens' UpdatePipeline (Prelude.Maybe Prelude.Text)
updatePipeline_awsKmsKeyArn :: Lens' UpdatePipeline (Maybe Text)
updatePipeline_awsKmsKeyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe Text
awsKmsKeyArn :: Maybe Text
$sel:awsKmsKeyArn:UpdatePipeline' :: UpdatePipeline -> Maybe Text
awsKmsKeyArn} -> Maybe Text
awsKmsKeyArn) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe Text
a -> UpdatePipeline
s {$sel:awsKmsKeyArn:UpdatePipeline' :: Maybe Text
awsKmsKeyArn = Maybe Text
a} :: UpdatePipeline)

-- | The optional @ContentConfig@ object specifies information about the
-- Amazon S3 bucket in which you want Elastic Transcoder to save transcoded
-- files and playlists: which bucket to use, which users you want to have
-- access to the files, the type of access you want users to have, and the
-- storage class that you want to assign to the files.
--
-- If you specify values for @ContentConfig@, you must also specify values
-- for @ThumbnailConfig@.
--
-- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
-- the @OutputBucket@ object.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save transcoded files and playlists.
--
-- -   __Permissions__ (Optional): The Permissions object specifies which
--     users you want to have access to transcoded files and the type of
--     access you want them to have. You can grant permissions to a maximum
--     of 30 users and\/or predefined Amazon S3 groups.
--
-- -   __Grantee Type__: Specify the type of value that appears in the
--     @Grantee@ object:
--
--     -   __Canonical__: The value in the @Grantee@ object is either the
--         canonical user ID for an AWS account or an origin access
--         identity for an Amazon CloudFront distribution. For more
--         information about canonical user IDs, see Access Control List
--         (ACL) Overview in the Amazon Simple Storage Service Developer
--         Guide. For more information about using CloudFront origin access
--         identities to require that users use CloudFront URLs instead of
--         Amazon S3 URLs, see Using an Origin Access Identity to Restrict
--         Access to Your Amazon S3 Content.
--
--         A canonical user ID is not the same as an AWS account number.
--
--     -   __Email__: The value in the @Grantee@ object is the registered
--         email address of an AWS account.
--
--     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you
--     can specify the canonical user ID for an AWS account, an origin
--     access identity for a CloudFront distribution, the registered email
--     address of an AWS account, or a predefined Amazon S3 group
--
-- -   __Access__: The permission that you want to give to the AWS user
--     that you specified in @Grantee@. Permissions are granted on the
--     files that Elastic Transcoder adds to the bucket, including
--     playlists and video files. 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.
updatePipeline_contentConfig :: Lens.Lens' UpdatePipeline (Prelude.Maybe PipelineOutputConfig)
updatePipeline_contentConfig :: Lens' UpdatePipeline (Maybe PipelineOutputConfig)
updatePipeline_contentConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe PipelineOutputConfig
contentConfig :: Maybe PipelineOutputConfig
$sel:contentConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
contentConfig} -> Maybe PipelineOutputConfig
contentConfig) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe PipelineOutputConfig
a -> UpdatePipeline
s {$sel:contentConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
contentConfig = Maybe PipelineOutputConfig
a} :: UpdatePipeline)

-- | The Amazon S3 bucket in which you saved the media files that you want to
-- transcode and the graphics that you want to use as watermarks.
updatePipeline_inputBucket :: Lens.Lens' UpdatePipeline (Prelude.Maybe Prelude.Text)
updatePipeline_inputBucket :: Lens' UpdatePipeline (Maybe Text)
updatePipeline_inputBucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe Text
inputBucket :: Maybe Text
$sel:inputBucket:UpdatePipeline' :: UpdatePipeline -> Maybe Text
inputBucket} -> Maybe Text
inputBucket) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe Text
a -> UpdatePipeline
s {$sel:inputBucket:UpdatePipeline' :: Maybe Text
inputBucket = Maybe Text
a} :: UpdatePipeline)

-- | 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
updatePipeline_name :: Lens.Lens' UpdatePipeline (Prelude.Maybe Prelude.Text)
updatePipeline_name :: Lens' UpdatePipeline (Maybe Text)
updatePipeline_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe Text
name :: Maybe Text
$sel:name:UpdatePipeline' :: UpdatePipeline -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe Text
a -> UpdatePipeline
s {$sel:name:UpdatePipeline' :: Maybe Text
name = Maybe Text
a} :: UpdatePipeline)

-- | The topic ARN for 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__: The topic ARN for the Amazon Simple Notification
--     Service (Amazon SNS) topic that you want to notify when Elastic
--     Transcoder has started to process jobs that are added to this
--     pipeline. This is the ARN that Amazon SNS returned when you created
--     the topic.
--
-- -   __Complete__: The topic ARN for the Amazon SNS topic that you want
--     to notify when Elastic Transcoder has finished processing a job.
--     This is the ARN that Amazon SNS returned when you created the topic.
--
-- -   __Warning__: The topic ARN for the Amazon SNS topic that you want to
--     notify when Elastic Transcoder encounters a warning condition. This
--     is the ARN that Amazon SNS returned when you created the topic.
--
-- -   __Error__: The topic ARN for the Amazon SNS topic that you want to
--     notify when Elastic Transcoder encounters an error condition. This
--     is the ARN that Amazon SNS returned when you created the topic.
updatePipeline_notifications :: Lens.Lens' UpdatePipeline (Prelude.Maybe Notifications)
updatePipeline_notifications :: Lens' UpdatePipeline (Maybe Notifications)
updatePipeline_notifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe Notifications
notifications :: Maybe Notifications
$sel:notifications:UpdatePipeline' :: UpdatePipeline -> Maybe Notifications
notifications} -> Maybe Notifications
notifications) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe Notifications
a -> UpdatePipeline
s {$sel:notifications:UpdatePipeline' :: Maybe Notifications
notifications = Maybe Notifications
a} :: UpdatePipeline)

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

-- | The @ThumbnailConfig@ object specifies several values, including the
-- Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail
-- files, which users you want to have access to the files, the type of
-- access you want users to have, and the storage class that you want to
-- assign to the files.
--
-- If you specify values for @ContentConfig@, you must also specify values
-- for @ThumbnailConfig@ even if you don\'t want to create thumbnails.
--
-- If you specify values for @ContentConfig@ and @ThumbnailConfig@, omit
-- the @OutputBucket@ object.
--
-- -   __Bucket__: The Amazon S3 bucket in which you want Elastic
--     Transcoder to save thumbnail files.
--
-- -   __Permissions__ (Optional): The @Permissions@ object specifies which
--     users and\/or predefined Amazon S3 groups you want to have access to
--     thumbnail files, and the type of access you want them to have. You
--     can grant permissions to a maximum of 30 users and\/or predefined
--     Amazon S3 groups.
--
-- -   __GranteeType__: Specify the type of value that appears in the
--     Grantee object:
--
--     -   __Canonical__: The value in the @Grantee@ object is 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 value in the @Grantee@ object is the registered
--         email address of an AWS account.
--
--     -   __Group__: The value in the @Grantee@ object is 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. To identify the user or group, you can specify the
--     canonical user ID for an AWS account, an origin access identity for
--     a CloudFront distribution, the registered email address of an AWS
--     account, or a predefined Amazon S3 group.
--
-- -   __Access__: The permission that you want to give to the AWS user
--     that you specified in @Grantee@. Permissions are granted on the
--     thumbnail files that Elastic Transcoder adds to the bucket. Valid
--     values include:
--
--     -   @READ@: The grantee can read the thumbnails and metadata for
--         objects 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.
updatePipeline_thumbnailConfig :: Lens.Lens' UpdatePipeline (Prelude.Maybe PipelineOutputConfig)
updatePipeline_thumbnailConfig :: Lens' UpdatePipeline (Maybe PipelineOutputConfig)
updatePipeline_thumbnailConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Maybe PipelineOutputConfig
thumbnailConfig :: Maybe PipelineOutputConfig
$sel:thumbnailConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
thumbnailConfig} -> Maybe PipelineOutputConfig
thumbnailConfig) (\s :: UpdatePipeline
s@UpdatePipeline' {} Maybe PipelineOutputConfig
a -> UpdatePipeline
s {$sel:thumbnailConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
thumbnailConfig = Maybe PipelineOutputConfig
a} :: UpdatePipeline)

-- | The ID of the pipeline that you want to update.
updatePipeline_id :: Lens.Lens' UpdatePipeline Prelude.Text
updatePipeline_id :: Lens' UpdatePipeline Text
updatePipeline_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipeline' {Text
id :: Text
$sel:id:UpdatePipeline' :: UpdatePipeline -> Text
id} -> Text
id) (\s :: UpdatePipeline
s@UpdatePipeline' {} Text
a -> UpdatePipeline
s {$sel:id:UpdatePipeline' :: Text
id = Text
a} :: UpdatePipeline)

instance Core.AWSRequest UpdatePipeline where
  type
    AWSResponse UpdatePipeline =
      UpdatePipelineResponse
  request :: (Service -> Service) -> UpdatePipeline -> Request UpdatePipeline
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdatePipeline
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdatePipeline)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Pipeline -> Maybe [Warning] -> Int -> UpdatePipelineResponse
UpdatePipelineResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Pipeline")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Warnings" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdatePipeline where
  hashWithSalt :: Int -> UpdatePipeline -> Int
hashWithSalt Int
_salt UpdatePipeline' {Maybe Text
Maybe Notifications
Maybe PipelineOutputConfig
Text
id :: Text
thumbnailConfig :: Maybe PipelineOutputConfig
role' :: Maybe Text
notifications :: Maybe Notifications
name :: Maybe Text
inputBucket :: Maybe Text
contentConfig :: Maybe PipelineOutputConfig
awsKmsKeyArn :: Maybe Text
$sel:id:UpdatePipeline' :: UpdatePipeline -> Text
$sel:thumbnailConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:role':UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:notifications:UpdatePipeline' :: UpdatePipeline -> Maybe Notifications
$sel:name:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:inputBucket:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:contentConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:awsKmsKeyArn:UpdatePipeline' :: UpdatePipeline -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
awsKmsKeyArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PipelineOutputConfig
contentConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
inputBucket
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Notifications
notifications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
role'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PipelineOutputConfig
thumbnailConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance Prelude.NFData UpdatePipeline where
  rnf :: UpdatePipeline -> ()
rnf UpdatePipeline' {Maybe Text
Maybe Notifications
Maybe PipelineOutputConfig
Text
id :: Text
thumbnailConfig :: Maybe PipelineOutputConfig
role' :: Maybe Text
notifications :: Maybe Notifications
name :: Maybe Text
inputBucket :: Maybe Text
contentConfig :: Maybe PipelineOutputConfig
awsKmsKeyArn :: Maybe Text
$sel:id:UpdatePipeline' :: UpdatePipeline -> Text
$sel:thumbnailConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:role':UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:notifications:UpdatePipeline' :: UpdatePipeline -> Maybe Notifications
$sel:name:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:inputBucket:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:contentConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:awsKmsKeyArn:UpdatePipeline' :: UpdatePipeline -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
awsKmsKeyArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PipelineOutputConfig
contentConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
inputBucket
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Notifications
notifications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
role'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PipelineOutputConfig
thumbnailConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id

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

instance Data.ToJSON UpdatePipeline where
  toJSON :: UpdatePipeline -> Value
toJSON UpdatePipeline' {Maybe Text
Maybe Notifications
Maybe PipelineOutputConfig
Text
id :: Text
thumbnailConfig :: Maybe PipelineOutputConfig
role' :: Maybe Text
notifications :: Maybe Notifications
name :: Maybe Text
inputBucket :: Maybe Text
contentConfig :: Maybe PipelineOutputConfig
awsKmsKeyArn :: Maybe Text
$sel:id:UpdatePipeline' :: UpdatePipeline -> Text
$sel:thumbnailConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:role':UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:notifications:UpdatePipeline' :: UpdatePipeline -> Maybe Notifications
$sel:name:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:inputBucket:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:contentConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:awsKmsKeyArn:UpdatePipeline' :: UpdatePipeline -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AwsKmsKeyArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
awsKmsKeyArn,
            (Key
"ContentConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PipelineOutputConfig
contentConfig,
            (Key
"InputBucket" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
inputBucket,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"Notifications" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Notifications
notifications,
            (Key
"Role" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
role',
            (Key
"ThumbnailConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PipelineOutputConfig
thumbnailConfig
          ]
      )

instance Data.ToPath UpdatePipeline where
  toPath :: UpdatePipeline -> ByteString
toPath UpdatePipeline' {Maybe Text
Maybe Notifications
Maybe PipelineOutputConfig
Text
id :: Text
thumbnailConfig :: Maybe PipelineOutputConfig
role' :: Maybe Text
notifications :: Maybe Notifications
name :: Maybe Text
inputBucket :: Maybe Text
contentConfig :: Maybe PipelineOutputConfig
awsKmsKeyArn :: Maybe Text
$sel:id:UpdatePipeline' :: UpdatePipeline -> Text
$sel:thumbnailConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:role':UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:notifications:UpdatePipeline' :: UpdatePipeline -> Maybe Notifications
$sel:name:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:inputBucket:UpdatePipeline' :: UpdatePipeline -> Maybe Text
$sel:contentConfig:UpdatePipeline' :: UpdatePipeline -> Maybe PipelineOutputConfig
$sel:awsKmsKeyArn:UpdatePipeline' :: UpdatePipeline -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/2012-09-25/pipelines/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
id]

instance Data.ToQuery UpdatePipeline where
  toQuery :: UpdatePipeline -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | When you update a pipeline, Elastic Transcoder returns the values that
-- you specified in the request.
--
-- /See:/ 'newUpdatePipelineResponse' smart constructor.
data UpdatePipelineResponse = UpdatePipelineResponse'
  { -- | The pipeline updated by this @UpdatePipelineResponse@ call.
    UpdatePipelineResponse -> Maybe Pipeline
pipeline :: Prelude.Maybe Pipeline,
    -- | Elastic Transcoder returns a warning if the resources used by your
    -- pipeline are not in the same region as the pipeline.
    --
    -- Using resources in the same region, such as your Amazon S3 buckets,
    -- Amazon SNS notification topics, and AWS KMS key, reduces processing time
    -- and prevents cross-regional charges.
    UpdatePipelineResponse -> Maybe [Warning]
warnings :: Prelude.Maybe [Warning],
    -- | The response's http status code.
    UpdatePipelineResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
$c/= :: UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
== :: UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
$c== :: UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePipelineResponse]
ReadPrec UpdatePipelineResponse
Int -> ReadS UpdatePipelineResponse
ReadS [UpdatePipelineResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePipelineResponse]
$creadListPrec :: ReadPrec [UpdatePipelineResponse]
readPrec :: ReadPrec UpdatePipelineResponse
$creadPrec :: ReadPrec UpdatePipelineResponse
readList :: ReadS [UpdatePipelineResponse]
$creadList :: ReadS [UpdatePipelineResponse]
readsPrec :: Int -> ReadS UpdatePipelineResponse
$creadsPrec :: Int -> ReadS UpdatePipelineResponse
Prelude.Read, Int -> UpdatePipelineResponse -> ShowS
[UpdatePipelineResponse] -> ShowS
UpdatePipelineResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePipelineResponse] -> ShowS
$cshowList :: [UpdatePipelineResponse] -> ShowS
show :: UpdatePipelineResponse -> String
$cshow :: UpdatePipelineResponse -> String
showsPrec :: Int -> UpdatePipelineResponse -> ShowS
$cshowsPrec :: Int -> UpdatePipelineResponse -> ShowS
Prelude.Show, forall x. Rep UpdatePipelineResponse x -> UpdatePipelineResponse
forall x. UpdatePipelineResponse -> Rep UpdatePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdatePipelineResponse x -> UpdatePipelineResponse
$cfrom :: forall x. UpdatePipelineResponse -> Rep UpdatePipelineResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePipelineResponse' 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:
--
-- 'pipeline', 'updatePipelineResponse_pipeline' - The pipeline updated by this @UpdatePipelineResponse@ call.
--
-- 'warnings', 'updatePipelineResponse_warnings' - Elastic Transcoder returns a warning if the resources used by your
-- pipeline are not in the same region as the pipeline.
--
-- Using resources in the same region, such as your Amazon S3 buckets,
-- Amazon SNS notification topics, and AWS KMS key, reduces processing time
-- and prevents cross-regional charges.
--
-- 'httpStatus', 'updatePipelineResponse_httpStatus' - The response's http status code.
newUpdatePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdatePipelineResponse
newUpdatePipelineResponse :: Int -> UpdatePipelineResponse
newUpdatePipelineResponse Int
pHttpStatus_ =
  UpdatePipelineResponse'
    { $sel:pipeline:UpdatePipelineResponse' :: Maybe Pipeline
pipeline = forall a. Maybe a
Prelude.Nothing,
      $sel:warnings:UpdatePipelineResponse' :: Maybe [Warning]
warnings = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdatePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The pipeline updated by this @UpdatePipelineResponse@ call.
updatePipelineResponse_pipeline :: Lens.Lens' UpdatePipelineResponse (Prelude.Maybe Pipeline)
updatePipelineResponse_pipeline :: Lens' UpdatePipelineResponse (Maybe Pipeline)
updatePipelineResponse_pipeline = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineResponse' {Maybe Pipeline
pipeline :: Maybe Pipeline
$sel:pipeline:UpdatePipelineResponse' :: UpdatePipelineResponse -> Maybe Pipeline
pipeline} -> Maybe Pipeline
pipeline) (\s :: UpdatePipelineResponse
s@UpdatePipelineResponse' {} Maybe Pipeline
a -> UpdatePipelineResponse
s {$sel:pipeline:UpdatePipelineResponse' :: Maybe Pipeline
pipeline = Maybe Pipeline
a} :: UpdatePipelineResponse)

-- | Elastic Transcoder returns a warning if the resources used by your
-- pipeline are not in the same region as the pipeline.
--
-- Using resources in the same region, such as your Amazon S3 buckets,
-- Amazon SNS notification topics, and AWS KMS key, reduces processing time
-- and prevents cross-regional charges.
updatePipelineResponse_warnings :: Lens.Lens' UpdatePipelineResponse (Prelude.Maybe [Warning])
updatePipelineResponse_warnings :: Lens' UpdatePipelineResponse (Maybe [Warning])
updatePipelineResponse_warnings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineResponse' {Maybe [Warning]
warnings :: Maybe [Warning]
$sel:warnings:UpdatePipelineResponse' :: UpdatePipelineResponse -> Maybe [Warning]
warnings} -> Maybe [Warning]
warnings) (\s :: UpdatePipelineResponse
s@UpdatePipelineResponse' {} Maybe [Warning]
a -> UpdatePipelineResponse
s {$sel:warnings:UpdatePipelineResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
a} :: UpdatePipelineResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
updatePipelineResponse_httpStatus :: Lens.Lens' UpdatePipelineResponse Prelude.Int
updatePipelineResponse_httpStatus :: Lens' UpdatePipelineResponse Int
updatePipelineResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePipelineResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdatePipelineResponse' :: UpdatePipelineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdatePipelineResponse
s@UpdatePipelineResponse' {} Int
a -> UpdatePipelineResponse
s {$sel:httpStatus:UpdatePipelineResponse' :: Int
httpStatus = Int
a} :: UpdatePipelineResponse)

instance Prelude.NFData UpdatePipelineResponse where
  rnf :: UpdatePipelineResponse -> ()
rnf UpdatePipelineResponse' {Int
Maybe [Warning]
Maybe Pipeline
httpStatus :: Int
warnings :: Maybe [Warning]
pipeline :: Maybe Pipeline
$sel:httpStatus:UpdatePipelineResponse' :: UpdatePipelineResponse -> Int
$sel:warnings:UpdatePipelineResponse' :: UpdatePipelineResponse -> Maybe [Warning]
$sel:pipeline:UpdatePipelineResponse' :: UpdatePipelineResponse -> Maybe Pipeline
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Pipeline
pipeline
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Warning]
warnings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus