{-# 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-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)
--
-- 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_inputBucket,
    updatePipeline_contentConfig,
    updatePipeline_role,
    updatePipeline_name,
    updatePipeline_awsKmsKeyArn,
    updatePipeline_notifications,
    updatePipeline_thumbnailConfig,
    updatePipeline_id,

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

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

import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.Types
import qualified Amazonka.Lens as Lens
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 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 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 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 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 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 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 @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
(UpdatePipeline -> UpdatePipeline -> Bool)
-> (UpdatePipeline -> UpdatePipeline -> Bool) -> Eq UpdatePipeline
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]
(Int -> ReadS UpdatePipeline)
-> ReadS [UpdatePipeline]
-> ReadPrec UpdatePipeline
-> ReadPrec [UpdatePipeline]
-> Read 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
(Int -> UpdatePipeline -> ShowS)
-> (UpdatePipeline -> String)
-> ([UpdatePipeline] -> ShowS)
-> Show UpdatePipeline
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. UpdatePipeline -> Rep UpdatePipeline x)
-> (forall x. Rep UpdatePipeline x -> UpdatePipeline)
-> Generic UpdatePipeline
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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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
--
-- '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@.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe PipelineOutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Notifications
-> Maybe PipelineOutputConfig
-> Text
-> UpdatePipeline
UpdatePipeline'
    { $sel:inputBucket:UpdatePipeline' :: Maybe Text
inputBucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
contentConfig = Maybe PipelineOutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:role':UpdatePipeline' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdatePipeline' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:awsKmsKeyArn:UpdatePipeline' :: Maybe Text
awsKmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notifications:UpdatePipeline' :: Maybe Notifications
notifications = Maybe Notifications
forall a. Maybe a
Prelude.Nothing,
      $sel:thumbnailConfig:UpdatePipeline' :: Maybe PipelineOutputConfig
thumbnailConfig = Maybe PipelineOutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdatePipeline' :: Text
id = Text
pId_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_inputBucket = (UpdatePipeline -> Maybe Text)
-> (UpdatePipeline -> Maybe Text -> UpdatePipeline)
-> Lens UpdatePipeline UpdatePipeline (Maybe Text) (Maybe Text)
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 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 :: (Maybe PipelineOutputConfig -> f (Maybe PipelineOutputConfig))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_contentConfig = (UpdatePipeline -> Maybe PipelineOutputConfig)
-> (UpdatePipeline -> Maybe PipelineOutputConfig -> UpdatePipeline)
-> Lens
     UpdatePipeline
     UpdatePipeline
     (Maybe PipelineOutputConfig)
     (Maybe PipelineOutputConfig)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_role = (UpdatePipeline -> Maybe Text)
-> (UpdatePipeline -> Maybe Text -> UpdatePipeline)
-> Lens UpdatePipeline UpdatePipeline (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_name = (UpdatePipeline -> Maybe Text)
-> (UpdatePipeline -> Maybe Text -> UpdatePipeline)
-> Lens UpdatePipeline UpdatePipeline (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_awsKmsKeyArn = (UpdatePipeline -> Maybe Text)
-> (UpdatePipeline -> Maybe Text -> UpdatePipeline)
-> Lens UpdatePipeline UpdatePipeline (Maybe Text) (Maybe Text)
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 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 :: (Maybe Notifications -> f (Maybe Notifications))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_notifications = (UpdatePipeline -> Maybe Notifications)
-> (UpdatePipeline -> Maybe Notifications -> UpdatePipeline)
-> Lens
     UpdatePipeline
     UpdatePipeline
     (Maybe Notifications)
     (Maybe 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 @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 :: (Maybe PipelineOutputConfig -> f (Maybe PipelineOutputConfig))
-> UpdatePipeline -> f UpdatePipeline
updatePipeline_thumbnailConfig = (UpdatePipeline -> Maybe PipelineOutputConfig)
-> (UpdatePipeline -> Maybe PipelineOutputConfig -> UpdatePipeline)
-> Lens
     UpdatePipeline
     UpdatePipeline
     (Maybe PipelineOutputConfig)
     (Maybe PipelineOutputConfig)
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 :: (Text -> f Text) -> UpdatePipeline -> f UpdatePipeline
updatePipeline_id = (UpdatePipeline -> Text)
-> (UpdatePipeline -> Text -> UpdatePipeline)
-> Lens UpdatePipeline UpdatePipeline Text Text
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 :: UpdatePipeline -> Request UpdatePipeline
request = Service -> UpdatePipeline -> Request UpdatePipeline
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdatePipeline
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdatePipeline)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdatePipeline))
-> Logger
-> Service
-> Proxy UpdatePipeline
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdatePipeline)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Warning] -> Maybe Pipeline -> Int -> UpdatePipelineResponse
UpdatePipelineResponse'
            (Maybe [Warning]
 -> Maybe Pipeline -> Int -> UpdatePipelineResponse)
-> Either String (Maybe [Warning])
-> Either String (Maybe Pipeline -> Int -> UpdatePipelineResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Warning]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Warnings" Either String (Maybe (Maybe [Warning]))
-> Maybe [Warning] -> Either String (Maybe [Warning])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Warning]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Pipeline -> Int -> UpdatePipelineResponse)
-> Either String (Maybe Pipeline)
-> Either String (Int -> UpdatePipelineResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Pipeline)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Pipeline")
            Either String (Int -> UpdatePipelineResponse)
-> Either String Int -> Either String UpdatePipelineResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdatePipeline

instance Prelude.NFData UpdatePipeline

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

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

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

instance Core.ToQuery UpdatePipeline where
  toQuery :: UpdatePipeline -> QueryString
toQuery = QueryString -> UpdatePipeline -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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'
  { -- | 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 pipeline updated by this @UpdatePipelineResponse@ call.
    UpdatePipelineResponse -> Maybe Pipeline
pipeline :: Prelude.Maybe Pipeline,
    -- | The response's http status code.
    UpdatePipelineResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdatePipelineResponse -> UpdatePipelineResponse -> Bool
(UpdatePipelineResponse -> UpdatePipelineResponse -> Bool)
-> (UpdatePipelineResponse -> UpdatePipelineResponse -> Bool)
-> Eq UpdatePipelineResponse
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]
(Int -> ReadS UpdatePipelineResponse)
-> ReadS [UpdatePipelineResponse]
-> ReadPrec UpdatePipelineResponse
-> ReadPrec [UpdatePipelineResponse]
-> Read 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
(Int -> UpdatePipelineResponse -> ShowS)
-> (UpdatePipelineResponse -> String)
-> ([UpdatePipelineResponse] -> ShowS)
-> Show UpdatePipelineResponse
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. UpdatePipelineResponse -> Rep UpdatePipelineResponse x)
-> (forall x.
    Rep UpdatePipelineResponse x -> UpdatePipelineResponse)
-> Generic UpdatePipelineResponse
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:
--
-- '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.
--
-- 'pipeline', 'updatePipelineResponse_pipeline' - The pipeline updated by this @UpdatePipelineResponse@ call.
--
-- 'httpStatus', 'updatePipelineResponse_httpStatus' - The response's http status code.
newUpdatePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdatePipelineResponse
newUpdatePipelineResponse :: Int -> UpdatePipelineResponse
newUpdatePipelineResponse Int
pHttpStatus_ =
  UpdatePipelineResponse' :: Maybe [Warning] -> Maybe Pipeline -> Int -> UpdatePipelineResponse
UpdatePipelineResponse'
    { $sel:warnings:UpdatePipelineResponse' :: Maybe [Warning]
warnings = Maybe [Warning]
forall a. Maybe a
Prelude.Nothing,
      $sel:pipeline:UpdatePipelineResponse' :: Maybe Pipeline
pipeline = Maybe Pipeline
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdatePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: (Maybe [Warning] -> f (Maybe [Warning]))
-> UpdatePipelineResponse -> f UpdatePipelineResponse
updatePipelineResponse_warnings = (UpdatePipelineResponse -> Maybe [Warning])
-> (UpdatePipelineResponse
    -> Maybe [Warning] -> UpdatePipelineResponse)
-> Lens
     UpdatePipelineResponse
     UpdatePipelineResponse
     (Maybe [Warning])
     (Maybe [Warning])
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) ((Maybe [Warning] -> f (Maybe [Warning]))
 -> UpdatePipelineResponse -> f UpdatePipelineResponse)
-> ((Maybe [Warning] -> f (Maybe [Warning]))
    -> Maybe [Warning] -> f (Maybe [Warning]))
-> (Maybe [Warning] -> f (Maybe [Warning]))
-> UpdatePipelineResponse
-> f UpdatePipelineResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Warning] [Warning] [Warning] [Warning]
-> Iso
     (Maybe [Warning])
     (Maybe [Warning])
     (Maybe [Warning])
     (Maybe [Warning])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Warning] [Warning] [Warning] [Warning]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pipeline updated by this @UpdatePipelineResponse@ call.
updatePipelineResponse_pipeline :: Lens.Lens' UpdatePipelineResponse (Prelude.Maybe Pipeline)
updatePipelineResponse_pipeline :: (Maybe Pipeline -> f (Maybe Pipeline))
-> UpdatePipelineResponse -> f UpdatePipelineResponse
updatePipelineResponse_pipeline = (UpdatePipelineResponse -> Maybe Pipeline)
-> (UpdatePipelineResponse
    -> Maybe Pipeline -> UpdatePipelineResponse)
-> Lens
     UpdatePipelineResponse
     UpdatePipelineResponse
     (Maybe Pipeline)
     (Maybe 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)

-- | The response's http status code.
updatePipelineResponse_httpStatus :: Lens.Lens' UpdatePipelineResponse Prelude.Int
updatePipelineResponse_httpStatus :: (Int -> f Int)
-> UpdatePipelineResponse -> f UpdatePipelineResponse
updatePipelineResponse_httpStatus = (UpdatePipelineResponse -> Int)
-> (UpdatePipelineResponse -> Int -> UpdatePipelineResponse)
-> Lens UpdatePipelineResponse UpdatePipelineResponse Int Int
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