{-# 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.Proton.UpdateServicePipeline
-- 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)
--
-- Update the service pipeline.
--
-- There are four modes for updating a service pipeline as described in the
-- following. The @deploymentType@ field defines the mode.
--
-- []
--     @NONE@
--
--     In this mode, a deployment /doesn\'t/ occur. Only the requested
--     metadata parameters are updated.
--
-- []
--     @CURRENT_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     new spec that you provide. Only requested parameters are updated.
--     /Don’t/ include minor or major version parameters when you use this
--     @deployment-type@.
--
-- []
--     @MINOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) minor version of the current major
--     version in use, by default. You can also specify a different minor
--     version of the current major version in use.
--
-- []
--     @MAJOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) major and minor version of the
--     current template by default. You can also specify a different major
--     version that is higher than the major version in use and a minor
--     version (optional).
module Amazonka.Proton.UpdateServicePipeline
  ( -- * Creating a Request
    UpdateServicePipeline (..),
    newUpdateServicePipeline,

    -- * Request Lenses
    updateServicePipeline_templateMinorVersion,
    updateServicePipeline_templateMajorVersion,
    updateServicePipeline_deploymentType,
    updateServicePipeline_serviceName,
    updateServicePipeline_spec,

    -- * Destructuring the Response
    UpdateServicePipelineResponse (..),
    newUpdateServicePipelineResponse,

    -- * Response Lenses
    updateServicePipelineResponse_httpStatus,
    updateServicePipelineResponse_pipeline,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateServicePipeline' smart constructor.
data UpdateServicePipeline = UpdateServicePipeline'
  { -- | The minor version of the service template that was used to create the
    -- service that the pipeline is associated with.
    UpdateServicePipeline -> Maybe Text
templateMinorVersion :: Prelude.Maybe Prelude.Text,
    -- | The major version of the service template that was used to create the
    -- service that the pipeline is associated with.
    UpdateServicePipeline -> Maybe Text
templateMajorVersion :: Prelude.Maybe Prelude.Text,
    -- | The deployment type.
    --
    -- There are four modes for updating a service pipeline as described in the
    -- following. The @deploymentType@ field defines the mode.
    --
    -- []
    --     @NONE@
    --
    --     In this mode, a deployment /doesn\'t/ occur. Only the requested
    --     metadata parameters are updated.
    --
    -- []
    --     @CURRENT_VERSION@
    --
    --     In this mode, the service pipeline is deployed and updated with the
    --     new spec that you provide. Only requested parameters are updated.
    --     /Don’t/ include minor or major version parameters when you use this
    --     @deployment-type@.
    --
    -- []
    --     @MINOR_VERSION@
    --
    --     In this mode, the service pipeline is deployed and updated with the
    --     published, recommended (latest) minor version of the current major
    --     version in use, by default. You can also specify a different minor
    --     version of the current major version in use.
    --
    -- []
    --     @MAJOR_VERSION@
    --
    --     In this mode, the service pipeline is deployed and updated with the
    --     published, recommended (latest) major and minor version of the
    --     current template, by default. You can also specify a different major
    --     version that is higher than the major version in use and a minor
    --     version (optional).
    UpdateServicePipeline -> DeploymentUpdateType
deploymentType :: DeploymentUpdateType,
    -- | The name of the service to that the pipeline is associated with.
    UpdateServicePipeline -> Text
serviceName :: Prelude.Text,
    -- | The spec for the service pipeline to update.
    UpdateServicePipeline -> Sensitive Text
spec :: Core.Sensitive Prelude.Text
  }
  deriving (UpdateServicePipeline -> UpdateServicePipeline -> Bool
(UpdateServicePipeline -> UpdateServicePipeline -> Bool)
-> (UpdateServicePipeline -> UpdateServicePipeline -> Bool)
-> Eq UpdateServicePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServicePipeline -> UpdateServicePipeline -> Bool
$c/= :: UpdateServicePipeline -> UpdateServicePipeline -> Bool
== :: UpdateServicePipeline -> UpdateServicePipeline -> Bool
$c== :: UpdateServicePipeline -> UpdateServicePipeline -> Bool
Prelude.Eq, Int -> UpdateServicePipeline -> ShowS
[UpdateServicePipeline] -> ShowS
UpdateServicePipeline -> String
(Int -> UpdateServicePipeline -> ShowS)
-> (UpdateServicePipeline -> String)
-> ([UpdateServicePipeline] -> ShowS)
-> Show UpdateServicePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServicePipeline] -> ShowS
$cshowList :: [UpdateServicePipeline] -> ShowS
show :: UpdateServicePipeline -> String
$cshow :: UpdateServicePipeline -> String
showsPrec :: Int -> UpdateServicePipeline -> ShowS
$cshowsPrec :: Int -> UpdateServicePipeline -> ShowS
Prelude.Show, (forall x. UpdateServicePipeline -> Rep UpdateServicePipeline x)
-> (forall x. Rep UpdateServicePipeline x -> UpdateServicePipeline)
-> Generic UpdateServicePipeline
forall x. Rep UpdateServicePipeline x -> UpdateServicePipeline
forall x. UpdateServicePipeline -> Rep UpdateServicePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServicePipeline x -> UpdateServicePipeline
$cfrom :: forall x. UpdateServicePipeline -> Rep UpdateServicePipeline x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServicePipeline' 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:
--
-- 'templateMinorVersion', 'updateServicePipeline_templateMinorVersion' - The minor version of the service template that was used to create the
-- service that the pipeline is associated with.
--
-- 'templateMajorVersion', 'updateServicePipeline_templateMajorVersion' - The major version of the service template that was used to create the
-- service that the pipeline is associated with.
--
-- 'deploymentType', 'updateServicePipeline_deploymentType' - The deployment type.
--
-- There are four modes for updating a service pipeline as described in the
-- following. The @deploymentType@ field defines the mode.
--
-- []
--     @NONE@
--
--     In this mode, a deployment /doesn\'t/ occur. Only the requested
--     metadata parameters are updated.
--
-- []
--     @CURRENT_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     new spec that you provide. Only requested parameters are updated.
--     /Don’t/ include minor or major version parameters when you use this
--     @deployment-type@.
--
-- []
--     @MINOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) minor version of the current major
--     version in use, by default. You can also specify a different minor
--     version of the current major version in use.
--
-- []
--     @MAJOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) major and minor version of the
--     current template, by default. You can also specify a different major
--     version that is higher than the major version in use and a minor
--     version (optional).
--
-- 'serviceName', 'updateServicePipeline_serviceName' - The name of the service to that the pipeline is associated with.
--
-- 'spec', 'updateServicePipeline_spec' - The spec for the service pipeline to update.
newUpdateServicePipeline ::
  -- | 'deploymentType'
  DeploymentUpdateType ->
  -- | 'serviceName'
  Prelude.Text ->
  -- | 'spec'
  Prelude.Text ->
  UpdateServicePipeline
newUpdateServicePipeline :: DeploymentUpdateType -> Text -> Text -> UpdateServicePipeline
newUpdateServicePipeline
  DeploymentUpdateType
pDeploymentType_
  Text
pServiceName_
  Text
pSpec_ =
    UpdateServicePipeline' :: Maybe Text
-> Maybe Text
-> DeploymentUpdateType
-> Text
-> Sensitive Text
-> UpdateServicePipeline
UpdateServicePipeline'
      { $sel:templateMinorVersion:UpdateServicePipeline' :: Maybe Text
templateMinorVersion =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:templateMajorVersion:UpdateServicePipeline' :: Maybe Text
templateMajorVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:deploymentType:UpdateServicePipeline' :: DeploymentUpdateType
deploymentType = DeploymentUpdateType
pDeploymentType_,
        $sel:serviceName:UpdateServicePipeline' :: Text
serviceName = Text
pServiceName_,
        $sel:spec:UpdateServicePipeline' :: Sensitive Text
spec = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pSpec_
      }

-- | The minor version of the service template that was used to create the
-- service that the pipeline is associated with.
updateServicePipeline_templateMinorVersion :: Lens.Lens' UpdateServicePipeline (Prelude.Maybe Prelude.Text)
updateServicePipeline_templateMinorVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateServicePipeline -> f UpdateServicePipeline
updateServicePipeline_templateMinorVersion = (UpdateServicePipeline -> Maybe Text)
-> (UpdateServicePipeline -> Maybe Text -> UpdateServicePipeline)
-> Lens
     UpdateServicePipeline
     UpdateServicePipeline
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipeline' {Maybe Text
templateMinorVersion :: Maybe Text
$sel:templateMinorVersion:UpdateServicePipeline' :: UpdateServicePipeline -> Maybe Text
templateMinorVersion} -> Maybe Text
templateMinorVersion) (\s :: UpdateServicePipeline
s@UpdateServicePipeline' {} Maybe Text
a -> UpdateServicePipeline
s {$sel:templateMinorVersion:UpdateServicePipeline' :: Maybe Text
templateMinorVersion = Maybe Text
a} :: UpdateServicePipeline)

-- | The major version of the service template that was used to create the
-- service that the pipeline is associated with.
updateServicePipeline_templateMajorVersion :: Lens.Lens' UpdateServicePipeline (Prelude.Maybe Prelude.Text)
updateServicePipeline_templateMajorVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateServicePipeline -> f UpdateServicePipeline
updateServicePipeline_templateMajorVersion = (UpdateServicePipeline -> Maybe Text)
-> (UpdateServicePipeline -> Maybe Text -> UpdateServicePipeline)
-> Lens
     UpdateServicePipeline
     UpdateServicePipeline
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipeline' {Maybe Text
templateMajorVersion :: Maybe Text
$sel:templateMajorVersion:UpdateServicePipeline' :: UpdateServicePipeline -> Maybe Text
templateMajorVersion} -> Maybe Text
templateMajorVersion) (\s :: UpdateServicePipeline
s@UpdateServicePipeline' {} Maybe Text
a -> UpdateServicePipeline
s {$sel:templateMajorVersion:UpdateServicePipeline' :: Maybe Text
templateMajorVersion = Maybe Text
a} :: UpdateServicePipeline)

-- | The deployment type.
--
-- There are four modes for updating a service pipeline as described in the
-- following. The @deploymentType@ field defines the mode.
--
-- []
--     @NONE@
--
--     In this mode, a deployment /doesn\'t/ occur. Only the requested
--     metadata parameters are updated.
--
-- []
--     @CURRENT_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     new spec that you provide. Only requested parameters are updated.
--     /Don’t/ include minor or major version parameters when you use this
--     @deployment-type@.
--
-- []
--     @MINOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) minor version of the current major
--     version in use, by default. You can also specify a different minor
--     version of the current major version in use.
--
-- []
--     @MAJOR_VERSION@
--
--     In this mode, the service pipeline is deployed and updated with the
--     published, recommended (latest) major and minor version of the
--     current template, by default. You can also specify a different major
--     version that is higher than the major version in use and a minor
--     version (optional).
updateServicePipeline_deploymentType :: Lens.Lens' UpdateServicePipeline DeploymentUpdateType
updateServicePipeline_deploymentType :: (DeploymentUpdateType -> f DeploymentUpdateType)
-> UpdateServicePipeline -> f UpdateServicePipeline
updateServicePipeline_deploymentType = (UpdateServicePipeline -> DeploymentUpdateType)
-> (UpdateServicePipeline
    -> DeploymentUpdateType -> UpdateServicePipeline)
-> Lens
     UpdateServicePipeline
     UpdateServicePipeline
     DeploymentUpdateType
     DeploymentUpdateType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipeline' {DeploymentUpdateType
deploymentType :: DeploymentUpdateType
$sel:deploymentType:UpdateServicePipeline' :: UpdateServicePipeline -> DeploymentUpdateType
deploymentType} -> DeploymentUpdateType
deploymentType) (\s :: UpdateServicePipeline
s@UpdateServicePipeline' {} DeploymentUpdateType
a -> UpdateServicePipeline
s {$sel:deploymentType:UpdateServicePipeline' :: DeploymentUpdateType
deploymentType = DeploymentUpdateType
a} :: UpdateServicePipeline)

-- | The name of the service to that the pipeline is associated with.
updateServicePipeline_serviceName :: Lens.Lens' UpdateServicePipeline Prelude.Text
updateServicePipeline_serviceName :: (Text -> f Text)
-> UpdateServicePipeline -> f UpdateServicePipeline
updateServicePipeline_serviceName = (UpdateServicePipeline -> Text)
-> (UpdateServicePipeline -> Text -> UpdateServicePipeline)
-> Lens UpdateServicePipeline UpdateServicePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipeline' {Text
serviceName :: Text
$sel:serviceName:UpdateServicePipeline' :: UpdateServicePipeline -> Text
serviceName} -> Text
serviceName) (\s :: UpdateServicePipeline
s@UpdateServicePipeline' {} Text
a -> UpdateServicePipeline
s {$sel:serviceName:UpdateServicePipeline' :: Text
serviceName = Text
a} :: UpdateServicePipeline)

-- | The spec for the service pipeline to update.
updateServicePipeline_spec :: Lens.Lens' UpdateServicePipeline Prelude.Text
updateServicePipeline_spec :: (Text -> f Text)
-> UpdateServicePipeline -> f UpdateServicePipeline
updateServicePipeline_spec = (UpdateServicePipeline -> Sensitive Text)
-> (UpdateServicePipeline
    -> Sensitive Text -> UpdateServicePipeline)
-> Lens
     UpdateServicePipeline
     UpdateServicePipeline
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipeline' {Sensitive Text
spec :: Sensitive Text
$sel:spec:UpdateServicePipeline' :: UpdateServicePipeline -> Sensitive Text
spec} -> Sensitive Text
spec) (\s :: UpdateServicePipeline
s@UpdateServicePipeline' {} Sensitive Text
a -> UpdateServicePipeline
s {$sel:spec:UpdateServicePipeline' :: Sensitive Text
spec = Sensitive Text
a} :: UpdateServicePipeline) ((Sensitive Text -> f (Sensitive Text))
 -> UpdateServicePipeline -> f UpdateServicePipeline)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> UpdateServicePipeline
-> f UpdateServicePipeline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

instance Core.AWSRequest UpdateServicePipeline where
  type
    AWSResponse UpdateServicePipeline =
      UpdateServicePipelineResponse
  request :: UpdateServicePipeline -> Request UpdateServicePipeline
request = Service -> UpdateServicePipeline -> Request UpdateServicePipeline
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateServicePipeline
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServicePipeline)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateServicePipeline))
-> Logger
-> Service
-> Proxy UpdateServicePipeline
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateServicePipeline)))
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 ->
          Int -> ServicePipeline -> UpdateServicePipelineResponse
UpdateServicePipelineResponse'
            (Int -> ServicePipeline -> UpdateServicePipelineResponse)
-> Either String Int
-> Either String (ServicePipeline -> UpdateServicePipelineResponse)
forall (f :: * -> *) a b. Functor 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))
            Either String (ServicePipeline -> UpdateServicePipelineResponse)
-> Either String ServicePipeline
-> Either String UpdateServicePipelineResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ServicePipeline
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"pipeline")
      )

instance Prelude.Hashable UpdateServicePipeline

instance Prelude.NFData UpdateServicePipeline

instance Core.ToHeaders UpdateServicePipeline where
  toHeaders :: UpdateServicePipeline -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateServicePipeline -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AwsProton20200720.UpdateServicePipeline" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateServicePipeline where
  toJSON :: UpdateServicePipeline -> Value
toJSON UpdateServicePipeline' {Maybe Text
Text
Sensitive Text
DeploymentUpdateType
spec :: Sensitive Text
serviceName :: Text
deploymentType :: DeploymentUpdateType
templateMajorVersion :: Maybe Text
templateMinorVersion :: Maybe Text
$sel:spec:UpdateServicePipeline' :: UpdateServicePipeline -> Sensitive Text
$sel:serviceName:UpdateServicePipeline' :: UpdateServicePipeline -> Text
$sel:deploymentType:UpdateServicePipeline' :: UpdateServicePipeline -> DeploymentUpdateType
$sel:templateMajorVersion:UpdateServicePipeline' :: UpdateServicePipeline -> Maybe Text
$sel:templateMinorVersion:UpdateServicePipeline' :: UpdateServicePipeline -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"templateMinorVersion" 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
templateMinorVersion,
            (Text
"templateMajorVersion" 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
templateMajorVersion,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"deploymentType" Text -> DeploymentUpdateType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DeploymentUpdateType
deploymentType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"serviceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"spec" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
spec)
          ]
      )

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

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

-- | /See:/ 'newUpdateServicePipelineResponse' smart constructor.
data UpdateServicePipelineResponse = UpdateServicePipelineResponse'
  { -- | The response's http status code.
    UpdateServicePipelineResponse -> Int
httpStatus :: Prelude.Int,
    -- | The pipeline details returned by AWS Proton.
    UpdateServicePipelineResponse -> ServicePipeline
pipeline :: ServicePipeline
  }
  deriving (UpdateServicePipelineResponse
-> UpdateServicePipelineResponse -> Bool
(UpdateServicePipelineResponse
 -> UpdateServicePipelineResponse -> Bool)
-> (UpdateServicePipelineResponse
    -> UpdateServicePipelineResponse -> Bool)
-> Eq UpdateServicePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServicePipelineResponse
-> UpdateServicePipelineResponse -> Bool
$c/= :: UpdateServicePipelineResponse
-> UpdateServicePipelineResponse -> Bool
== :: UpdateServicePipelineResponse
-> UpdateServicePipelineResponse -> Bool
$c== :: UpdateServicePipelineResponse
-> UpdateServicePipelineResponse -> Bool
Prelude.Eq, Int -> UpdateServicePipelineResponse -> ShowS
[UpdateServicePipelineResponse] -> ShowS
UpdateServicePipelineResponse -> String
(Int -> UpdateServicePipelineResponse -> ShowS)
-> (UpdateServicePipelineResponse -> String)
-> ([UpdateServicePipelineResponse] -> ShowS)
-> Show UpdateServicePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServicePipelineResponse] -> ShowS
$cshowList :: [UpdateServicePipelineResponse] -> ShowS
show :: UpdateServicePipelineResponse -> String
$cshow :: UpdateServicePipelineResponse -> String
showsPrec :: Int -> UpdateServicePipelineResponse -> ShowS
$cshowsPrec :: Int -> UpdateServicePipelineResponse -> ShowS
Prelude.Show, (forall x.
 UpdateServicePipelineResponse
 -> Rep UpdateServicePipelineResponse x)
-> (forall x.
    Rep UpdateServicePipelineResponse x
    -> UpdateServicePipelineResponse)
-> Generic UpdateServicePipelineResponse
forall x.
Rep UpdateServicePipelineResponse x
-> UpdateServicePipelineResponse
forall x.
UpdateServicePipelineResponse
-> Rep UpdateServicePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateServicePipelineResponse x
-> UpdateServicePipelineResponse
$cfrom :: forall x.
UpdateServicePipelineResponse
-> Rep UpdateServicePipelineResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServicePipelineResponse' 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:
--
-- 'httpStatus', 'updateServicePipelineResponse_httpStatus' - The response's http status code.
--
-- 'pipeline', 'updateServicePipelineResponse_pipeline' - The pipeline details returned by AWS Proton.
newUpdateServicePipelineResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'pipeline'
  ServicePipeline ->
  UpdateServicePipelineResponse
newUpdateServicePipelineResponse :: Int -> ServicePipeline -> UpdateServicePipelineResponse
newUpdateServicePipelineResponse
  Int
pHttpStatus_
  ServicePipeline
pPipeline_ =
    UpdateServicePipelineResponse' :: Int -> ServicePipeline -> UpdateServicePipelineResponse
UpdateServicePipelineResponse'
      { $sel:httpStatus:UpdateServicePipelineResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:pipeline:UpdateServicePipelineResponse' :: ServicePipeline
pipeline = ServicePipeline
pPipeline_
      }

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

-- | The pipeline details returned by AWS Proton.
updateServicePipelineResponse_pipeline :: Lens.Lens' UpdateServicePipelineResponse ServicePipeline
updateServicePipelineResponse_pipeline :: (ServicePipeline -> f ServicePipeline)
-> UpdateServicePipelineResponse -> f UpdateServicePipelineResponse
updateServicePipelineResponse_pipeline = (UpdateServicePipelineResponse -> ServicePipeline)
-> (UpdateServicePipelineResponse
    -> ServicePipeline -> UpdateServicePipelineResponse)
-> Lens
     UpdateServicePipelineResponse
     UpdateServicePipelineResponse
     ServicePipeline
     ServicePipeline
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServicePipelineResponse' {ServicePipeline
pipeline :: ServicePipeline
$sel:pipeline:UpdateServicePipelineResponse' :: UpdateServicePipelineResponse -> ServicePipeline
pipeline} -> ServicePipeline
pipeline) (\s :: UpdateServicePipelineResponse
s@UpdateServicePipelineResponse' {} ServicePipeline
a -> UpdateServicePipelineResponse
s {$sel:pipeline:UpdateServicePipelineResponse' :: ServicePipeline
pipeline = ServicePipeline
a} :: UpdateServicePipelineResponse)

instance Prelude.NFData UpdateServicePipelineResponse