{-# 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.IoT.UpdateDomainConfiguration
-- 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 values stored in the domain configuration. Domain configurations
-- for default endpoints can\'t be updated.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateDomainConfiguration>
-- action.
module Amazonka.IoT.UpdateDomainConfiguration
  ( -- * Creating a Request
    UpdateDomainConfiguration (..),
    newUpdateDomainConfiguration,

    -- * Request Lenses
    updateDomainConfiguration_authorizerConfig,
    updateDomainConfiguration_domainConfigurationStatus,
    updateDomainConfiguration_removeAuthorizerConfig,
    updateDomainConfiguration_domainConfigurationName,

    -- * Destructuring the Response
    UpdateDomainConfigurationResponse (..),
    newUpdateDomainConfigurationResponse,

    -- * Response Lenses
    updateDomainConfigurationResponse_domainConfigurationName,
    updateDomainConfigurationResponse_domainConfigurationArn,
    updateDomainConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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:/ 'newUpdateDomainConfiguration' smart constructor.
data UpdateDomainConfiguration = UpdateDomainConfiguration'
  { -- | An object that specifies the authorization service for a domain.
    UpdateDomainConfiguration -> Maybe AuthorizerConfig
authorizerConfig :: Prelude.Maybe AuthorizerConfig,
    -- | The status to which the domain configuration should be updated.
    UpdateDomainConfiguration -> Maybe DomainConfigurationStatus
domainConfigurationStatus :: Prelude.Maybe DomainConfigurationStatus,
    -- | Removes the authorization configuration from a domain.
    UpdateDomainConfiguration -> Maybe Bool
removeAuthorizerConfig :: Prelude.Maybe Prelude.Bool,
    -- | The name of the domain configuration to be updated.
    UpdateDomainConfiguration -> Text
domainConfigurationName :: Prelude.Text
  }
  deriving (UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool
(UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool)
-> (UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool)
-> Eq UpdateDomainConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool
$c/= :: UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool
== :: UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool
$c== :: UpdateDomainConfiguration -> UpdateDomainConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateDomainConfiguration]
ReadPrec UpdateDomainConfiguration
Int -> ReadS UpdateDomainConfiguration
ReadS [UpdateDomainConfiguration]
(Int -> ReadS UpdateDomainConfiguration)
-> ReadS [UpdateDomainConfiguration]
-> ReadPrec UpdateDomainConfiguration
-> ReadPrec [UpdateDomainConfiguration]
-> Read UpdateDomainConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainConfiguration]
$creadListPrec :: ReadPrec [UpdateDomainConfiguration]
readPrec :: ReadPrec UpdateDomainConfiguration
$creadPrec :: ReadPrec UpdateDomainConfiguration
readList :: ReadS [UpdateDomainConfiguration]
$creadList :: ReadS [UpdateDomainConfiguration]
readsPrec :: Int -> ReadS UpdateDomainConfiguration
$creadsPrec :: Int -> ReadS UpdateDomainConfiguration
Prelude.Read, Int -> UpdateDomainConfiguration -> ShowS
[UpdateDomainConfiguration] -> ShowS
UpdateDomainConfiguration -> String
(Int -> UpdateDomainConfiguration -> ShowS)
-> (UpdateDomainConfiguration -> String)
-> ([UpdateDomainConfiguration] -> ShowS)
-> Show UpdateDomainConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainConfiguration] -> ShowS
$cshowList :: [UpdateDomainConfiguration] -> ShowS
show :: UpdateDomainConfiguration -> String
$cshow :: UpdateDomainConfiguration -> String
showsPrec :: Int -> UpdateDomainConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateDomainConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateDomainConfiguration -> Rep UpdateDomainConfiguration x)
-> (forall x.
    Rep UpdateDomainConfiguration x -> UpdateDomainConfiguration)
-> Generic UpdateDomainConfiguration
forall x.
Rep UpdateDomainConfiguration x -> UpdateDomainConfiguration
forall x.
UpdateDomainConfiguration -> Rep UpdateDomainConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainConfiguration x -> UpdateDomainConfiguration
$cfrom :: forall x.
UpdateDomainConfiguration -> Rep UpdateDomainConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainConfiguration' 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:
--
-- 'authorizerConfig', 'updateDomainConfiguration_authorizerConfig' - An object that specifies the authorization service for a domain.
--
-- 'domainConfigurationStatus', 'updateDomainConfiguration_domainConfigurationStatus' - The status to which the domain configuration should be updated.
--
-- 'removeAuthorizerConfig', 'updateDomainConfiguration_removeAuthorizerConfig' - Removes the authorization configuration from a domain.
--
-- 'domainConfigurationName', 'updateDomainConfiguration_domainConfigurationName' - The name of the domain configuration to be updated.
newUpdateDomainConfiguration ::
  -- | 'domainConfigurationName'
  Prelude.Text ->
  UpdateDomainConfiguration
newUpdateDomainConfiguration :: Text -> UpdateDomainConfiguration
newUpdateDomainConfiguration
  Text
pDomainConfigurationName_ =
    UpdateDomainConfiguration' :: Maybe AuthorizerConfig
-> Maybe DomainConfigurationStatus
-> Maybe Bool
-> Text
-> UpdateDomainConfiguration
UpdateDomainConfiguration'
      { $sel:authorizerConfig:UpdateDomainConfiguration' :: Maybe AuthorizerConfig
authorizerConfig =
          Maybe AuthorizerConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:domainConfigurationStatus:UpdateDomainConfiguration' :: Maybe DomainConfigurationStatus
domainConfigurationStatus = Maybe DomainConfigurationStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:removeAuthorizerConfig:UpdateDomainConfiguration' :: Maybe Bool
removeAuthorizerConfig = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:domainConfigurationName:UpdateDomainConfiguration' :: Text
domainConfigurationName =
          Text
pDomainConfigurationName_
      }

-- | An object that specifies the authorization service for a domain.
updateDomainConfiguration_authorizerConfig :: Lens.Lens' UpdateDomainConfiguration (Prelude.Maybe AuthorizerConfig)
updateDomainConfiguration_authorizerConfig :: (Maybe AuthorizerConfig -> f (Maybe AuthorizerConfig))
-> UpdateDomainConfiguration -> f UpdateDomainConfiguration
updateDomainConfiguration_authorizerConfig = (UpdateDomainConfiguration -> Maybe AuthorizerConfig)
-> (UpdateDomainConfiguration
    -> Maybe AuthorizerConfig -> UpdateDomainConfiguration)
-> Lens
     UpdateDomainConfiguration
     UpdateDomainConfiguration
     (Maybe AuthorizerConfig)
     (Maybe AuthorizerConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfiguration' {Maybe AuthorizerConfig
authorizerConfig :: Maybe AuthorizerConfig
$sel:authorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe AuthorizerConfig
authorizerConfig} -> Maybe AuthorizerConfig
authorizerConfig) (\s :: UpdateDomainConfiguration
s@UpdateDomainConfiguration' {} Maybe AuthorizerConfig
a -> UpdateDomainConfiguration
s {$sel:authorizerConfig:UpdateDomainConfiguration' :: Maybe AuthorizerConfig
authorizerConfig = Maybe AuthorizerConfig
a} :: UpdateDomainConfiguration)

-- | The status to which the domain configuration should be updated.
updateDomainConfiguration_domainConfigurationStatus :: Lens.Lens' UpdateDomainConfiguration (Prelude.Maybe DomainConfigurationStatus)
updateDomainConfiguration_domainConfigurationStatus :: (Maybe DomainConfigurationStatus
 -> f (Maybe DomainConfigurationStatus))
-> UpdateDomainConfiguration -> f UpdateDomainConfiguration
updateDomainConfiguration_domainConfigurationStatus = (UpdateDomainConfiguration -> Maybe DomainConfigurationStatus)
-> (UpdateDomainConfiguration
    -> Maybe DomainConfigurationStatus -> UpdateDomainConfiguration)
-> Lens
     UpdateDomainConfiguration
     UpdateDomainConfiguration
     (Maybe DomainConfigurationStatus)
     (Maybe DomainConfigurationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfiguration' {Maybe DomainConfigurationStatus
domainConfigurationStatus :: Maybe DomainConfigurationStatus
$sel:domainConfigurationStatus:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe DomainConfigurationStatus
domainConfigurationStatus} -> Maybe DomainConfigurationStatus
domainConfigurationStatus) (\s :: UpdateDomainConfiguration
s@UpdateDomainConfiguration' {} Maybe DomainConfigurationStatus
a -> UpdateDomainConfiguration
s {$sel:domainConfigurationStatus:UpdateDomainConfiguration' :: Maybe DomainConfigurationStatus
domainConfigurationStatus = Maybe DomainConfigurationStatus
a} :: UpdateDomainConfiguration)

-- | Removes the authorization configuration from a domain.
updateDomainConfiguration_removeAuthorizerConfig :: Lens.Lens' UpdateDomainConfiguration (Prelude.Maybe Prelude.Bool)
updateDomainConfiguration_removeAuthorizerConfig :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDomainConfiguration -> f UpdateDomainConfiguration
updateDomainConfiguration_removeAuthorizerConfig = (UpdateDomainConfiguration -> Maybe Bool)
-> (UpdateDomainConfiguration
    -> Maybe Bool -> UpdateDomainConfiguration)
-> Lens
     UpdateDomainConfiguration
     UpdateDomainConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfiguration' {Maybe Bool
removeAuthorizerConfig :: Maybe Bool
$sel:removeAuthorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe Bool
removeAuthorizerConfig} -> Maybe Bool
removeAuthorizerConfig) (\s :: UpdateDomainConfiguration
s@UpdateDomainConfiguration' {} Maybe Bool
a -> UpdateDomainConfiguration
s {$sel:removeAuthorizerConfig:UpdateDomainConfiguration' :: Maybe Bool
removeAuthorizerConfig = Maybe Bool
a} :: UpdateDomainConfiguration)

-- | The name of the domain configuration to be updated.
updateDomainConfiguration_domainConfigurationName :: Lens.Lens' UpdateDomainConfiguration Prelude.Text
updateDomainConfiguration_domainConfigurationName :: (Text -> f Text)
-> UpdateDomainConfiguration -> f UpdateDomainConfiguration
updateDomainConfiguration_domainConfigurationName = (UpdateDomainConfiguration -> Text)
-> (UpdateDomainConfiguration -> Text -> UpdateDomainConfiguration)
-> Lens
     UpdateDomainConfiguration UpdateDomainConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfiguration' {Text
domainConfigurationName :: Text
$sel:domainConfigurationName:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Text
domainConfigurationName} -> Text
domainConfigurationName) (\s :: UpdateDomainConfiguration
s@UpdateDomainConfiguration' {} Text
a -> UpdateDomainConfiguration
s {$sel:domainConfigurationName:UpdateDomainConfiguration' :: Text
domainConfigurationName = Text
a} :: UpdateDomainConfiguration)

instance Core.AWSRequest UpdateDomainConfiguration where
  type
    AWSResponse UpdateDomainConfiguration =
      UpdateDomainConfigurationResponse
  request :: UpdateDomainConfiguration -> Request UpdateDomainConfiguration
request = Service
-> UpdateDomainConfiguration -> Request UpdateDomainConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDomainConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDomainConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDomainConfiguration))
-> Logger
-> Service
-> Proxy UpdateDomainConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDomainConfiguration)))
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 -> Int -> UpdateDomainConfigurationResponse
UpdateDomainConfigurationResponse'
            (Maybe Text
 -> Maybe Text -> Int -> UpdateDomainConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateDomainConfigurationResponse)
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
"domainConfigurationName")
            Either
  String (Maybe Text -> Int -> UpdateDomainConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateDomainConfigurationResponse)
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
"domainConfigurationArn")
            Either String (Int -> UpdateDomainConfigurationResponse)
-> Either String Int
-> Either String UpdateDomainConfigurationResponse
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 UpdateDomainConfiguration

instance Prelude.NFData UpdateDomainConfiguration

instance Core.ToHeaders UpdateDomainConfiguration where
  toHeaders :: UpdateDomainConfiguration -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateDomainConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON UpdateDomainConfiguration where
  toJSON :: UpdateDomainConfiguration -> Value
toJSON UpdateDomainConfiguration' {Maybe Bool
Maybe AuthorizerConfig
Maybe DomainConfigurationStatus
Text
domainConfigurationName :: Text
removeAuthorizerConfig :: Maybe Bool
domainConfigurationStatus :: Maybe DomainConfigurationStatus
authorizerConfig :: Maybe AuthorizerConfig
$sel:domainConfigurationName:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Text
$sel:removeAuthorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe Bool
$sel:domainConfigurationStatus:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe DomainConfigurationStatus
$sel:authorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe AuthorizerConfig
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"authorizerConfig" Text -> AuthorizerConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AuthorizerConfig -> Pair) -> Maybe AuthorizerConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuthorizerConfig
authorizerConfig,
            (Text
"domainConfigurationStatus" Text -> DomainConfigurationStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DomainConfigurationStatus -> Pair)
-> Maybe DomainConfigurationStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DomainConfigurationStatus
domainConfigurationStatus,
            (Text
"removeAuthorizerConfig" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeAuthorizerConfig
          ]
      )

instance Core.ToPath UpdateDomainConfiguration where
  toPath :: UpdateDomainConfiguration -> ByteString
toPath UpdateDomainConfiguration' {Maybe Bool
Maybe AuthorizerConfig
Maybe DomainConfigurationStatus
Text
domainConfigurationName :: Text
removeAuthorizerConfig :: Maybe Bool
domainConfigurationStatus :: Maybe DomainConfigurationStatus
authorizerConfig :: Maybe AuthorizerConfig
$sel:domainConfigurationName:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Text
$sel:removeAuthorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe Bool
$sel:domainConfigurationStatus:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe DomainConfigurationStatus
$sel:authorizerConfig:UpdateDomainConfiguration' :: UpdateDomainConfiguration -> Maybe AuthorizerConfig
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/domainConfigurations/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainConfigurationName
      ]

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

-- | /See:/ 'newUpdateDomainConfigurationResponse' smart constructor.
data UpdateDomainConfigurationResponse = UpdateDomainConfigurationResponse'
  { -- | The name of the domain configuration that was updated.
    UpdateDomainConfigurationResponse -> Maybe Text
domainConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the domain configuration that was updated.
    UpdateDomainConfigurationResponse -> Maybe Text
domainConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateDomainConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDomainConfigurationResponse
-> UpdateDomainConfigurationResponse -> Bool
(UpdateDomainConfigurationResponse
 -> UpdateDomainConfigurationResponse -> Bool)
-> (UpdateDomainConfigurationResponse
    -> UpdateDomainConfigurationResponse -> Bool)
-> Eq UpdateDomainConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDomainConfigurationResponse
-> UpdateDomainConfigurationResponse -> Bool
$c/= :: UpdateDomainConfigurationResponse
-> UpdateDomainConfigurationResponse -> Bool
== :: UpdateDomainConfigurationResponse
-> UpdateDomainConfigurationResponse -> Bool
$c== :: UpdateDomainConfigurationResponse
-> UpdateDomainConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDomainConfigurationResponse]
ReadPrec UpdateDomainConfigurationResponse
Int -> ReadS UpdateDomainConfigurationResponse
ReadS [UpdateDomainConfigurationResponse]
(Int -> ReadS UpdateDomainConfigurationResponse)
-> ReadS [UpdateDomainConfigurationResponse]
-> ReadPrec UpdateDomainConfigurationResponse
-> ReadPrec [UpdateDomainConfigurationResponse]
-> Read UpdateDomainConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDomainConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateDomainConfigurationResponse]
readPrec :: ReadPrec UpdateDomainConfigurationResponse
$creadPrec :: ReadPrec UpdateDomainConfigurationResponse
readList :: ReadS [UpdateDomainConfigurationResponse]
$creadList :: ReadS [UpdateDomainConfigurationResponse]
readsPrec :: Int -> ReadS UpdateDomainConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateDomainConfigurationResponse
Prelude.Read, Int -> UpdateDomainConfigurationResponse -> ShowS
[UpdateDomainConfigurationResponse] -> ShowS
UpdateDomainConfigurationResponse -> String
(Int -> UpdateDomainConfigurationResponse -> ShowS)
-> (UpdateDomainConfigurationResponse -> String)
-> ([UpdateDomainConfigurationResponse] -> ShowS)
-> Show UpdateDomainConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDomainConfigurationResponse] -> ShowS
$cshowList :: [UpdateDomainConfigurationResponse] -> ShowS
show :: UpdateDomainConfigurationResponse -> String
$cshow :: UpdateDomainConfigurationResponse -> String
showsPrec :: Int -> UpdateDomainConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateDomainConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDomainConfigurationResponse
 -> Rep UpdateDomainConfigurationResponse x)
-> (forall x.
    Rep UpdateDomainConfigurationResponse x
    -> UpdateDomainConfigurationResponse)
-> Generic UpdateDomainConfigurationResponse
forall x.
Rep UpdateDomainConfigurationResponse x
-> UpdateDomainConfigurationResponse
forall x.
UpdateDomainConfigurationResponse
-> Rep UpdateDomainConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDomainConfigurationResponse x
-> UpdateDomainConfigurationResponse
$cfrom :: forall x.
UpdateDomainConfigurationResponse
-> Rep UpdateDomainConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDomainConfigurationResponse' 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:
--
-- 'domainConfigurationName', 'updateDomainConfigurationResponse_domainConfigurationName' - The name of the domain configuration that was updated.
--
-- 'domainConfigurationArn', 'updateDomainConfigurationResponse_domainConfigurationArn' - The ARN of the domain configuration that was updated.
--
-- 'httpStatus', 'updateDomainConfigurationResponse_httpStatus' - The response's http status code.
newUpdateDomainConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDomainConfigurationResponse
newUpdateDomainConfigurationResponse :: Int -> UpdateDomainConfigurationResponse
newUpdateDomainConfigurationResponse Int
pHttpStatus_ =
  UpdateDomainConfigurationResponse' :: Maybe Text
-> Maybe Text -> Int -> UpdateDomainConfigurationResponse
UpdateDomainConfigurationResponse'
    { $sel:domainConfigurationName:UpdateDomainConfigurationResponse' :: Maybe Text
domainConfigurationName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainConfigurationArn:UpdateDomainConfigurationResponse' :: Maybe Text
domainConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDomainConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the domain configuration that was updated.
updateDomainConfigurationResponse_domainConfigurationName :: Lens.Lens' UpdateDomainConfigurationResponse (Prelude.Maybe Prelude.Text)
updateDomainConfigurationResponse_domainConfigurationName :: (Maybe Text -> f (Maybe Text))
-> UpdateDomainConfigurationResponse
-> f UpdateDomainConfigurationResponse
updateDomainConfigurationResponse_domainConfigurationName = (UpdateDomainConfigurationResponse -> Maybe Text)
-> (UpdateDomainConfigurationResponse
    -> Maybe Text -> UpdateDomainConfigurationResponse)
-> Lens
     UpdateDomainConfigurationResponse
     UpdateDomainConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfigurationResponse' {Maybe Text
domainConfigurationName :: Maybe Text
$sel:domainConfigurationName:UpdateDomainConfigurationResponse' :: UpdateDomainConfigurationResponse -> Maybe Text
domainConfigurationName} -> Maybe Text
domainConfigurationName) (\s :: UpdateDomainConfigurationResponse
s@UpdateDomainConfigurationResponse' {} Maybe Text
a -> UpdateDomainConfigurationResponse
s {$sel:domainConfigurationName:UpdateDomainConfigurationResponse' :: Maybe Text
domainConfigurationName = Maybe Text
a} :: UpdateDomainConfigurationResponse)

-- | The ARN of the domain configuration that was updated.
updateDomainConfigurationResponse_domainConfigurationArn :: Lens.Lens' UpdateDomainConfigurationResponse (Prelude.Maybe Prelude.Text)
updateDomainConfigurationResponse_domainConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> UpdateDomainConfigurationResponse
-> f UpdateDomainConfigurationResponse
updateDomainConfigurationResponse_domainConfigurationArn = (UpdateDomainConfigurationResponse -> Maybe Text)
-> (UpdateDomainConfigurationResponse
    -> Maybe Text -> UpdateDomainConfigurationResponse)
-> Lens
     UpdateDomainConfigurationResponse
     UpdateDomainConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDomainConfigurationResponse' {Maybe Text
domainConfigurationArn :: Maybe Text
$sel:domainConfigurationArn:UpdateDomainConfigurationResponse' :: UpdateDomainConfigurationResponse -> Maybe Text
domainConfigurationArn} -> Maybe Text
domainConfigurationArn) (\s :: UpdateDomainConfigurationResponse
s@UpdateDomainConfigurationResponse' {} Maybe Text
a -> UpdateDomainConfigurationResponse
s {$sel:domainConfigurationArn:UpdateDomainConfigurationResponse' :: Maybe Text
domainConfigurationArn = Maybe Text
a} :: UpdateDomainConfigurationResponse)

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

instance
  Prelude.NFData
    UpdateDomainConfigurationResponse