{-# 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.DLM.UpdateLifecyclePolicy
-- 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)
--
-- Updates the specified lifecycle policy.
module Amazonka.DLM.UpdateLifecyclePolicy
  ( -- * Creating a Request
    UpdateLifecyclePolicy (..),
    newUpdateLifecyclePolicy,

    -- * Request Lenses
    updateLifecyclePolicy_state,
    updateLifecyclePolicy_policyDetails,
    updateLifecyclePolicy_executionRoleArn,
    updateLifecyclePolicy_description,
    updateLifecyclePolicy_policyId,

    -- * Destructuring the Response
    UpdateLifecyclePolicyResponse (..),
    newUpdateLifecyclePolicyResponse,

    -- * Response Lenses
    updateLifecyclePolicyResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DLM.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

-- | /See:/ 'newUpdateLifecyclePolicy' smart constructor.
data UpdateLifecyclePolicy = UpdateLifecyclePolicy'
  { -- | The desired activation state of the lifecycle policy after creation.
    UpdateLifecyclePolicy -> Maybe SettablePolicyStateValues
state :: Prelude.Maybe SettablePolicyStateValues,
    -- | The configuration of the lifecycle policy. You cannot update the policy
    -- type or the resource type.
    UpdateLifecyclePolicy -> Maybe PolicyDetails
policyDetails :: Prelude.Maybe PolicyDetails,
    -- | The Amazon Resource Name (ARN) of the IAM role used to run the
    -- operations specified by the lifecycle policy.
    UpdateLifecyclePolicy -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | A description of the lifecycle policy.
    UpdateLifecyclePolicy -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the lifecycle policy.
    UpdateLifecyclePolicy -> Text
policyId :: Prelude.Text
  }
  deriving (UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool
(UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool)
-> (UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool)
-> Eq UpdateLifecyclePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool
$c/= :: UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool
== :: UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool
$c== :: UpdateLifecyclePolicy -> UpdateLifecyclePolicy -> Bool
Prelude.Eq, ReadPrec [UpdateLifecyclePolicy]
ReadPrec UpdateLifecyclePolicy
Int -> ReadS UpdateLifecyclePolicy
ReadS [UpdateLifecyclePolicy]
(Int -> ReadS UpdateLifecyclePolicy)
-> ReadS [UpdateLifecyclePolicy]
-> ReadPrec UpdateLifecyclePolicy
-> ReadPrec [UpdateLifecyclePolicy]
-> Read UpdateLifecyclePolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLifecyclePolicy]
$creadListPrec :: ReadPrec [UpdateLifecyclePolicy]
readPrec :: ReadPrec UpdateLifecyclePolicy
$creadPrec :: ReadPrec UpdateLifecyclePolicy
readList :: ReadS [UpdateLifecyclePolicy]
$creadList :: ReadS [UpdateLifecyclePolicy]
readsPrec :: Int -> ReadS UpdateLifecyclePolicy
$creadsPrec :: Int -> ReadS UpdateLifecyclePolicy
Prelude.Read, Int -> UpdateLifecyclePolicy -> ShowS
[UpdateLifecyclePolicy] -> ShowS
UpdateLifecyclePolicy -> String
(Int -> UpdateLifecyclePolicy -> ShowS)
-> (UpdateLifecyclePolicy -> String)
-> ([UpdateLifecyclePolicy] -> ShowS)
-> Show UpdateLifecyclePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLifecyclePolicy] -> ShowS
$cshowList :: [UpdateLifecyclePolicy] -> ShowS
show :: UpdateLifecyclePolicy -> String
$cshow :: UpdateLifecyclePolicy -> String
showsPrec :: Int -> UpdateLifecyclePolicy -> ShowS
$cshowsPrec :: Int -> UpdateLifecyclePolicy -> ShowS
Prelude.Show, (forall x. UpdateLifecyclePolicy -> Rep UpdateLifecyclePolicy x)
-> (forall x. Rep UpdateLifecyclePolicy x -> UpdateLifecyclePolicy)
-> Generic UpdateLifecyclePolicy
forall x. Rep UpdateLifecyclePolicy x -> UpdateLifecyclePolicy
forall x. UpdateLifecyclePolicy -> Rep UpdateLifecyclePolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateLifecyclePolicy x -> UpdateLifecyclePolicy
$cfrom :: forall x. UpdateLifecyclePolicy -> Rep UpdateLifecyclePolicy x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLifecyclePolicy' 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:
--
-- 'state', 'updateLifecyclePolicy_state' - The desired activation state of the lifecycle policy after creation.
--
-- 'policyDetails', 'updateLifecyclePolicy_policyDetails' - The configuration of the lifecycle policy. You cannot update the policy
-- type or the resource type.
--
-- 'executionRoleArn', 'updateLifecyclePolicy_executionRoleArn' - The Amazon Resource Name (ARN) of the IAM role used to run the
-- operations specified by the lifecycle policy.
--
-- 'description', 'updateLifecyclePolicy_description' - A description of the lifecycle policy.
--
-- 'policyId', 'updateLifecyclePolicy_policyId' - The identifier of the lifecycle policy.
newUpdateLifecyclePolicy ::
  -- | 'policyId'
  Prelude.Text ->
  UpdateLifecyclePolicy
newUpdateLifecyclePolicy :: Text -> UpdateLifecyclePolicy
newUpdateLifecyclePolicy Text
pPolicyId_ =
  UpdateLifecyclePolicy' :: Maybe SettablePolicyStateValues
-> Maybe PolicyDetails
-> Maybe Text
-> Maybe Text
-> Text
-> UpdateLifecyclePolicy
UpdateLifecyclePolicy'
    { $sel:state:UpdateLifecyclePolicy' :: Maybe SettablePolicyStateValues
state = Maybe SettablePolicyStateValues
forall a. Maybe a
Prelude.Nothing,
      $sel:policyDetails:UpdateLifecyclePolicy' :: Maybe PolicyDetails
policyDetails = Maybe PolicyDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:UpdateLifecyclePolicy' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateLifecyclePolicy' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policyId:UpdateLifecyclePolicy' :: Text
policyId = Text
pPolicyId_
    }

-- | The desired activation state of the lifecycle policy after creation.
updateLifecyclePolicy_state :: Lens.Lens' UpdateLifecyclePolicy (Prelude.Maybe SettablePolicyStateValues)
updateLifecyclePolicy_state :: (Maybe SettablePolicyStateValues
 -> f (Maybe SettablePolicyStateValues))
-> UpdateLifecyclePolicy -> f UpdateLifecyclePolicy
updateLifecyclePolicy_state = (UpdateLifecyclePolicy -> Maybe SettablePolicyStateValues)
-> (UpdateLifecyclePolicy
    -> Maybe SettablePolicyStateValues -> UpdateLifecyclePolicy)
-> Lens
     UpdateLifecyclePolicy
     UpdateLifecyclePolicy
     (Maybe SettablePolicyStateValues)
     (Maybe SettablePolicyStateValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLifecyclePolicy' {Maybe SettablePolicyStateValues
state :: Maybe SettablePolicyStateValues
$sel:state:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe SettablePolicyStateValues
state} -> Maybe SettablePolicyStateValues
state) (\s :: UpdateLifecyclePolicy
s@UpdateLifecyclePolicy' {} Maybe SettablePolicyStateValues
a -> UpdateLifecyclePolicy
s {$sel:state:UpdateLifecyclePolicy' :: Maybe SettablePolicyStateValues
state = Maybe SettablePolicyStateValues
a} :: UpdateLifecyclePolicy)

-- | The configuration of the lifecycle policy. You cannot update the policy
-- type or the resource type.
updateLifecyclePolicy_policyDetails :: Lens.Lens' UpdateLifecyclePolicy (Prelude.Maybe PolicyDetails)
updateLifecyclePolicy_policyDetails :: (Maybe PolicyDetails -> f (Maybe PolicyDetails))
-> UpdateLifecyclePolicy -> f UpdateLifecyclePolicy
updateLifecyclePolicy_policyDetails = (UpdateLifecyclePolicy -> Maybe PolicyDetails)
-> (UpdateLifecyclePolicy
    -> Maybe PolicyDetails -> UpdateLifecyclePolicy)
-> Lens
     UpdateLifecyclePolicy
     UpdateLifecyclePolicy
     (Maybe PolicyDetails)
     (Maybe PolicyDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLifecyclePolicy' {Maybe PolicyDetails
policyDetails :: Maybe PolicyDetails
$sel:policyDetails:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe PolicyDetails
policyDetails} -> Maybe PolicyDetails
policyDetails) (\s :: UpdateLifecyclePolicy
s@UpdateLifecyclePolicy' {} Maybe PolicyDetails
a -> UpdateLifecyclePolicy
s {$sel:policyDetails:UpdateLifecyclePolicy' :: Maybe PolicyDetails
policyDetails = Maybe PolicyDetails
a} :: UpdateLifecyclePolicy)

-- | The Amazon Resource Name (ARN) of the IAM role used to run the
-- operations specified by the lifecycle policy.
updateLifecyclePolicy_executionRoleArn :: Lens.Lens' UpdateLifecyclePolicy (Prelude.Maybe Prelude.Text)
updateLifecyclePolicy_executionRoleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateLifecyclePolicy -> f UpdateLifecyclePolicy
updateLifecyclePolicy_executionRoleArn = (UpdateLifecyclePolicy -> Maybe Text)
-> (UpdateLifecyclePolicy -> Maybe Text -> UpdateLifecyclePolicy)
-> Lens
     UpdateLifecyclePolicy
     UpdateLifecyclePolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLifecyclePolicy' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: UpdateLifecyclePolicy
s@UpdateLifecyclePolicy' {} Maybe Text
a -> UpdateLifecyclePolicy
s {$sel:executionRoleArn:UpdateLifecyclePolicy' :: Maybe Text
executionRoleArn = Maybe Text
a} :: UpdateLifecyclePolicy)

-- | A description of the lifecycle policy.
updateLifecyclePolicy_description :: Lens.Lens' UpdateLifecyclePolicy (Prelude.Maybe Prelude.Text)
updateLifecyclePolicy_description :: (Maybe Text -> f (Maybe Text))
-> UpdateLifecyclePolicy -> f UpdateLifecyclePolicy
updateLifecyclePolicy_description = (UpdateLifecyclePolicy -> Maybe Text)
-> (UpdateLifecyclePolicy -> Maybe Text -> UpdateLifecyclePolicy)
-> Lens
     UpdateLifecyclePolicy
     UpdateLifecyclePolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLifecyclePolicy' {Maybe Text
description :: Maybe Text
$sel:description:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateLifecyclePolicy
s@UpdateLifecyclePolicy' {} Maybe Text
a -> UpdateLifecyclePolicy
s {$sel:description:UpdateLifecyclePolicy' :: Maybe Text
description = Maybe Text
a} :: UpdateLifecyclePolicy)

-- | The identifier of the lifecycle policy.
updateLifecyclePolicy_policyId :: Lens.Lens' UpdateLifecyclePolicy Prelude.Text
updateLifecyclePolicy_policyId :: (Text -> f Text)
-> UpdateLifecyclePolicy -> f UpdateLifecyclePolicy
updateLifecyclePolicy_policyId = (UpdateLifecyclePolicy -> Text)
-> (UpdateLifecyclePolicy -> Text -> UpdateLifecyclePolicy)
-> Lens UpdateLifecyclePolicy UpdateLifecyclePolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLifecyclePolicy' {Text
policyId :: Text
$sel:policyId:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Text
policyId} -> Text
policyId) (\s :: UpdateLifecyclePolicy
s@UpdateLifecyclePolicy' {} Text
a -> UpdateLifecyclePolicy
s {$sel:policyId:UpdateLifecyclePolicy' :: Text
policyId = Text
a} :: UpdateLifecyclePolicy)

instance Core.AWSRequest UpdateLifecyclePolicy where
  type
    AWSResponse UpdateLifecyclePolicy =
      UpdateLifecyclePolicyResponse
  request :: UpdateLifecyclePolicy -> Request UpdateLifecyclePolicy
request = Service -> UpdateLifecyclePolicy -> Request UpdateLifecyclePolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateLifecyclePolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateLifecyclePolicy)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateLifecyclePolicy))
-> Logger
-> Service
-> Proxy UpdateLifecyclePolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateLifecyclePolicy)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateLifecyclePolicyResponse
UpdateLifecyclePolicyResponse'
            (Int -> UpdateLifecyclePolicyResponse)
-> Either String Int -> Either String UpdateLifecyclePolicyResponse
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))
      )

instance Prelude.Hashable UpdateLifecyclePolicy

instance Prelude.NFData UpdateLifecyclePolicy

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

instance Core.ToJSON UpdateLifecyclePolicy where
  toJSON :: UpdateLifecyclePolicy -> Value
toJSON UpdateLifecyclePolicy' {Maybe Text
Maybe SettablePolicyStateValues
Maybe PolicyDetails
Text
policyId :: Text
description :: Maybe Text
executionRoleArn :: Maybe Text
policyDetails :: Maybe PolicyDetails
state :: Maybe SettablePolicyStateValues
$sel:policyId:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Text
$sel:description:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
$sel:executionRoleArn:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
$sel:policyDetails:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe PolicyDetails
$sel:state:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe SettablePolicyStateValues
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"State" Text -> SettablePolicyStateValues -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SettablePolicyStateValues -> Pair)
-> Maybe SettablePolicyStateValues -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SettablePolicyStateValues
state,
            (Text
"PolicyDetails" Text -> PolicyDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PolicyDetails -> Pair) -> Maybe PolicyDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PolicyDetails
policyDetails,
            (Text
"ExecutionRoleArn" 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
executionRoleArn,
            (Text
"Description" 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
description
          ]
      )

instance Core.ToPath UpdateLifecyclePolicy where
  toPath :: UpdateLifecyclePolicy -> ByteString
toPath UpdateLifecyclePolicy' {Maybe Text
Maybe SettablePolicyStateValues
Maybe PolicyDetails
Text
policyId :: Text
description :: Maybe Text
executionRoleArn :: Maybe Text
policyDetails :: Maybe PolicyDetails
state :: Maybe SettablePolicyStateValues
$sel:policyId:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Text
$sel:description:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
$sel:executionRoleArn:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe Text
$sel:policyDetails:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe PolicyDetails
$sel:state:UpdateLifecyclePolicy' :: UpdateLifecyclePolicy -> Maybe SettablePolicyStateValues
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/policies/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
policyId]

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

-- | /See:/ 'newUpdateLifecyclePolicyResponse' smart constructor.
data UpdateLifecyclePolicyResponse = UpdateLifecyclePolicyResponse'
  { -- | The response's http status code.
    UpdateLifecyclePolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateLifecyclePolicyResponse
-> UpdateLifecyclePolicyResponse -> Bool
(UpdateLifecyclePolicyResponse
 -> UpdateLifecyclePolicyResponse -> Bool)
-> (UpdateLifecyclePolicyResponse
    -> UpdateLifecyclePolicyResponse -> Bool)
-> Eq UpdateLifecyclePolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLifecyclePolicyResponse
-> UpdateLifecyclePolicyResponse -> Bool
$c/= :: UpdateLifecyclePolicyResponse
-> UpdateLifecyclePolicyResponse -> Bool
== :: UpdateLifecyclePolicyResponse
-> UpdateLifecyclePolicyResponse -> Bool
$c== :: UpdateLifecyclePolicyResponse
-> UpdateLifecyclePolicyResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLifecyclePolicyResponse]
ReadPrec UpdateLifecyclePolicyResponse
Int -> ReadS UpdateLifecyclePolicyResponse
ReadS [UpdateLifecyclePolicyResponse]
(Int -> ReadS UpdateLifecyclePolicyResponse)
-> ReadS [UpdateLifecyclePolicyResponse]
-> ReadPrec UpdateLifecyclePolicyResponse
-> ReadPrec [UpdateLifecyclePolicyResponse]
-> Read UpdateLifecyclePolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLifecyclePolicyResponse]
$creadListPrec :: ReadPrec [UpdateLifecyclePolicyResponse]
readPrec :: ReadPrec UpdateLifecyclePolicyResponse
$creadPrec :: ReadPrec UpdateLifecyclePolicyResponse
readList :: ReadS [UpdateLifecyclePolicyResponse]
$creadList :: ReadS [UpdateLifecyclePolicyResponse]
readsPrec :: Int -> ReadS UpdateLifecyclePolicyResponse
$creadsPrec :: Int -> ReadS UpdateLifecyclePolicyResponse
Prelude.Read, Int -> UpdateLifecyclePolicyResponse -> ShowS
[UpdateLifecyclePolicyResponse] -> ShowS
UpdateLifecyclePolicyResponse -> String
(Int -> UpdateLifecyclePolicyResponse -> ShowS)
-> (UpdateLifecyclePolicyResponse -> String)
-> ([UpdateLifecyclePolicyResponse] -> ShowS)
-> Show UpdateLifecyclePolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLifecyclePolicyResponse] -> ShowS
$cshowList :: [UpdateLifecyclePolicyResponse] -> ShowS
show :: UpdateLifecyclePolicyResponse -> String
$cshow :: UpdateLifecyclePolicyResponse -> String
showsPrec :: Int -> UpdateLifecyclePolicyResponse -> ShowS
$cshowsPrec :: Int -> UpdateLifecyclePolicyResponse -> ShowS
Prelude.Show, (forall x.
 UpdateLifecyclePolicyResponse
 -> Rep UpdateLifecyclePolicyResponse x)
-> (forall x.
    Rep UpdateLifecyclePolicyResponse x
    -> UpdateLifecyclePolicyResponse)
-> Generic UpdateLifecyclePolicyResponse
forall x.
Rep UpdateLifecyclePolicyResponse x
-> UpdateLifecyclePolicyResponse
forall x.
UpdateLifecyclePolicyResponse
-> Rep UpdateLifecyclePolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLifecyclePolicyResponse x
-> UpdateLifecyclePolicyResponse
$cfrom :: forall x.
UpdateLifecyclePolicyResponse
-> Rep UpdateLifecyclePolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLifecyclePolicyResponse' 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', 'updateLifecyclePolicyResponse_httpStatus' - The response's http status code.
newUpdateLifecyclePolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateLifecyclePolicyResponse
newUpdateLifecyclePolicyResponse :: Int -> UpdateLifecyclePolicyResponse
newUpdateLifecyclePolicyResponse Int
pHttpStatus_ =
  UpdateLifecyclePolicyResponse' :: Int -> UpdateLifecyclePolicyResponse
UpdateLifecyclePolicyResponse'
    { $sel:httpStatus:UpdateLifecyclePolicyResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData UpdateLifecyclePolicyResponse