{-# 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.ImageBuilder.UpdateImagePipeline
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an image pipeline. Image pipelines enable you to automate the
-- creation and distribution of images.
--
-- UpdateImagePipeline does not support selective updates for the pipeline.
-- You must specify all of the required properties in the update request,
-- not just the properties that have changed.
module Amazonka.ImageBuilder.UpdateImagePipeline
  ( -- * Creating a Request
    UpdateImagePipeline (..),
    newUpdateImagePipeline,

    -- * Request Lenses
    updateImagePipeline_containerRecipeArn,
    updateImagePipeline_description,
    updateImagePipeline_distributionConfigurationArn,
    updateImagePipeline_enhancedImageMetadataEnabled,
    updateImagePipeline_imageRecipeArn,
    updateImagePipeline_imageTestsConfiguration,
    updateImagePipeline_schedule,
    updateImagePipeline_status,
    updateImagePipeline_imagePipelineArn,
    updateImagePipeline_infrastructureConfigurationArn,
    updateImagePipeline_clientToken,

    -- * Destructuring the Response
    UpdateImagePipelineResponse (..),
    newUpdateImagePipelineResponse,

    -- * Response Lenses
    updateImagePipelineResponse_clientToken,
    updateImagePipelineResponse_imagePipelineArn,
    updateImagePipelineResponse_requestId,
    updateImagePipelineResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateImagePipeline' smart constructor.
data UpdateImagePipeline = UpdateImagePipeline'
  { -- | The Amazon Resource Name (ARN) of the container pipeline to update.
    UpdateImagePipeline -> Maybe Text
containerRecipeArn :: Prelude.Maybe Prelude.Text,
    -- | The description of the image pipeline.
    UpdateImagePipeline -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the distribution configuration that
    -- will be used to configure and distribute images updated by this image
    -- pipeline.
    UpdateImagePipeline -> Maybe Text
distributionConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | Collects additional information about the image being created, including
    -- the operating system (OS) version and package list. This information is
    -- used to enhance the overall experience of using EC2 Image Builder.
    -- Enabled by default.
    UpdateImagePipeline -> Maybe Bool
enhancedImageMetadataEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the image recipe that will be used to
    -- configure images updated by this image pipeline.
    UpdateImagePipeline -> Maybe Text
imageRecipeArn :: Prelude.Maybe Prelude.Text,
    -- | The image test configuration of the image pipeline.
    UpdateImagePipeline -> Maybe ImageTestsConfiguration
imageTestsConfiguration :: Prelude.Maybe ImageTestsConfiguration,
    -- | The schedule of the image pipeline.
    UpdateImagePipeline -> Maybe Schedule
schedule :: Prelude.Maybe Schedule,
    -- | The status of the image pipeline.
    UpdateImagePipeline -> Maybe PipelineStatus
status :: Prelude.Maybe PipelineStatus,
    -- | The Amazon Resource Name (ARN) of the image pipeline that you want to
    -- update.
    UpdateImagePipeline -> Text
imagePipelineArn :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the infrastructure configuration that
    -- will be used to build images updated by this image pipeline.
    UpdateImagePipeline -> Text
infrastructureConfigurationArn :: Prelude.Text,
    -- | The idempotency token used to make this request idempotent.
    UpdateImagePipeline -> Text
clientToken :: Prelude.Text
  }
  deriving (UpdateImagePipeline -> UpdateImagePipeline -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateImagePipeline -> UpdateImagePipeline -> Bool
$c/= :: UpdateImagePipeline -> UpdateImagePipeline -> Bool
== :: UpdateImagePipeline -> UpdateImagePipeline -> Bool
$c== :: UpdateImagePipeline -> UpdateImagePipeline -> Bool
Prelude.Eq, ReadPrec [UpdateImagePipeline]
ReadPrec UpdateImagePipeline
Int -> ReadS UpdateImagePipeline
ReadS [UpdateImagePipeline]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateImagePipeline]
$creadListPrec :: ReadPrec [UpdateImagePipeline]
readPrec :: ReadPrec UpdateImagePipeline
$creadPrec :: ReadPrec UpdateImagePipeline
readList :: ReadS [UpdateImagePipeline]
$creadList :: ReadS [UpdateImagePipeline]
readsPrec :: Int -> ReadS UpdateImagePipeline
$creadsPrec :: Int -> ReadS UpdateImagePipeline
Prelude.Read, Int -> UpdateImagePipeline -> ShowS
[UpdateImagePipeline] -> ShowS
UpdateImagePipeline -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateImagePipeline] -> ShowS
$cshowList :: [UpdateImagePipeline] -> ShowS
show :: UpdateImagePipeline -> String
$cshow :: UpdateImagePipeline -> String
showsPrec :: Int -> UpdateImagePipeline -> ShowS
$cshowsPrec :: Int -> UpdateImagePipeline -> ShowS
Prelude.Show, forall x. Rep UpdateImagePipeline x -> UpdateImagePipeline
forall x. UpdateImagePipeline -> Rep UpdateImagePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateImagePipeline x -> UpdateImagePipeline
$cfrom :: forall x. UpdateImagePipeline -> Rep UpdateImagePipeline x
Prelude.Generic)

-- |
-- Create a value of 'UpdateImagePipeline' 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:
--
-- 'containerRecipeArn', 'updateImagePipeline_containerRecipeArn' - The Amazon Resource Name (ARN) of the container pipeline to update.
--
-- 'description', 'updateImagePipeline_description' - The description of the image pipeline.
--
-- 'distributionConfigurationArn', 'updateImagePipeline_distributionConfigurationArn' - The Amazon Resource Name (ARN) of the distribution configuration that
-- will be used to configure and distribute images updated by this image
-- pipeline.
--
-- 'enhancedImageMetadataEnabled', 'updateImagePipeline_enhancedImageMetadataEnabled' - Collects additional information about the image being created, including
-- the operating system (OS) version and package list. This information is
-- used to enhance the overall experience of using EC2 Image Builder.
-- Enabled by default.
--
-- 'imageRecipeArn', 'updateImagePipeline_imageRecipeArn' - The Amazon Resource Name (ARN) of the image recipe that will be used to
-- configure images updated by this image pipeline.
--
-- 'imageTestsConfiguration', 'updateImagePipeline_imageTestsConfiguration' - The image test configuration of the image pipeline.
--
-- 'schedule', 'updateImagePipeline_schedule' - The schedule of the image pipeline.
--
-- 'status', 'updateImagePipeline_status' - The status of the image pipeline.
--
-- 'imagePipelineArn', 'updateImagePipeline_imagePipelineArn' - The Amazon Resource Name (ARN) of the image pipeline that you want to
-- update.
--
-- 'infrastructureConfigurationArn', 'updateImagePipeline_infrastructureConfigurationArn' - The Amazon Resource Name (ARN) of the infrastructure configuration that
-- will be used to build images updated by this image pipeline.
--
-- 'clientToken', 'updateImagePipeline_clientToken' - The idempotency token used to make this request idempotent.
newUpdateImagePipeline ::
  -- | 'imagePipelineArn'
  Prelude.Text ->
  -- | 'infrastructureConfigurationArn'
  Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  UpdateImagePipeline
newUpdateImagePipeline :: Text -> Text -> Text -> UpdateImagePipeline
newUpdateImagePipeline
  Text
pImagePipelineArn_
  Text
pInfrastructureConfigurationArn_
  Text
pClientToken_ =
    UpdateImagePipeline'
      { $sel:containerRecipeArn:UpdateImagePipeline' :: Maybe Text
containerRecipeArn =
          forall a. Maybe a
Prelude.Nothing,
        $sel:description:UpdateImagePipeline' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:distributionConfigurationArn:UpdateImagePipeline' :: Maybe Text
distributionConfigurationArn = forall a. Maybe a
Prelude.Nothing,
        $sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: Maybe Bool
enhancedImageMetadataEnabled = forall a. Maybe a
Prelude.Nothing,
        $sel:imageRecipeArn:UpdateImagePipeline' :: Maybe Text
imageRecipeArn = forall a. Maybe a
Prelude.Nothing,
        $sel:imageTestsConfiguration:UpdateImagePipeline' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = forall a. Maybe a
Prelude.Nothing,
        $sel:schedule:UpdateImagePipeline' :: Maybe Schedule
schedule = forall a. Maybe a
Prelude.Nothing,
        $sel:status:UpdateImagePipeline' :: Maybe PipelineStatus
status = forall a. Maybe a
Prelude.Nothing,
        $sel:imagePipelineArn:UpdateImagePipeline' :: Text
imagePipelineArn = Text
pImagePipelineArn_,
        $sel:infrastructureConfigurationArn:UpdateImagePipeline' :: Text
infrastructureConfigurationArn =
          Text
pInfrastructureConfigurationArn_,
        $sel:clientToken:UpdateImagePipeline' :: Text
clientToken = Text
pClientToken_
      }

-- | The Amazon Resource Name (ARN) of the container pipeline to update.
updateImagePipeline_containerRecipeArn :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Prelude.Text)
updateImagePipeline_containerRecipeArn :: Lens' UpdateImagePipeline (Maybe Text)
updateImagePipeline_containerRecipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Text
containerRecipeArn :: Maybe Text
$sel:containerRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
containerRecipeArn} -> Maybe Text
containerRecipeArn) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Text
a -> UpdateImagePipeline
s {$sel:containerRecipeArn:UpdateImagePipeline' :: Maybe Text
containerRecipeArn = Maybe Text
a} :: UpdateImagePipeline)

-- | The description of the image pipeline.
updateImagePipeline_description :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Prelude.Text)
updateImagePipeline_description :: Lens' UpdateImagePipeline (Maybe Text)
updateImagePipeline_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Text
description :: Maybe Text
$sel:description:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Text
a -> UpdateImagePipeline
s {$sel:description:UpdateImagePipeline' :: Maybe Text
description = Maybe Text
a} :: UpdateImagePipeline)

-- | The Amazon Resource Name (ARN) of the distribution configuration that
-- will be used to configure and distribute images updated by this image
-- pipeline.
updateImagePipeline_distributionConfigurationArn :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Prelude.Text)
updateImagePipeline_distributionConfigurationArn :: Lens' UpdateImagePipeline (Maybe Text)
updateImagePipeline_distributionConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Text
distributionConfigurationArn :: Maybe Text
$sel:distributionConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
distributionConfigurationArn} -> Maybe Text
distributionConfigurationArn) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Text
a -> UpdateImagePipeline
s {$sel:distributionConfigurationArn:UpdateImagePipeline' :: Maybe Text
distributionConfigurationArn = Maybe Text
a} :: UpdateImagePipeline)

-- | Collects additional information about the image being created, including
-- the operating system (OS) version and package list. This information is
-- used to enhance the overall experience of using EC2 Image Builder.
-- Enabled by default.
updateImagePipeline_enhancedImageMetadataEnabled :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Prelude.Bool)
updateImagePipeline_enhancedImageMetadataEnabled :: Lens' UpdateImagePipeline (Maybe Bool)
updateImagePipeline_enhancedImageMetadataEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Bool
enhancedImageMetadataEnabled :: Maybe Bool
$sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Bool
enhancedImageMetadataEnabled} -> Maybe Bool
enhancedImageMetadataEnabled) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Bool
a -> UpdateImagePipeline
s {$sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: Maybe Bool
enhancedImageMetadataEnabled = Maybe Bool
a} :: UpdateImagePipeline)

-- | The Amazon Resource Name (ARN) of the image recipe that will be used to
-- configure images updated by this image pipeline.
updateImagePipeline_imageRecipeArn :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Prelude.Text)
updateImagePipeline_imageRecipeArn :: Lens' UpdateImagePipeline (Maybe Text)
updateImagePipeline_imageRecipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Text
imageRecipeArn :: Maybe Text
$sel:imageRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
imageRecipeArn} -> Maybe Text
imageRecipeArn) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Text
a -> UpdateImagePipeline
s {$sel:imageRecipeArn:UpdateImagePipeline' :: Maybe Text
imageRecipeArn = Maybe Text
a} :: UpdateImagePipeline)

-- | The image test configuration of the image pipeline.
updateImagePipeline_imageTestsConfiguration :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe ImageTestsConfiguration)
updateImagePipeline_imageTestsConfiguration :: Lens' UpdateImagePipeline (Maybe ImageTestsConfiguration)
updateImagePipeline_imageTestsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe ImageTestsConfiguration
imageTestsConfiguration :: Maybe ImageTestsConfiguration
$sel:imageTestsConfiguration:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe ImageTestsConfiguration
imageTestsConfiguration} -> Maybe ImageTestsConfiguration
imageTestsConfiguration) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe ImageTestsConfiguration
a -> UpdateImagePipeline
s {$sel:imageTestsConfiguration:UpdateImagePipeline' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = Maybe ImageTestsConfiguration
a} :: UpdateImagePipeline)

-- | The schedule of the image pipeline.
updateImagePipeline_schedule :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe Schedule)
updateImagePipeline_schedule :: Lens' UpdateImagePipeline (Maybe Schedule)
updateImagePipeline_schedule = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe Schedule
schedule :: Maybe Schedule
$sel:schedule:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Schedule
schedule} -> Maybe Schedule
schedule) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe Schedule
a -> UpdateImagePipeline
s {$sel:schedule:UpdateImagePipeline' :: Maybe Schedule
schedule = Maybe Schedule
a} :: UpdateImagePipeline)

-- | The status of the image pipeline.
updateImagePipeline_status :: Lens.Lens' UpdateImagePipeline (Prelude.Maybe PipelineStatus)
updateImagePipeline_status :: Lens' UpdateImagePipeline (Maybe PipelineStatus)
updateImagePipeline_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Maybe PipelineStatus
status :: Maybe PipelineStatus
$sel:status:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe PipelineStatus
status} -> Maybe PipelineStatus
status) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Maybe PipelineStatus
a -> UpdateImagePipeline
s {$sel:status:UpdateImagePipeline' :: Maybe PipelineStatus
status = Maybe PipelineStatus
a} :: UpdateImagePipeline)

-- | The Amazon Resource Name (ARN) of the image pipeline that you want to
-- update.
updateImagePipeline_imagePipelineArn :: Lens.Lens' UpdateImagePipeline Prelude.Text
updateImagePipeline_imagePipelineArn :: Lens' UpdateImagePipeline Text
updateImagePipeline_imagePipelineArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Text
imagePipelineArn :: Text
$sel:imagePipelineArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
imagePipelineArn} -> Text
imagePipelineArn) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Text
a -> UpdateImagePipeline
s {$sel:imagePipelineArn:UpdateImagePipeline' :: Text
imagePipelineArn = Text
a} :: UpdateImagePipeline)

-- | The Amazon Resource Name (ARN) of the infrastructure configuration that
-- will be used to build images updated by this image pipeline.
updateImagePipeline_infrastructureConfigurationArn :: Lens.Lens' UpdateImagePipeline Prelude.Text
updateImagePipeline_infrastructureConfigurationArn :: Lens' UpdateImagePipeline Text
updateImagePipeline_infrastructureConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Text
infrastructureConfigurationArn :: Text
$sel:infrastructureConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
infrastructureConfigurationArn} -> Text
infrastructureConfigurationArn) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Text
a -> UpdateImagePipeline
s {$sel:infrastructureConfigurationArn:UpdateImagePipeline' :: Text
infrastructureConfigurationArn = Text
a} :: UpdateImagePipeline)

-- | The idempotency token used to make this request idempotent.
updateImagePipeline_clientToken :: Lens.Lens' UpdateImagePipeline Prelude.Text
updateImagePipeline_clientToken :: Lens' UpdateImagePipeline Text
updateImagePipeline_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipeline' {Text
clientToken :: Text
$sel:clientToken:UpdateImagePipeline' :: UpdateImagePipeline -> Text
clientToken} -> Text
clientToken) (\s :: UpdateImagePipeline
s@UpdateImagePipeline' {} Text
a -> UpdateImagePipeline
s {$sel:clientToken:UpdateImagePipeline' :: Text
clientToken = Text
a} :: UpdateImagePipeline)

instance Core.AWSRequest UpdateImagePipeline where
  type
    AWSResponse UpdateImagePipeline =
      UpdateImagePipelineResponse
  request :: (Service -> Service)
-> UpdateImagePipeline -> Request UpdateImagePipeline
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 UpdateImagePipeline
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateImagePipeline)))
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 Text
-> Maybe Text -> Maybe Text -> Int -> UpdateImagePipelineResponse
UpdateImagePipelineResponse'
            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
"clientToken")
            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
"imagePipelineArn")
            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
"requestId")
            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 UpdateImagePipeline where
  hashWithSalt :: Int -> UpdateImagePipeline -> Int
hashWithSalt Int
_salt UpdateImagePipeline' {Maybe Bool
Maybe Text
Maybe ImageTestsConfiguration
Maybe PipelineStatus
Maybe Schedule
Text
clientToken :: Text
infrastructureConfigurationArn :: Text
imagePipelineArn :: Text
status :: Maybe PipelineStatus
schedule :: Maybe Schedule
imageTestsConfiguration :: Maybe ImageTestsConfiguration
imageRecipeArn :: Maybe Text
enhancedImageMetadataEnabled :: Maybe Bool
distributionConfigurationArn :: Maybe Text
description :: Maybe Text
containerRecipeArn :: Maybe Text
$sel:clientToken:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:infrastructureConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:imagePipelineArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:status:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe PipelineStatus
$sel:schedule:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Schedule
$sel:imageTestsConfiguration:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe ImageTestsConfiguration
$sel:imageRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Bool
$sel:distributionConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:description:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:containerRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
containerRecipeArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
distributionConfigurationArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enhancedImageMetadataEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imageRecipeArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageTestsConfiguration
imageTestsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Schedule
schedule
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PipelineStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
imagePipelineArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
infrastructureConfigurationArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken

instance Prelude.NFData UpdateImagePipeline where
  rnf :: UpdateImagePipeline -> ()
rnf UpdateImagePipeline' {Maybe Bool
Maybe Text
Maybe ImageTestsConfiguration
Maybe PipelineStatus
Maybe Schedule
Text
clientToken :: Text
infrastructureConfigurationArn :: Text
imagePipelineArn :: Text
status :: Maybe PipelineStatus
schedule :: Maybe Schedule
imageTestsConfiguration :: Maybe ImageTestsConfiguration
imageRecipeArn :: Maybe Text
enhancedImageMetadataEnabled :: Maybe Bool
distributionConfigurationArn :: Maybe Text
description :: Maybe Text
containerRecipeArn :: Maybe Text
$sel:clientToken:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:infrastructureConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:imagePipelineArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:status:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe PipelineStatus
$sel:schedule:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Schedule
$sel:imageTestsConfiguration:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe ImageTestsConfiguration
$sel:imageRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Bool
$sel:distributionConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:description:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:containerRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
containerRecipeArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
distributionConfigurationArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enhancedImageMetadataEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageRecipeArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageTestsConfiguration
imageTestsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Schedule
schedule
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PipelineStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
imagePipelineArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
infrastructureConfigurationArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken

instance Data.ToHeaders UpdateImagePipeline where
  toHeaders :: UpdateImagePipeline -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateImagePipeline where
  toJSON :: UpdateImagePipeline -> Value
toJSON UpdateImagePipeline' {Maybe Bool
Maybe Text
Maybe ImageTestsConfiguration
Maybe PipelineStatus
Maybe Schedule
Text
clientToken :: Text
infrastructureConfigurationArn :: Text
imagePipelineArn :: Text
status :: Maybe PipelineStatus
schedule :: Maybe Schedule
imageTestsConfiguration :: Maybe ImageTestsConfiguration
imageRecipeArn :: Maybe Text
enhancedImageMetadataEnabled :: Maybe Bool
distributionConfigurationArn :: Maybe Text
description :: Maybe Text
containerRecipeArn :: Maybe Text
$sel:clientToken:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:infrastructureConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:imagePipelineArn:UpdateImagePipeline' :: UpdateImagePipeline -> Text
$sel:status:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe PipelineStatus
$sel:schedule:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Schedule
$sel:imageTestsConfiguration:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe ImageTestsConfiguration
$sel:imageRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:enhancedImageMetadataEnabled:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Bool
$sel:distributionConfigurationArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:description:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
$sel:containerRecipeArn:UpdateImagePipeline' :: UpdateImagePipeline -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"containerRecipeArn" 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
containerRecipeArn,
            (Key
"description" 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
description,
            (Key
"distributionConfigurationArn" 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
distributionConfigurationArn,
            (Key
"enhancedImageMetadataEnabled" 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 Bool
enhancedImageMetadataEnabled,
            (Key
"imageRecipeArn" 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
imageRecipeArn,
            (Key
"imageTestsConfiguration" 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 ImageTestsConfiguration
imageTestsConfiguration,
            (Key
"schedule" 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 Schedule
schedule,
            (Key
"status" 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 PipelineStatus
status,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"imagePipelineArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
imagePipelineArn),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"infrastructureConfigurationArn"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
infrastructureConfigurationArn
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientToken)
          ]
      )

instance Data.ToPath UpdateImagePipeline where
  toPath :: UpdateImagePipeline -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/UpdateImagePipeline"

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

-- | /See:/ 'newUpdateImagePipelineResponse' smart constructor.
data UpdateImagePipelineResponse = UpdateImagePipelineResponse'
  { -- | The idempotency token used to make this request idempotent.
    UpdateImagePipelineResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the image pipeline that was updated by
    -- this request.
    UpdateImagePipelineResponse -> Maybe Text
imagePipelineArn :: Prelude.Maybe Prelude.Text,
    -- | The request ID that uniquely identifies this request.
    UpdateImagePipelineResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateImagePipelineResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateImagePipelineResponse -> UpdateImagePipelineResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateImagePipelineResponse -> UpdateImagePipelineResponse -> Bool
$c/= :: UpdateImagePipelineResponse -> UpdateImagePipelineResponse -> Bool
== :: UpdateImagePipelineResponse -> UpdateImagePipelineResponse -> Bool
$c== :: UpdateImagePipelineResponse -> UpdateImagePipelineResponse -> Bool
Prelude.Eq, ReadPrec [UpdateImagePipelineResponse]
ReadPrec UpdateImagePipelineResponse
Int -> ReadS UpdateImagePipelineResponse
ReadS [UpdateImagePipelineResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateImagePipelineResponse]
$creadListPrec :: ReadPrec [UpdateImagePipelineResponse]
readPrec :: ReadPrec UpdateImagePipelineResponse
$creadPrec :: ReadPrec UpdateImagePipelineResponse
readList :: ReadS [UpdateImagePipelineResponse]
$creadList :: ReadS [UpdateImagePipelineResponse]
readsPrec :: Int -> ReadS UpdateImagePipelineResponse
$creadsPrec :: Int -> ReadS UpdateImagePipelineResponse
Prelude.Read, Int -> UpdateImagePipelineResponse -> ShowS
[UpdateImagePipelineResponse] -> ShowS
UpdateImagePipelineResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateImagePipelineResponse] -> ShowS
$cshowList :: [UpdateImagePipelineResponse] -> ShowS
show :: UpdateImagePipelineResponse -> String
$cshow :: UpdateImagePipelineResponse -> String
showsPrec :: Int -> UpdateImagePipelineResponse -> ShowS
$cshowsPrec :: Int -> UpdateImagePipelineResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateImagePipelineResponse x -> UpdateImagePipelineResponse
forall x.
UpdateImagePipelineResponse -> Rep UpdateImagePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateImagePipelineResponse x -> UpdateImagePipelineResponse
$cfrom :: forall x.
UpdateImagePipelineResponse -> Rep UpdateImagePipelineResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateImagePipelineResponse' 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:
--
-- 'clientToken', 'updateImagePipelineResponse_clientToken' - The idempotency token used to make this request idempotent.
--
-- 'imagePipelineArn', 'updateImagePipelineResponse_imagePipelineArn' - The Amazon Resource Name (ARN) of the image pipeline that was updated by
-- this request.
--
-- 'requestId', 'updateImagePipelineResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'httpStatus', 'updateImagePipelineResponse_httpStatus' - The response's http status code.
newUpdateImagePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateImagePipelineResponse
newUpdateImagePipelineResponse :: Int -> UpdateImagePipelineResponse
newUpdateImagePipelineResponse Int
pHttpStatus_ =
  UpdateImagePipelineResponse'
    { $sel:clientToken:UpdateImagePipelineResponse' :: Maybe Text
clientToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:imagePipelineArn:UpdateImagePipelineResponse' :: Maybe Text
imagePipelineArn = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:UpdateImagePipelineResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateImagePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The idempotency token used to make this request idempotent.
updateImagePipelineResponse_clientToken :: Lens.Lens' UpdateImagePipelineResponse (Prelude.Maybe Prelude.Text)
updateImagePipelineResponse_clientToken :: Lens' UpdateImagePipelineResponse (Maybe Text)
updateImagePipelineResponse_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipelineResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateImagePipelineResponse
s@UpdateImagePipelineResponse' {} Maybe Text
a -> UpdateImagePipelineResponse
s {$sel:clientToken:UpdateImagePipelineResponse' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateImagePipelineResponse)

-- | The Amazon Resource Name (ARN) of the image pipeline that was updated by
-- this request.
updateImagePipelineResponse_imagePipelineArn :: Lens.Lens' UpdateImagePipelineResponse (Prelude.Maybe Prelude.Text)
updateImagePipelineResponse_imagePipelineArn :: Lens' UpdateImagePipelineResponse (Maybe Text)
updateImagePipelineResponse_imagePipelineArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipelineResponse' {Maybe Text
imagePipelineArn :: Maybe Text
$sel:imagePipelineArn:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
imagePipelineArn} -> Maybe Text
imagePipelineArn) (\s :: UpdateImagePipelineResponse
s@UpdateImagePipelineResponse' {} Maybe Text
a -> UpdateImagePipelineResponse
s {$sel:imagePipelineArn:UpdateImagePipelineResponse' :: Maybe Text
imagePipelineArn = Maybe Text
a} :: UpdateImagePipelineResponse)

-- | The request ID that uniquely identifies this request.
updateImagePipelineResponse_requestId :: Lens.Lens' UpdateImagePipelineResponse (Prelude.Maybe Prelude.Text)
updateImagePipelineResponse_requestId :: Lens' UpdateImagePipelineResponse (Maybe Text)
updateImagePipelineResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateImagePipelineResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateImagePipelineResponse
s@UpdateImagePipelineResponse' {} Maybe Text
a -> UpdateImagePipelineResponse
s {$sel:requestId:UpdateImagePipelineResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateImagePipelineResponse)

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

instance Prelude.NFData UpdateImagePipelineResponse where
  rnf :: UpdateImagePipelineResponse -> ()
rnf UpdateImagePipelineResponse' {Int
Maybe Text
httpStatus :: Int
requestId :: Maybe Text
imagePipelineArn :: Maybe Text
clientToken :: Maybe Text
$sel:httpStatus:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Int
$sel:requestId:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
$sel:imagePipelineArn:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
$sel:clientToken:UpdateImagePipelineResponse' :: UpdateImagePipelineResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imagePipelineArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus