{-# 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.UpdateStreamingDistribution
-- 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 a streaming distribution.
module Amazonka.CloudFront.UpdateStreamingDistribution
  ( -- * Creating a Request
    UpdateStreamingDistribution (..),
    newUpdateStreamingDistribution,

    -- * Request Lenses
    updateStreamingDistribution_ifMatch,
    updateStreamingDistribution_streamingDistributionConfig,
    updateStreamingDistribution_id,

    -- * Destructuring the Response
    UpdateStreamingDistributionResponse (..),
    newUpdateStreamingDistributionResponse,

    -- * Response Lenses
    updateStreamingDistributionResponse_eTag,
    updateStreamingDistributionResponse_streamingDistribution,
    updateStreamingDistributionResponse_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 streaming distribution.
--
-- /See:/ 'newUpdateStreamingDistribution' smart constructor.
data UpdateStreamingDistribution = UpdateStreamingDistribution'
  { -- | The value of the @ETag@ header that you received when retrieving the
    -- streaming distribution\'s configuration. For example: @E2QWRUHAPOMQZL@.
    UpdateStreamingDistribution -> Maybe Text
ifMatch :: Prelude.Maybe Prelude.Text,
    -- | The streaming distribution\'s configuration information.
    UpdateStreamingDistribution -> StreamingDistributionConfig
streamingDistributionConfig :: StreamingDistributionConfig,
    -- | The streaming distribution\'s id.
    UpdateStreamingDistribution -> Text
id :: Prelude.Text
  }
  deriving (UpdateStreamingDistribution -> UpdateStreamingDistribution -> Bool
(UpdateStreamingDistribution
 -> UpdateStreamingDistribution -> Bool)
-> (UpdateStreamingDistribution
    -> UpdateStreamingDistribution -> Bool)
-> Eq UpdateStreamingDistribution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStreamingDistribution -> UpdateStreamingDistribution -> Bool
$c/= :: UpdateStreamingDistribution -> UpdateStreamingDistribution -> Bool
== :: UpdateStreamingDistribution -> UpdateStreamingDistribution -> Bool
$c== :: UpdateStreamingDistribution -> UpdateStreamingDistribution -> Bool
Prelude.Eq, ReadPrec [UpdateStreamingDistribution]
ReadPrec UpdateStreamingDistribution
Int -> ReadS UpdateStreamingDistribution
ReadS [UpdateStreamingDistribution]
(Int -> ReadS UpdateStreamingDistribution)
-> ReadS [UpdateStreamingDistribution]
-> ReadPrec UpdateStreamingDistribution
-> ReadPrec [UpdateStreamingDistribution]
-> Read UpdateStreamingDistribution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStreamingDistribution]
$creadListPrec :: ReadPrec [UpdateStreamingDistribution]
readPrec :: ReadPrec UpdateStreamingDistribution
$creadPrec :: ReadPrec UpdateStreamingDistribution
readList :: ReadS [UpdateStreamingDistribution]
$creadList :: ReadS [UpdateStreamingDistribution]
readsPrec :: Int -> ReadS UpdateStreamingDistribution
$creadsPrec :: Int -> ReadS UpdateStreamingDistribution
Prelude.Read, Int -> UpdateStreamingDistribution -> ShowS
[UpdateStreamingDistribution] -> ShowS
UpdateStreamingDistribution -> String
(Int -> UpdateStreamingDistribution -> ShowS)
-> (UpdateStreamingDistribution -> String)
-> ([UpdateStreamingDistribution] -> ShowS)
-> Show UpdateStreamingDistribution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStreamingDistribution] -> ShowS
$cshowList :: [UpdateStreamingDistribution] -> ShowS
show :: UpdateStreamingDistribution -> String
$cshow :: UpdateStreamingDistribution -> String
showsPrec :: Int -> UpdateStreamingDistribution -> ShowS
$cshowsPrec :: Int -> UpdateStreamingDistribution -> ShowS
Prelude.Show, (forall x.
 UpdateStreamingDistribution -> Rep UpdateStreamingDistribution x)
-> (forall x.
    Rep UpdateStreamingDistribution x -> UpdateStreamingDistribution)
-> Generic UpdateStreamingDistribution
forall x.
Rep UpdateStreamingDistribution x -> UpdateStreamingDistribution
forall x.
UpdateStreamingDistribution -> Rep UpdateStreamingDistribution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateStreamingDistribution x -> UpdateStreamingDistribution
$cfrom :: forall x.
UpdateStreamingDistribution -> Rep UpdateStreamingDistribution x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStreamingDistribution' 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', 'updateStreamingDistribution_ifMatch' - The value of the @ETag@ header that you received when retrieving the
-- streaming distribution\'s configuration. For example: @E2QWRUHAPOMQZL@.
--
-- 'streamingDistributionConfig', 'updateStreamingDistribution_streamingDistributionConfig' - The streaming distribution\'s configuration information.
--
-- 'id', 'updateStreamingDistribution_id' - The streaming distribution\'s id.
newUpdateStreamingDistribution ::
  -- | 'streamingDistributionConfig'
  StreamingDistributionConfig ->
  -- | 'id'
  Prelude.Text ->
  UpdateStreamingDistribution
newUpdateStreamingDistribution :: StreamingDistributionConfig -> Text -> UpdateStreamingDistribution
newUpdateStreamingDistribution
  StreamingDistributionConfig
pStreamingDistributionConfig_
  Text
pId_ =
    UpdateStreamingDistribution' :: Maybe Text
-> StreamingDistributionConfig
-> Text
-> UpdateStreamingDistribution
UpdateStreamingDistribution'
      { $sel:ifMatch:UpdateStreamingDistribution' :: Maybe Text
ifMatch =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:streamingDistributionConfig:UpdateStreamingDistribution' :: StreamingDistributionConfig
streamingDistributionConfig =
          StreamingDistributionConfig
pStreamingDistributionConfig_,
        $sel:id:UpdateStreamingDistribution' :: Text
id = Text
pId_
      }

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

-- | The streaming distribution\'s configuration information.
updateStreamingDistribution_streamingDistributionConfig :: Lens.Lens' UpdateStreamingDistribution StreamingDistributionConfig
updateStreamingDistribution_streamingDistributionConfig :: (StreamingDistributionConfig -> f StreamingDistributionConfig)
-> UpdateStreamingDistribution -> f UpdateStreamingDistribution
updateStreamingDistribution_streamingDistributionConfig = (UpdateStreamingDistribution -> StreamingDistributionConfig)
-> (UpdateStreamingDistribution
    -> StreamingDistributionConfig -> UpdateStreamingDistribution)
-> Lens
     UpdateStreamingDistribution
     UpdateStreamingDistribution
     StreamingDistributionConfig
     StreamingDistributionConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingDistribution' {StreamingDistributionConfig
streamingDistributionConfig :: StreamingDistributionConfig
$sel:streamingDistributionConfig:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> StreamingDistributionConfig
streamingDistributionConfig} -> StreamingDistributionConfig
streamingDistributionConfig) (\s :: UpdateStreamingDistribution
s@UpdateStreamingDistribution' {} StreamingDistributionConfig
a -> UpdateStreamingDistribution
s {$sel:streamingDistributionConfig:UpdateStreamingDistribution' :: StreamingDistributionConfig
streamingDistributionConfig = StreamingDistributionConfig
a} :: UpdateStreamingDistribution)

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

instance Core.AWSRequest UpdateStreamingDistribution where
  type
    AWSResponse UpdateStreamingDistribution =
      UpdateStreamingDistributionResponse
  request :: UpdateStreamingDistribution -> Request UpdateStreamingDistribution
request = Service
-> UpdateStreamingDistribution
-> Request UpdateStreamingDistribution
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.putXML Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateStreamingDistribution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateStreamingDistribution)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse UpdateStreamingDistribution))
-> Logger
-> Service
-> Proxy UpdateStreamingDistribution
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateStreamingDistribution)))
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 StreamingDistribution
-> Int
-> UpdateStreamingDistributionResponse
UpdateStreamingDistributionResponse'
            (Maybe Text
 -> Maybe StreamingDistribution
 -> Int
 -> UpdateStreamingDistributionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe StreamingDistribution
      -> Int -> UpdateStreamingDistributionResponse)
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 StreamingDistribution
   -> Int -> UpdateStreamingDistributionResponse)
-> Either String (Maybe StreamingDistribution)
-> Either String (Int -> UpdateStreamingDistributionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node] -> Either String (Maybe StreamingDistribution)
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
            Either String (Int -> UpdateStreamingDistributionResponse)
-> Either String Int
-> Either String UpdateStreamingDistributionResponse
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 UpdateStreamingDistribution

instance Prelude.NFData UpdateStreamingDistribution

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

instance Core.ToHeaders UpdateStreamingDistribution where
  toHeaders :: UpdateStreamingDistribution -> ResponseHeaders
toHeaders UpdateStreamingDistribution' {Maybe Text
Text
StreamingDistributionConfig
id :: Text
streamingDistributionConfig :: StreamingDistributionConfig
ifMatch :: Maybe Text
$sel:id:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> Text
$sel:streamingDistributionConfig:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> StreamingDistributionConfig
$sel:ifMatch:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> 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 UpdateStreamingDistribution where
  toPath :: UpdateStreamingDistribution -> ByteString
toPath UpdateStreamingDistribution' {Maybe Text
Text
StreamingDistributionConfig
id :: Text
streamingDistributionConfig :: StreamingDistributionConfig
ifMatch :: Maybe Text
$sel:id:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> Text
$sel:streamingDistributionConfig:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> StreamingDistributionConfig
$sel:ifMatch:UpdateStreamingDistribution' :: UpdateStreamingDistribution -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-05-31/streaming-distribution/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id,
        ByteString
"/config"
      ]

instance Core.ToQuery UpdateStreamingDistribution where
  toQuery :: UpdateStreamingDistribution -> QueryString
toQuery = QueryString -> UpdateStreamingDistribution -> 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:/ 'newUpdateStreamingDistributionResponse' smart constructor.
data UpdateStreamingDistributionResponse = UpdateStreamingDistributionResponse'
  { -- | The current version of the configuration. For example: @E2QWRUHAPOMQZL@.
    UpdateStreamingDistributionResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | The streaming distribution\'s information.
    UpdateStreamingDistributionResponse -> Maybe StreamingDistribution
streamingDistribution :: Prelude.Maybe StreamingDistribution,
    -- | The response's http status code.
    UpdateStreamingDistributionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateStreamingDistributionResponse
-> UpdateStreamingDistributionResponse -> Bool
(UpdateStreamingDistributionResponse
 -> UpdateStreamingDistributionResponse -> Bool)
-> (UpdateStreamingDistributionResponse
    -> UpdateStreamingDistributionResponse -> Bool)
-> Eq UpdateStreamingDistributionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateStreamingDistributionResponse
-> UpdateStreamingDistributionResponse -> Bool
$c/= :: UpdateStreamingDistributionResponse
-> UpdateStreamingDistributionResponse -> Bool
== :: UpdateStreamingDistributionResponse
-> UpdateStreamingDistributionResponse -> Bool
$c== :: UpdateStreamingDistributionResponse
-> UpdateStreamingDistributionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateStreamingDistributionResponse]
ReadPrec UpdateStreamingDistributionResponse
Int -> ReadS UpdateStreamingDistributionResponse
ReadS [UpdateStreamingDistributionResponse]
(Int -> ReadS UpdateStreamingDistributionResponse)
-> ReadS [UpdateStreamingDistributionResponse]
-> ReadPrec UpdateStreamingDistributionResponse
-> ReadPrec [UpdateStreamingDistributionResponse]
-> Read UpdateStreamingDistributionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateStreamingDistributionResponse]
$creadListPrec :: ReadPrec [UpdateStreamingDistributionResponse]
readPrec :: ReadPrec UpdateStreamingDistributionResponse
$creadPrec :: ReadPrec UpdateStreamingDistributionResponse
readList :: ReadS [UpdateStreamingDistributionResponse]
$creadList :: ReadS [UpdateStreamingDistributionResponse]
readsPrec :: Int -> ReadS UpdateStreamingDistributionResponse
$creadsPrec :: Int -> ReadS UpdateStreamingDistributionResponse
Prelude.Read, Int -> UpdateStreamingDistributionResponse -> ShowS
[UpdateStreamingDistributionResponse] -> ShowS
UpdateStreamingDistributionResponse -> String
(Int -> UpdateStreamingDistributionResponse -> ShowS)
-> (UpdateStreamingDistributionResponse -> String)
-> ([UpdateStreamingDistributionResponse] -> ShowS)
-> Show UpdateStreamingDistributionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateStreamingDistributionResponse] -> ShowS
$cshowList :: [UpdateStreamingDistributionResponse] -> ShowS
show :: UpdateStreamingDistributionResponse -> String
$cshow :: UpdateStreamingDistributionResponse -> String
showsPrec :: Int -> UpdateStreamingDistributionResponse -> ShowS
$cshowsPrec :: Int -> UpdateStreamingDistributionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateStreamingDistributionResponse
 -> Rep UpdateStreamingDistributionResponse x)
-> (forall x.
    Rep UpdateStreamingDistributionResponse x
    -> UpdateStreamingDistributionResponse)
-> Generic UpdateStreamingDistributionResponse
forall x.
Rep UpdateStreamingDistributionResponse x
-> UpdateStreamingDistributionResponse
forall x.
UpdateStreamingDistributionResponse
-> Rep UpdateStreamingDistributionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateStreamingDistributionResponse x
-> UpdateStreamingDistributionResponse
$cfrom :: forall x.
UpdateStreamingDistributionResponse
-> Rep UpdateStreamingDistributionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateStreamingDistributionResponse' 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', 'updateStreamingDistributionResponse_eTag' - The current version of the configuration. For example: @E2QWRUHAPOMQZL@.
--
-- 'streamingDistribution', 'updateStreamingDistributionResponse_streamingDistribution' - The streaming distribution\'s information.
--
-- 'httpStatus', 'updateStreamingDistributionResponse_httpStatus' - The response's http status code.
newUpdateStreamingDistributionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateStreamingDistributionResponse
newUpdateStreamingDistributionResponse :: Int -> UpdateStreamingDistributionResponse
newUpdateStreamingDistributionResponse Int
pHttpStatus_ =
  UpdateStreamingDistributionResponse' :: Maybe Text
-> Maybe StreamingDistribution
-> Int
-> UpdateStreamingDistributionResponse
UpdateStreamingDistributionResponse'
    { $sel:eTag:UpdateStreamingDistributionResponse' :: Maybe Text
eTag =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:streamingDistribution:UpdateStreamingDistributionResponse' :: Maybe StreamingDistribution
streamingDistribution =
        Maybe StreamingDistribution
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateStreamingDistributionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The streaming distribution\'s information.
updateStreamingDistributionResponse_streamingDistribution :: Lens.Lens' UpdateStreamingDistributionResponse (Prelude.Maybe StreamingDistribution)
updateStreamingDistributionResponse_streamingDistribution :: (Maybe StreamingDistribution -> f (Maybe StreamingDistribution))
-> UpdateStreamingDistributionResponse
-> f UpdateStreamingDistributionResponse
updateStreamingDistributionResponse_streamingDistribution = (UpdateStreamingDistributionResponse
 -> Maybe StreamingDistribution)
-> (UpdateStreamingDistributionResponse
    -> Maybe StreamingDistribution
    -> UpdateStreamingDistributionResponse)
-> Lens
     UpdateStreamingDistributionResponse
     UpdateStreamingDistributionResponse
     (Maybe StreamingDistribution)
     (Maybe StreamingDistribution)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateStreamingDistributionResponse' {Maybe StreamingDistribution
streamingDistribution :: Maybe StreamingDistribution
$sel:streamingDistribution:UpdateStreamingDistributionResponse' :: UpdateStreamingDistributionResponse -> Maybe StreamingDistribution
streamingDistribution} -> Maybe StreamingDistribution
streamingDistribution) (\s :: UpdateStreamingDistributionResponse
s@UpdateStreamingDistributionResponse' {} Maybe StreamingDistribution
a -> UpdateStreamingDistributionResponse
s {$sel:streamingDistribution:UpdateStreamingDistributionResponse' :: Maybe StreamingDistribution
streamingDistribution = Maybe StreamingDistribution
a} :: UpdateStreamingDistributionResponse)

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

instance
  Prelude.NFData
    UpdateStreamingDistributionResponse