{-# 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.CloudFront.UpdateDistribution
-- 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 configuration for a web distribution.
--
-- When you update a distribution, there are more required fields than when
-- you create a distribution. When you update your distribution by using
-- this API action, follow the steps here to get the current configuration
-- and then make your updates, to make sure that you include all of the
-- required fields. To view a summary, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html Required Fields for Create Distribution and Update Distribution>
-- in the /Amazon CloudFront Developer Guide/.
--
-- The update process includes getting the current distribution
-- configuration, updating the XML document that is returned to make your
-- changes, and then submitting an @UpdateDistribution@ request to make the
-- updates.
--
-- For information about updating a distribution using the CloudFront
-- console instead, see
-- <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html Creating a Distribution>
-- in the /Amazon CloudFront Developer Guide/.
--
-- __To update a web distribution using the CloudFront API__
--
-- 1.  Submit a
--     <https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistributionConfig.html GetDistributionConfig>
--     request to get the current configuration and an @Etag@ header for
--     the distribution.
--
--     If you update the distribution again, you must get a new @Etag@
--     header.
--
-- 2.  Update the XML document that was returned in the response to your
--     @GetDistributionConfig@ request to include your changes.
--
--     When you edit the XML file, be aware of the following:
--
--     -   You must strip out the ETag parameter that is returned.
--
--     -   Additional fields are required when you update a distribution.
--         There may be fields included in the XML file for features that
--         you haven\'t configured for your distribution. This is expected
--         and required to successfully update the distribution.
--
--     -   You can\'t change the value of @CallerReference@. If you try to
--         change this value, CloudFront returns an @IllegalUpdate@ error.
--
--     -   The new configuration replaces the existing configuration; the
--         values that you specify in an @UpdateDistribution@ request are
--         not merged into your existing configuration. When you add,
--         delete, or replace values in an element that allows multiple
--         values (for example, @CNAME@), you must specify all of the
--         values that you want to appear in the updated distribution. In
--         addition, you must update the corresponding @Quantity@ element.
--
-- 3.  Submit an @UpdateDistribution@ request to update the configuration
--     for your distribution:
--
--     -   In the request body, include the XML document that you updated
--         in Step 2. The request body must include an XML document with a
--         @DistributionConfig@ element.
--
--     -   Set the value of the HTTP @If-Match@ header to the value of the
--         @ETag@ header that CloudFront returned when you submitted the
--         @GetDistributionConfig@ request in Step 1.
--
-- 4.  Review the response to the @UpdateDistribution@ request to confirm
--     that the configuration was successfully updated.
--
-- 5.  Optional: Submit a
--     <https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html GetDistribution>
--     request to confirm that your changes have propagated. When
--     propagation is complete, the value of @Status@ is @Deployed@.
module Amazonka.CloudFront.UpdateDistribution
  ( -- * Creating a Request
    UpdateDistribution (..),
    newUpdateDistribution,

    -- * Request Lenses
    updateDistribution_ifMatch,
    updateDistribution_distributionConfig,
    updateDistribution_id,

    -- * Destructuring the Response
    UpdateDistributionResponse (..),
    newUpdateDistributionResponse,

    -- * Response Lenses
    updateDistributionResponse_eTag,
    updateDistributionResponse_distribution,
    updateDistributionResponse_httpStatus,
  )
where

import Amazonka.CloudFront.Types
import qualified Amazonka.Core as Core
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 request to update a distribution.
--
-- /See:/ 'newUpdateDistribution' smart constructor.
data UpdateDistribution = UpdateDistribution'
  { -- | The value of the @ETag@ header that you received when retrieving the
    -- distribution\'s configuration. For example: @E2QWRUHAPOMQZL@.
    UpdateDistribution -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | The distribution\'s configuration information.
    UpdateDistribution -> DistributionConfig
distributionConfig :: DistributionConfig,
    -- | The distribution\'s id.
    UpdateDistribution -> Text
id :: Prelude.Text
  }
  deriving (UpdateDistribution -> UpdateDistribution -> Bool
(UpdateDistribution -> UpdateDistribution -> Bool)
-> (UpdateDistribution -> UpdateDistribution -> Bool)
-> Eq UpdateDistribution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDistribution -> UpdateDistribution -> Bool
$c/= :: UpdateDistribution -> UpdateDistribution -> Bool
== :: UpdateDistribution -> UpdateDistribution -> Bool
$c== :: UpdateDistribution -> UpdateDistribution -> Bool
Prelude.Eq, Int -> UpdateDistribution -> ShowS
[UpdateDistribution] -> ShowS
UpdateDistribution -> String
(Int -> UpdateDistribution -> ShowS)
-> (UpdateDistribution -> String)
-> ([UpdateDistribution] -> ShowS)
-> Show UpdateDistribution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDistribution] -> ShowS
$cshowList :: [UpdateDistribution] -> ShowS
show :: UpdateDistribution -> String
$cshow :: UpdateDistribution -> String
showsPrec :: Int -> UpdateDistribution -> ShowS
$cshowsPrec :: Int -> UpdateDistribution -> ShowS
Prelude.Show, (forall x. UpdateDistribution -> Rep UpdateDistribution x)
-> (forall x. Rep UpdateDistribution x -> UpdateDistribution)
-> Generic UpdateDistribution
forall x. Rep UpdateDistribution x -> UpdateDistribution
forall x. UpdateDistribution -> Rep UpdateDistribution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDistribution x -> UpdateDistribution
$cfrom :: forall x. UpdateDistribution -> Rep UpdateDistribution x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDistribution' 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:
--
-- 'ifMatch', 'updateDistribution_ifMatch' - The value of the @ETag@ header that you received when retrieving the
-- distribution\'s configuration. For example: @E2QWRUHAPOMQZL@.
--
-- 'distributionConfig', 'updateDistribution_distributionConfig' - The distribution\'s configuration information.
--
-- 'id', 'updateDistribution_id' - The distribution\'s id.
newUpdateDistribution ::
  -- | 'distributionConfig'
  DistributionConfig ->
  -- | 'id'
  Prelude.Text ->
  UpdateDistribution
newUpdateDistribution :: DistributionConfig -> Text -> UpdateDistribution
newUpdateDistribution DistributionConfig
pDistributionConfig_ Text
pId_ =
  UpdateDistribution' :: Maybe Text -> DistributionConfig -> Text -> UpdateDistribution
UpdateDistribution'
    { $sel:ifMatch:UpdateDistribution' :: Maybe Text
ifMatch = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distributionConfig:UpdateDistribution' :: DistributionConfig
distributionConfig = DistributionConfig
pDistributionConfig_,
      $sel:id:UpdateDistribution' :: Text
id = Text
pId_
    }

-- | The value of the @ETag@ header that you received when retrieving the
-- distribution\'s configuration. For example: @E2QWRUHAPOMQZL@.
updateDistribution_ifMatch :: Lens.Lens' UpdateDistribution (Prelude.Maybe Prelude.Text)
updateDistribution_ifMatch :: (Maybe Text -> f (Maybe Text))
-> UpdateDistribution -> f UpdateDistribution
updateDistribution_ifMatch = (UpdateDistribution -> Maybe Text)
-> (UpdateDistribution -> Maybe Text -> UpdateDistribution)
-> Lens
     UpdateDistribution UpdateDistribution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistribution' {Maybe Text
ifMatch :: Maybe Text
$sel:ifMatch:UpdateDistribution' :: UpdateDistribution -> Maybe Text
ifMatch} -> Maybe Text
ifMatch) (\s :: UpdateDistribution
s@UpdateDistribution' {} Maybe Text
a -> UpdateDistribution
s {$sel:ifMatch:UpdateDistribution' :: Maybe Text
ifMatch = Maybe Text
a} :: UpdateDistribution)

-- | The distribution\'s configuration information.
updateDistribution_distributionConfig :: Lens.Lens' UpdateDistribution DistributionConfig
updateDistribution_distributionConfig :: (DistributionConfig -> f DistributionConfig)
-> UpdateDistribution -> f UpdateDistribution
updateDistribution_distributionConfig = (UpdateDistribution -> DistributionConfig)
-> (UpdateDistribution -> DistributionConfig -> UpdateDistribution)
-> Lens
     UpdateDistribution
     UpdateDistribution
     DistributionConfig
     DistributionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistribution' {DistributionConfig
distributionConfig :: DistributionConfig
$sel:distributionConfig:UpdateDistribution' :: UpdateDistribution -> DistributionConfig
distributionConfig} -> DistributionConfig
distributionConfig) (\s :: UpdateDistribution
s@UpdateDistribution' {} DistributionConfig
a -> UpdateDistribution
s {$sel:distributionConfig:UpdateDistribution' :: DistributionConfig
distributionConfig = DistributionConfig
a} :: UpdateDistribution)

-- | The distribution\'s id.
updateDistribution_id :: Lens.Lens' UpdateDistribution Prelude.Text
updateDistribution_id :: (Text -> f Text) -> UpdateDistribution -> f UpdateDistribution
updateDistribution_id = (UpdateDistribution -> Text)
-> (UpdateDistribution -> Text -> UpdateDistribution)
-> Lens UpdateDistribution UpdateDistribution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistribution' {Text
id :: Text
$sel:id:UpdateDistribution' :: UpdateDistribution -> Text
id} -> Text
id) (\s :: UpdateDistribution
s@UpdateDistribution' {} Text
a -> UpdateDistribution
s {$sel:id:UpdateDistribution' :: Text
id = Text
a} :: UpdateDistribution)

instance Core.AWSRequest UpdateDistribution where
  type
    AWSResponse UpdateDistribution =
      UpdateDistributionResponse
  request :: UpdateDistribution -> Request UpdateDistribution
request = Service -> UpdateDistribution -> Request UpdateDistribution
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDistribution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDistribution)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse UpdateDistribution))
-> Logger
-> Service
-> Proxy UpdateDistribution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDistribution)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Distribution -> Int -> UpdateDistributionResponse
UpdateDistributionResponse'
            (Maybe Text
 -> Maybe Distribution -> Int -> UpdateDistributionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Distribution -> Int -> UpdateDistributionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"ETag")
            Either
  String (Maybe Distribution -> Int -> UpdateDistributionResponse)
-> Either String (Maybe Distribution)
-> Either String (Int -> UpdateDistributionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node] -> Either String (Maybe Distribution)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> UpdateDistributionResponse)
-> Either String Int -> Either String UpdateDistributionResponse
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 UpdateDistribution

instance Prelude.NFData UpdateDistribution

instance Core.ToElement UpdateDistribution where
  toElement :: UpdateDistribution -> Element
toElement UpdateDistribution' {Maybe Text
Text
DistributionConfig
id :: Text
distributionConfig :: DistributionConfig
ifMatch :: Maybe Text
$sel:id:UpdateDistribution' :: UpdateDistribution -> Text
$sel:distributionConfig:UpdateDistribution' :: UpdateDistribution -> DistributionConfig
$sel:ifMatch:UpdateDistribution' :: UpdateDistribution -> Maybe Text
..} =
    Name -> DistributionConfig -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{http://cloudfront.amazonaws.com/doc/2020-05-31/}DistributionConfig"
      DistributionConfig
distributionConfig

instance Core.ToHeaders UpdateDistribution where
  toHeaders :: UpdateDistribution -> ResponseHeaders
toHeaders UpdateDistribution' {Maybe Text
Text
DistributionConfig
id :: Text
distributionConfig :: DistributionConfig
ifMatch :: Maybe Text
$sel:id:UpdateDistribution' :: UpdateDistribution -> Text
$sel:distributionConfig:UpdateDistribution' :: UpdateDistribution -> DistributionConfig
$sel:ifMatch:UpdateDistribution' :: UpdateDistribution -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat [HeaderName
"If-Match" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
ifMatch]

instance Core.ToPath UpdateDistribution where
  toPath :: UpdateDistribution -> ByteString
toPath UpdateDistribution' {Maybe Text
Text
DistributionConfig
id :: Text
distributionConfig :: DistributionConfig
ifMatch :: Maybe Text
$sel:id:UpdateDistribution' :: UpdateDistribution -> Text
$sel:distributionConfig:UpdateDistribution' :: UpdateDistribution -> DistributionConfig
$sel:ifMatch:UpdateDistribution' :: UpdateDistribution -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-05-31/distribution/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id,
        ByteString
"/config"
      ]

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

-- | The returned result of the corresponding request.
--
-- /See:/ 'newUpdateDistributionResponse' smart constructor.
data UpdateDistributionResponse = UpdateDistributionResponse'
  { -- | The current version of the configuration. For example: @E2QWRUHAPOMQZL@.
    UpdateDistributionResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | The distribution\'s information.
    UpdateDistributionResponse -> Maybe Distribution
distribution :: Prelude.Maybe Distribution,
    -- | The response's http status code.
    UpdateDistributionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDistributionResponse -> UpdateDistributionResponse -> Bool
(UpdateDistributionResponse -> UpdateDistributionResponse -> Bool)
-> (UpdateDistributionResponse
    -> UpdateDistributionResponse -> Bool)
-> Eq UpdateDistributionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDistributionResponse -> UpdateDistributionResponse -> Bool
$c/= :: UpdateDistributionResponse -> UpdateDistributionResponse -> Bool
== :: UpdateDistributionResponse -> UpdateDistributionResponse -> Bool
$c== :: UpdateDistributionResponse -> UpdateDistributionResponse -> Bool
Prelude.Eq, Int -> UpdateDistributionResponse -> ShowS
[UpdateDistributionResponse] -> ShowS
UpdateDistributionResponse -> String
(Int -> UpdateDistributionResponse -> ShowS)
-> (UpdateDistributionResponse -> String)
-> ([UpdateDistributionResponse] -> ShowS)
-> Show UpdateDistributionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDistributionResponse] -> ShowS
$cshowList :: [UpdateDistributionResponse] -> ShowS
show :: UpdateDistributionResponse -> String
$cshow :: UpdateDistributionResponse -> String
showsPrec :: Int -> UpdateDistributionResponse -> ShowS
$cshowsPrec :: Int -> UpdateDistributionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDistributionResponse -> Rep UpdateDistributionResponse x)
-> (forall x.
    Rep UpdateDistributionResponse x -> UpdateDistributionResponse)
-> Generic UpdateDistributionResponse
forall x.
Rep UpdateDistributionResponse x -> UpdateDistributionResponse
forall x.
UpdateDistributionResponse -> Rep UpdateDistributionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDistributionResponse x -> UpdateDistributionResponse
$cfrom :: forall x.
UpdateDistributionResponse -> Rep UpdateDistributionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDistributionResponse' 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:
--
-- 'eTag', 'updateDistributionResponse_eTag' - The current version of the configuration. For example: @E2QWRUHAPOMQZL@.
--
-- 'distribution', 'updateDistributionResponse_distribution' - The distribution\'s information.
--
-- 'httpStatus', 'updateDistributionResponse_httpStatus' - The response's http status code.
newUpdateDistributionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDistributionResponse
newUpdateDistributionResponse :: Int -> UpdateDistributionResponse
newUpdateDistributionResponse Int
pHttpStatus_ =
  UpdateDistributionResponse' :: Maybe Text
-> Maybe Distribution -> Int -> UpdateDistributionResponse
UpdateDistributionResponse'
    { $sel:eTag:UpdateDistributionResponse' :: Maybe Text
eTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:distribution:UpdateDistributionResponse' :: Maybe Distribution
distribution = Maybe Distribution
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDistributionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current version of the configuration. For example: @E2QWRUHAPOMQZL@.
updateDistributionResponse_eTag :: Lens.Lens' UpdateDistributionResponse (Prelude.Maybe Prelude.Text)
updateDistributionResponse_eTag :: (Maybe Text -> f (Maybe Text))
-> UpdateDistributionResponse -> f UpdateDistributionResponse
updateDistributionResponse_eTag = (UpdateDistributionResponse -> Maybe Text)
-> (UpdateDistributionResponse
    -> Maybe Text -> UpdateDistributionResponse)
-> Lens
     UpdateDistributionResponse
     UpdateDistributionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionResponse' {Maybe Text
eTag :: Maybe Text
$sel:eTag:UpdateDistributionResponse' :: UpdateDistributionResponse -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: UpdateDistributionResponse
s@UpdateDistributionResponse' {} Maybe Text
a -> UpdateDistributionResponse
s {$sel:eTag:UpdateDistributionResponse' :: Maybe Text
eTag = Maybe Text
a} :: UpdateDistributionResponse)

-- | The distribution\'s information.
updateDistributionResponse_distribution :: Lens.Lens' UpdateDistributionResponse (Prelude.Maybe Distribution)
updateDistributionResponse_distribution :: (Maybe Distribution -> f (Maybe Distribution))
-> UpdateDistributionResponse -> f UpdateDistributionResponse
updateDistributionResponse_distribution = (UpdateDistributionResponse -> Maybe Distribution)
-> (UpdateDistributionResponse
    -> Maybe Distribution -> UpdateDistributionResponse)
-> Lens
     UpdateDistributionResponse
     UpdateDistributionResponse
     (Maybe Distribution)
     (Maybe Distribution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionResponse' {Maybe Distribution
distribution :: Maybe Distribution
$sel:distribution:UpdateDistributionResponse' :: UpdateDistributionResponse -> Maybe Distribution
distribution} -> Maybe Distribution
distribution) (\s :: UpdateDistributionResponse
s@UpdateDistributionResponse' {} Maybe Distribution
a -> UpdateDistributionResponse
s {$sel:distribution:UpdateDistributionResponse' :: Maybe Distribution
distribution = Maybe Distribution
a} :: UpdateDistributionResponse)

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

instance Prelude.NFData UpdateDistributionResponse