{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ImageBuilder.UpdateDistributionConfiguration
-- 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 a new distribution configuration. Distribution configurations
-- define and configure the outputs of your pipeline.
module Amazonka.ImageBuilder.UpdateDistributionConfiguration
  ( -- * Creating a Request
    UpdateDistributionConfiguration (..),
    newUpdateDistributionConfiguration,

    -- * Request Lenses
    updateDistributionConfiguration_description,
    updateDistributionConfiguration_distributionConfigurationArn,
    updateDistributionConfiguration_distributions,
    updateDistributionConfiguration_clientToken,

    -- * Destructuring the Response
    UpdateDistributionConfigurationResponse (..),
    newUpdateDistributionConfigurationResponse,

    -- * Response Lenses
    updateDistributionConfigurationResponse_requestId,
    updateDistributionConfigurationResponse_clientToken,
    updateDistributionConfigurationResponse_distributionConfigurationArn,
    updateDistributionConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.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:/ 'newUpdateDistributionConfiguration' smart constructor.
data UpdateDistributionConfiguration = UpdateDistributionConfiguration'
  { -- | The description of the distribution configuration.
    UpdateDistributionConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the distribution configuration that
    -- you want to update.
    UpdateDistributionConfiguration -> Text
distributionConfigurationArn :: Prelude.Text,
    -- | The distributions of the distribution configuration.
    UpdateDistributionConfiguration -> [Distribution]
distributions :: [Distribution],
    -- | The idempotency token of the distribution configuration.
    UpdateDistributionConfiguration -> Text
clientToken :: Prelude.Text
  }
  deriving (UpdateDistributionConfiguration
-> UpdateDistributionConfiguration -> Bool
(UpdateDistributionConfiguration
 -> UpdateDistributionConfiguration -> Bool)
-> (UpdateDistributionConfiguration
    -> UpdateDistributionConfiguration -> Bool)
-> Eq UpdateDistributionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDistributionConfiguration
-> UpdateDistributionConfiguration -> Bool
$c/= :: UpdateDistributionConfiguration
-> UpdateDistributionConfiguration -> Bool
== :: UpdateDistributionConfiguration
-> UpdateDistributionConfiguration -> Bool
$c== :: UpdateDistributionConfiguration
-> UpdateDistributionConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateDistributionConfiguration]
ReadPrec UpdateDistributionConfiguration
Int -> ReadS UpdateDistributionConfiguration
ReadS [UpdateDistributionConfiguration]
(Int -> ReadS UpdateDistributionConfiguration)
-> ReadS [UpdateDistributionConfiguration]
-> ReadPrec UpdateDistributionConfiguration
-> ReadPrec [UpdateDistributionConfiguration]
-> Read UpdateDistributionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDistributionConfiguration]
$creadListPrec :: ReadPrec [UpdateDistributionConfiguration]
readPrec :: ReadPrec UpdateDistributionConfiguration
$creadPrec :: ReadPrec UpdateDistributionConfiguration
readList :: ReadS [UpdateDistributionConfiguration]
$creadList :: ReadS [UpdateDistributionConfiguration]
readsPrec :: Int -> ReadS UpdateDistributionConfiguration
$creadsPrec :: Int -> ReadS UpdateDistributionConfiguration
Prelude.Read, Int -> UpdateDistributionConfiguration -> ShowS
[UpdateDistributionConfiguration] -> ShowS
UpdateDistributionConfiguration -> String
(Int -> UpdateDistributionConfiguration -> ShowS)
-> (UpdateDistributionConfiguration -> String)
-> ([UpdateDistributionConfiguration] -> ShowS)
-> Show UpdateDistributionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDistributionConfiguration] -> ShowS
$cshowList :: [UpdateDistributionConfiguration] -> ShowS
show :: UpdateDistributionConfiguration -> String
$cshow :: UpdateDistributionConfiguration -> String
showsPrec :: Int -> UpdateDistributionConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateDistributionConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateDistributionConfiguration
 -> Rep UpdateDistributionConfiguration x)
-> (forall x.
    Rep UpdateDistributionConfiguration x
    -> UpdateDistributionConfiguration)
-> Generic UpdateDistributionConfiguration
forall x.
Rep UpdateDistributionConfiguration x
-> UpdateDistributionConfiguration
forall x.
UpdateDistributionConfiguration
-> Rep UpdateDistributionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDistributionConfiguration x
-> UpdateDistributionConfiguration
$cfrom :: forall x.
UpdateDistributionConfiguration
-> Rep UpdateDistributionConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDistributionConfiguration' 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:
--
-- 'description', 'updateDistributionConfiguration_description' - The description of the distribution configuration.
--
-- 'distributionConfigurationArn', 'updateDistributionConfiguration_distributionConfigurationArn' - The Amazon Resource Name (ARN) of the distribution configuration that
-- you want to update.
--
-- 'distributions', 'updateDistributionConfiguration_distributions' - The distributions of the distribution configuration.
--
-- 'clientToken', 'updateDistributionConfiguration_clientToken' - The idempotency token of the distribution configuration.
newUpdateDistributionConfiguration ::
  -- | 'distributionConfigurationArn'
  Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  UpdateDistributionConfiguration
newUpdateDistributionConfiguration :: Text -> Text -> UpdateDistributionConfiguration
newUpdateDistributionConfiguration
  Text
pDistributionConfigurationArn_
  Text
pClientToken_ =
    UpdateDistributionConfiguration' :: Maybe Text
-> Text
-> [Distribution]
-> Text
-> UpdateDistributionConfiguration
UpdateDistributionConfiguration'
      { $sel:description:UpdateDistributionConfiguration' :: Maybe Text
description =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:distributionConfigurationArn:UpdateDistributionConfiguration' :: Text
distributionConfigurationArn =
          Text
pDistributionConfigurationArn_,
        $sel:distributions:UpdateDistributionConfiguration' :: [Distribution]
distributions = [Distribution]
forall a. Monoid a => a
Prelude.mempty,
        $sel:clientToken:UpdateDistributionConfiguration' :: Text
clientToken = Text
pClientToken_
      }

-- | The description of the distribution configuration.
updateDistributionConfiguration_description :: Lens.Lens' UpdateDistributionConfiguration (Prelude.Maybe Prelude.Text)
updateDistributionConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> UpdateDistributionConfiguration
-> f UpdateDistributionConfiguration
updateDistributionConfiguration_description = (UpdateDistributionConfiguration -> Maybe Text)
-> (UpdateDistributionConfiguration
    -> Maybe Text -> UpdateDistributionConfiguration)
-> Lens
     UpdateDistributionConfiguration
     UpdateDistributionConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateDistributionConfiguration
s@UpdateDistributionConfiguration' {} Maybe Text
a -> UpdateDistributionConfiguration
s {$sel:description:UpdateDistributionConfiguration' :: Maybe Text
description = Maybe Text
a} :: UpdateDistributionConfiguration)

-- | The Amazon Resource Name (ARN) of the distribution configuration that
-- you want to update.
updateDistributionConfiguration_distributionConfigurationArn :: Lens.Lens' UpdateDistributionConfiguration Prelude.Text
updateDistributionConfiguration_distributionConfigurationArn :: (Text -> f Text)
-> UpdateDistributionConfiguration
-> f UpdateDistributionConfiguration
updateDistributionConfiguration_distributionConfigurationArn = (UpdateDistributionConfiguration -> Text)
-> (UpdateDistributionConfiguration
    -> Text -> UpdateDistributionConfiguration)
-> Lens
     UpdateDistributionConfiguration
     UpdateDistributionConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionConfiguration' {Text
distributionConfigurationArn :: Text
$sel:distributionConfigurationArn:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Text
distributionConfigurationArn} -> Text
distributionConfigurationArn) (\s :: UpdateDistributionConfiguration
s@UpdateDistributionConfiguration' {} Text
a -> UpdateDistributionConfiguration
s {$sel:distributionConfigurationArn:UpdateDistributionConfiguration' :: Text
distributionConfigurationArn = Text
a} :: UpdateDistributionConfiguration)

-- | The distributions of the distribution configuration.
updateDistributionConfiguration_distributions :: Lens.Lens' UpdateDistributionConfiguration [Distribution]
updateDistributionConfiguration_distributions :: ([Distribution] -> f [Distribution])
-> UpdateDistributionConfiguration
-> f UpdateDistributionConfiguration
updateDistributionConfiguration_distributions = (UpdateDistributionConfiguration -> [Distribution])
-> (UpdateDistributionConfiguration
    -> [Distribution] -> UpdateDistributionConfiguration)
-> Lens
     UpdateDistributionConfiguration
     UpdateDistributionConfiguration
     [Distribution]
     [Distribution]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionConfiguration' {[Distribution]
distributions :: [Distribution]
$sel:distributions:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> [Distribution]
distributions} -> [Distribution]
distributions) (\s :: UpdateDistributionConfiguration
s@UpdateDistributionConfiguration' {} [Distribution]
a -> UpdateDistributionConfiguration
s {$sel:distributions:UpdateDistributionConfiguration' :: [Distribution]
distributions = [Distribution]
a} :: UpdateDistributionConfiguration) (([Distribution] -> f [Distribution])
 -> UpdateDistributionConfiguration
 -> f UpdateDistributionConfiguration)
-> (([Distribution] -> f [Distribution])
    -> [Distribution] -> f [Distribution])
-> ([Distribution] -> f [Distribution])
-> UpdateDistributionConfiguration
-> f UpdateDistributionConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Distribution] -> f [Distribution])
-> [Distribution] -> f [Distribution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The idempotency token of the distribution configuration.
updateDistributionConfiguration_clientToken :: Lens.Lens' UpdateDistributionConfiguration Prelude.Text
updateDistributionConfiguration_clientToken :: (Text -> f Text)
-> UpdateDistributionConfiguration
-> f UpdateDistributionConfiguration
updateDistributionConfiguration_clientToken = (UpdateDistributionConfiguration -> Text)
-> (UpdateDistributionConfiguration
    -> Text -> UpdateDistributionConfiguration)
-> Lens
     UpdateDistributionConfiguration
     UpdateDistributionConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionConfiguration' {Text
clientToken :: Text
$sel:clientToken:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Text
clientToken} -> Text
clientToken) (\s :: UpdateDistributionConfiguration
s@UpdateDistributionConfiguration' {} Text
a -> UpdateDistributionConfiguration
s {$sel:clientToken:UpdateDistributionConfiguration' :: Text
clientToken = Text
a} :: UpdateDistributionConfiguration)

instance
  Core.AWSRequest
    UpdateDistributionConfiguration
  where
  type
    AWSResponse UpdateDistributionConfiguration =
      UpdateDistributionConfigurationResponse
  request :: UpdateDistributionConfiguration
-> Request UpdateDistributionConfiguration
request = Service
-> UpdateDistributionConfiguration
-> Request UpdateDistributionConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDistributionConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateDistributionConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDistributionConfiguration))
-> Logger
-> Service
-> Proxy UpdateDistributionConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateDistributionConfiguration)))
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 ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateDistributionConfigurationResponse
UpdateDistributionConfigurationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateDistributionConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> UpdateDistributionConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestId")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> UpdateDistributionConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Int -> UpdateDistributionConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clientToken")
            Either
  String
  (Maybe Text -> Int -> UpdateDistributionConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateDistributionConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"distributionConfigurationArn")
            Either String (Int -> UpdateDistributionConfigurationResponse)
-> Either String Int
-> Either String UpdateDistributionConfigurationResponse
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
    UpdateDistributionConfiguration

instance
  Prelude.NFData
    UpdateDistributionConfiguration

instance
  Core.ToHeaders
    UpdateDistributionConfiguration
  where
  toHeaders :: UpdateDistributionConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateDistributionConfiguration -> 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 UpdateDistributionConfiguration where
  toJSON :: UpdateDistributionConfiguration -> Value
toJSON UpdateDistributionConfiguration' {[Distribution]
Maybe Text
Text
clientToken :: Text
distributions :: [Distribution]
distributionConfigurationArn :: Text
description :: Maybe Text
$sel:clientToken:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Text
$sel:distributions:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> [Distribution]
$sel:distributionConfigurationArn:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Text
$sel:description:UpdateDistributionConfiguration' :: UpdateDistributionConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"distributionConfigurationArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
distributionConfigurationArn
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"distributions" Text -> [Distribution] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Distribution]
distributions),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateDistributionConfigurationResponse' 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:
--
-- 'requestId', 'updateDistributionConfigurationResponse_requestId' - The request ID that uniquely identifies this request.
--
-- 'clientToken', 'updateDistributionConfigurationResponse_clientToken' - The idempotency token used to make this request idempotent.
--
-- 'distributionConfigurationArn', 'updateDistributionConfigurationResponse_distributionConfigurationArn' - The Amazon Resource Name (ARN) of the distribution configuration that
-- was updated by this request.
--
-- 'httpStatus', 'updateDistributionConfigurationResponse_httpStatus' - The response's http status code.
newUpdateDistributionConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDistributionConfigurationResponse
newUpdateDistributionConfigurationResponse :: Int -> UpdateDistributionConfigurationResponse
newUpdateDistributionConfigurationResponse
  Int
pHttpStatus_ =
    UpdateDistributionConfigurationResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateDistributionConfigurationResponse
UpdateDistributionConfigurationResponse'
      { $sel:requestId:UpdateDistributionConfigurationResponse' :: Maybe Text
requestId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:clientToken:UpdateDistributionConfigurationResponse' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:distributionConfigurationArn:UpdateDistributionConfigurationResponse' :: Maybe Text
distributionConfigurationArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateDistributionConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

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

-- | The Amazon Resource Name (ARN) of the distribution configuration that
-- was updated by this request.
updateDistributionConfigurationResponse_distributionConfigurationArn :: Lens.Lens' UpdateDistributionConfigurationResponse (Prelude.Maybe Prelude.Text)
updateDistributionConfigurationResponse_distributionConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> UpdateDistributionConfigurationResponse
-> f UpdateDistributionConfigurationResponse
updateDistributionConfigurationResponse_distributionConfigurationArn = (UpdateDistributionConfigurationResponse -> Maybe Text)
-> (UpdateDistributionConfigurationResponse
    -> Maybe Text -> UpdateDistributionConfigurationResponse)
-> Lens
     UpdateDistributionConfigurationResponse
     UpdateDistributionConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDistributionConfigurationResponse' {Maybe Text
distributionConfigurationArn :: Maybe Text
$sel:distributionConfigurationArn:UpdateDistributionConfigurationResponse' :: UpdateDistributionConfigurationResponse -> Maybe Text
distributionConfigurationArn} -> Maybe Text
distributionConfigurationArn) (\s :: UpdateDistributionConfigurationResponse
s@UpdateDistributionConfigurationResponse' {} Maybe Text
a -> UpdateDistributionConfigurationResponse
s {$sel:distributionConfigurationArn:UpdateDistributionConfigurationResponse' :: Maybe Text
distributionConfigurationArn = Maybe Text
a} :: UpdateDistributionConfigurationResponse)

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

instance
  Prelude.NFData
    UpdateDistributionConfigurationResponse