{-# 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.Route53AutoNaming.UpdatePrivateDnsNamespace
-- 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 private DNS namespace.
module Amazonka.Route53AutoNaming.UpdatePrivateDnsNamespace
  ( -- * Creating a Request
    UpdatePrivateDnsNamespace (..),
    newUpdatePrivateDnsNamespace,

    -- * Request Lenses
    updatePrivateDnsNamespace_updaterRequestId,
    updatePrivateDnsNamespace_id,
    updatePrivateDnsNamespace_namespace,

    -- * Destructuring the Response
    UpdatePrivateDnsNamespaceResponse (..),
    newUpdatePrivateDnsNamespaceResponse,

    -- * Response Lenses
    updatePrivateDnsNamespaceResponse_operationId,
    updatePrivateDnsNamespaceResponse_httpStatus,
  )
where

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
import Amazonka.Route53AutoNaming.Types

-- | /See:/ 'newUpdatePrivateDnsNamespace' smart constructor.
data UpdatePrivateDnsNamespace = UpdatePrivateDnsNamespace'
  { -- | A unique string that identifies the request and that allows failed
    -- @UpdatePrivateDnsNamespace@ requests to be retried without the risk of
    -- running the operation twice. @UpdaterRequestId@ can be any unique string
    -- (for example, a date\/timestamp).
    UpdatePrivateDnsNamespace -> Maybe Text
updaterRequestId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the namespace that you want to update.
    UpdatePrivateDnsNamespace -> Text
id :: Prelude.Text,
    -- | Updated properties for the private DNS namespace.
    UpdatePrivateDnsNamespace -> PrivateDnsNamespaceChange
namespace :: PrivateDnsNamespaceChange
  }
  deriving (UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool
(UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool)
-> (UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool)
-> Eq UpdatePrivateDnsNamespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool
$c/= :: UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool
== :: UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool
$c== :: UpdatePrivateDnsNamespace -> UpdatePrivateDnsNamespace -> Bool
Prelude.Eq, ReadPrec [UpdatePrivateDnsNamespace]
ReadPrec UpdatePrivateDnsNamespace
Int -> ReadS UpdatePrivateDnsNamespace
ReadS [UpdatePrivateDnsNamespace]
(Int -> ReadS UpdatePrivateDnsNamespace)
-> ReadS [UpdatePrivateDnsNamespace]
-> ReadPrec UpdatePrivateDnsNamespace
-> ReadPrec [UpdatePrivateDnsNamespace]
-> Read UpdatePrivateDnsNamespace
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePrivateDnsNamespace]
$creadListPrec :: ReadPrec [UpdatePrivateDnsNamespace]
readPrec :: ReadPrec UpdatePrivateDnsNamespace
$creadPrec :: ReadPrec UpdatePrivateDnsNamespace
readList :: ReadS [UpdatePrivateDnsNamespace]
$creadList :: ReadS [UpdatePrivateDnsNamespace]
readsPrec :: Int -> ReadS UpdatePrivateDnsNamespace
$creadsPrec :: Int -> ReadS UpdatePrivateDnsNamespace
Prelude.Read, Int -> UpdatePrivateDnsNamespace -> ShowS
[UpdatePrivateDnsNamespace] -> ShowS
UpdatePrivateDnsNamespace -> String
(Int -> UpdatePrivateDnsNamespace -> ShowS)
-> (UpdatePrivateDnsNamespace -> String)
-> ([UpdatePrivateDnsNamespace] -> ShowS)
-> Show UpdatePrivateDnsNamespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePrivateDnsNamespace] -> ShowS
$cshowList :: [UpdatePrivateDnsNamespace] -> ShowS
show :: UpdatePrivateDnsNamespace -> String
$cshow :: UpdatePrivateDnsNamespace -> String
showsPrec :: Int -> UpdatePrivateDnsNamespace -> ShowS
$cshowsPrec :: Int -> UpdatePrivateDnsNamespace -> ShowS
Prelude.Show, (forall x.
 UpdatePrivateDnsNamespace -> Rep UpdatePrivateDnsNamespace x)
-> (forall x.
    Rep UpdatePrivateDnsNamespace x -> UpdatePrivateDnsNamespace)
-> Generic UpdatePrivateDnsNamespace
forall x.
Rep UpdatePrivateDnsNamespace x -> UpdatePrivateDnsNamespace
forall x.
UpdatePrivateDnsNamespace -> Rep UpdatePrivateDnsNamespace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePrivateDnsNamespace x -> UpdatePrivateDnsNamespace
$cfrom :: forall x.
UpdatePrivateDnsNamespace -> Rep UpdatePrivateDnsNamespace x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePrivateDnsNamespace' 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:
--
-- 'updaterRequestId', 'updatePrivateDnsNamespace_updaterRequestId' - A unique string that identifies the request and that allows failed
-- @UpdatePrivateDnsNamespace@ requests to be retried without the risk of
-- running the operation twice. @UpdaterRequestId@ can be any unique string
-- (for example, a date\/timestamp).
--
-- 'id', 'updatePrivateDnsNamespace_id' - The ID of the namespace that you want to update.
--
-- 'namespace', 'updatePrivateDnsNamespace_namespace' - Updated properties for the private DNS namespace.
newUpdatePrivateDnsNamespace ::
  -- | 'id'
  Prelude.Text ->
  -- | 'namespace'
  PrivateDnsNamespaceChange ->
  UpdatePrivateDnsNamespace
newUpdatePrivateDnsNamespace :: Text -> PrivateDnsNamespaceChange -> UpdatePrivateDnsNamespace
newUpdatePrivateDnsNamespace Text
pId_ PrivateDnsNamespaceChange
pNamespace_ =
  UpdatePrivateDnsNamespace' :: Maybe Text
-> Text -> PrivateDnsNamespaceChange -> UpdatePrivateDnsNamespace
UpdatePrivateDnsNamespace'
    { $sel:updaterRequestId:UpdatePrivateDnsNamespace' :: Maybe Text
updaterRequestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdatePrivateDnsNamespace' :: Text
id = Text
pId_,
      $sel:namespace:UpdatePrivateDnsNamespace' :: PrivateDnsNamespaceChange
namespace = PrivateDnsNamespaceChange
pNamespace_
    }

-- | A unique string that identifies the request and that allows failed
-- @UpdatePrivateDnsNamespace@ requests to be retried without the risk of
-- running the operation twice. @UpdaterRequestId@ can be any unique string
-- (for example, a date\/timestamp).
updatePrivateDnsNamespace_updaterRequestId :: Lens.Lens' UpdatePrivateDnsNamespace (Prelude.Maybe Prelude.Text)
updatePrivateDnsNamespace_updaterRequestId :: (Maybe Text -> f (Maybe Text))
-> UpdatePrivateDnsNamespace -> f UpdatePrivateDnsNamespace
updatePrivateDnsNamespace_updaterRequestId = (UpdatePrivateDnsNamespace -> Maybe Text)
-> (UpdatePrivateDnsNamespace
    -> Maybe Text -> UpdatePrivateDnsNamespace)
-> Lens
     UpdatePrivateDnsNamespace
     UpdatePrivateDnsNamespace
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePrivateDnsNamespace' {Maybe Text
updaterRequestId :: Maybe Text
$sel:updaterRequestId:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> Maybe Text
updaterRequestId} -> Maybe Text
updaterRequestId) (\s :: UpdatePrivateDnsNamespace
s@UpdatePrivateDnsNamespace' {} Maybe Text
a -> UpdatePrivateDnsNamespace
s {$sel:updaterRequestId:UpdatePrivateDnsNamespace' :: Maybe Text
updaterRequestId = Maybe Text
a} :: UpdatePrivateDnsNamespace)

-- | The ID of the namespace that you want to update.
updatePrivateDnsNamespace_id :: Lens.Lens' UpdatePrivateDnsNamespace Prelude.Text
updatePrivateDnsNamespace_id :: (Text -> f Text)
-> UpdatePrivateDnsNamespace -> f UpdatePrivateDnsNamespace
updatePrivateDnsNamespace_id = (UpdatePrivateDnsNamespace -> Text)
-> (UpdatePrivateDnsNamespace -> Text -> UpdatePrivateDnsNamespace)
-> Lens
     UpdatePrivateDnsNamespace UpdatePrivateDnsNamespace Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePrivateDnsNamespace' {Text
id :: Text
$sel:id:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> Text
id} -> Text
id) (\s :: UpdatePrivateDnsNamespace
s@UpdatePrivateDnsNamespace' {} Text
a -> UpdatePrivateDnsNamespace
s {$sel:id:UpdatePrivateDnsNamespace' :: Text
id = Text
a} :: UpdatePrivateDnsNamespace)

-- | Updated properties for the private DNS namespace.
updatePrivateDnsNamespace_namespace :: Lens.Lens' UpdatePrivateDnsNamespace PrivateDnsNamespaceChange
updatePrivateDnsNamespace_namespace :: (PrivateDnsNamespaceChange -> f PrivateDnsNamespaceChange)
-> UpdatePrivateDnsNamespace -> f UpdatePrivateDnsNamespace
updatePrivateDnsNamespace_namespace = (UpdatePrivateDnsNamespace -> PrivateDnsNamespaceChange)
-> (UpdatePrivateDnsNamespace
    -> PrivateDnsNamespaceChange -> UpdatePrivateDnsNamespace)
-> Lens
     UpdatePrivateDnsNamespace
     UpdatePrivateDnsNamespace
     PrivateDnsNamespaceChange
     PrivateDnsNamespaceChange
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePrivateDnsNamespace' {PrivateDnsNamespaceChange
namespace :: PrivateDnsNamespaceChange
$sel:namespace:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> PrivateDnsNamespaceChange
namespace} -> PrivateDnsNamespaceChange
namespace) (\s :: UpdatePrivateDnsNamespace
s@UpdatePrivateDnsNamespace' {} PrivateDnsNamespaceChange
a -> UpdatePrivateDnsNamespace
s {$sel:namespace:UpdatePrivateDnsNamespace' :: PrivateDnsNamespaceChange
namespace = PrivateDnsNamespaceChange
a} :: UpdatePrivateDnsNamespace)

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

instance Prelude.NFData UpdatePrivateDnsNamespace

instance Core.ToHeaders UpdatePrivateDnsNamespace where
  toHeaders :: UpdatePrivateDnsNamespace -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdatePrivateDnsNamespace -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53AutoNaming_v20170314.UpdatePrivateDnsNamespace" ::
                          Prelude.ByteString
                      ),
            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 UpdatePrivateDnsNamespace where
  toJSON :: UpdatePrivateDnsNamespace -> Value
toJSON UpdatePrivateDnsNamespace' {Maybe Text
Text
PrivateDnsNamespaceChange
namespace :: PrivateDnsNamespaceChange
id :: Text
updaterRequestId :: Maybe Text
$sel:namespace:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> PrivateDnsNamespaceChange
$sel:id:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> Text
$sel:updaterRequestId:UpdatePrivateDnsNamespace' :: UpdatePrivateDnsNamespace -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"UpdaterRequestId" 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
updaterRequestId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Namespace" Text -> PrivateDnsNamespaceChange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PrivateDnsNamespaceChange
namespace)
          ]
      )

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

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

-- | /See:/ 'newUpdatePrivateDnsNamespaceResponse' smart constructor.
data UpdatePrivateDnsNamespaceResponse = UpdatePrivateDnsNamespaceResponse'
  { -- | A value that you can use to determine whether the request completed
    -- successfully. To get the status of the operation, see
    -- <https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html GetOperation>.
    UpdatePrivateDnsNamespaceResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdatePrivateDnsNamespaceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdatePrivateDnsNamespaceResponse
-> UpdatePrivateDnsNamespaceResponse -> Bool
(UpdatePrivateDnsNamespaceResponse
 -> UpdatePrivateDnsNamespaceResponse -> Bool)
-> (UpdatePrivateDnsNamespaceResponse
    -> UpdatePrivateDnsNamespaceResponse -> Bool)
-> Eq UpdatePrivateDnsNamespaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePrivateDnsNamespaceResponse
-> UpdatePrivateDnsNamespaceResponse -> Bool
$c/= :: UpdatePrivateDnsNamespaceResponse
-> UpdatePrivateDnsNamespaceResponse -> Bool
== :: UpdatePrivateDnsNamespaceResponse
-> UpdatePrivateDnsNamespaceResponse -> Bool
$c== :: UpdatePrivateDnsNamespaceResponse
-> UpdatePrivateDnsNamespaceResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePrivateDnsNamespaceResponse]
ReadPrec UpdatePrivateDnsNamespaceResponse
Int -> ReadS UpdatePrivateDnsNamespaceResponse
ReadS [UpdatePrivateDnsNamespaceResponse]
(Int -> ReadS UpdatePrivateDnsNamespaceResponse)
-> ReadS [UpdatePrivateDnsNamespaceResponse]
-> ReadPrec UpdatePrivateDnsNamespaceResponse
-> ReadPrec [UpdatePrivateDnsNamespaceResponse]
-> Read UpdatePrivateDnsNamespaceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePrivateDnsNamespaceResponse]
$creadListPrec :: ReadPrec [UpdatePrivateDnsNamespaceResponse]
readPrec :: ReadPrec UpdatePrivateDnsNamespaceResponse
$creadPrec :: ReadPrec UpdatePrivateDnsNamespaceResponse
readList :: ReadS [UpdatePrivateDnsNamespaceResponse]
$creadList :: ReadS [UpdatePrivateDnsNamespaceResponse]
readsPrec :: Int -> ReadS UpdatePrivateDnsNamespaceResponse
$creadsPrec :: Int -> ReadS UpdatePrivateDnsNamespaceResponse
Prelude.Read, Int -> UpdatePrivateDnsNamespaceResponse -> ShowS
[UpdatePrivateDnsNamespaceResponse] -> ShowS
UpdatePrivateDnsNamespaceResponse -> String
(Int -> UpdatePrivateDnsNamespaceResponse -> ShowS)
-> (UpdatePrivateDnsNamespaceResponse -> String)
-> ([UpdatePrivateDnsNamespaceResponse] -> ShowS)
-> Show UpdatePrivateDnsNamespaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePrivateDnsNamespaceResponse] -> ShowS
$cshowList :: [UpdatePrivateDnsNamespaceResponse] -> ShowS
show :: UpdatePrivateDnsNamespaceResponse -> String
$cshow :: UpdatePrivateDnsNamespaceResponse -> String
showsPrec :: Int -> UpdatePrivateDnsNamespaceResponse -> ShowS
$cshowsPrec :: Int -> UpdatePrivateDnsNamespaceResponse -> ShowS
Prelude.Show, (forall x.
 UpdatePrivateDnsNamespaceResponse
 -> Rep UpdatePrivateDnsNamespaceResponse x)
-> (forall x.
    Rep UpdatePrivateDnsNamespaceResponse x
    -> UpdatePrivateDnsNamespaceResponse)
-> Generic UpdatePrivateDnsNamespaceResponse
forall x.
Rep UpdatePrivateDnsNamespaceResponse x
-> UpdatePrivateDnsNamespaceResponse
forall x.
UpdatePrivateDnsNamespaceResponse
-> Rep UpdatePrivateDnsNamespaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePrivateDnsNamespaceResponse x
-> UpdatePrivateDnsNamespaceResponse
$cfrom :: forall x.
UpdatePrivateDnsNamespaceResponse
-> Rep UpdatePrivateDnsNamespaceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePrivateDnsNamespaceResponse' 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:
--
-- 'operationId', 'updatePrivateDnsNamespaceResponse_operationId' - A value that you can use to determine whether the request completed
-- successfully. To get the status of the operation, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html GetOperation>.
--
-- 'httpStatus', 'updatePrivateDnsNamespaceResponse_httpStatus' - The response's http status code.
newUpdatePrivateDnsNamespaceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdatePrivateDnsNamespaceResponse
newUpdatePrivateDnsNamespaceResponse :: Int -> UpdatePrivateDnsNamespaceResponse
newUpdatePrivateDnsNamespaceResponse Int
pHttpStatus_ =
  UpdatePrivateDnsNamespaceResponse' :: Maybe Text -> Int -> UpdatePrivateDnsNamespaceResponse
UpdatePrivateDnsNamespaceResponse'
    { $sel:operationId:UpdatePrivateDnsNamespaceResponse' :: Maybe Text
operationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdatePrivateDnsNamespaceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A value that you can use to determine whether the request completed
-- successfully. To get the status of the operation, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html GetOperation>.
updatePrivateDnsNamespaceResponse_operationId :: Lens.Lens' UpdatePrivateDnsNamespaceResponse (Prelude.Maybe Prelude.Text)
updatePrivateDnsNamespaceResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> UpdatePrivateDnsNamespaceResponse
-> f UpdatePrivateDnsNamespaceResponse
updatePrivateDnsNamespaceResponse_operationId = (UpdatePrivateDnsNamespaceResponse -> Maybe Text)
-> (UpdatePrivateDnsNamespaceResponse
    -> Maybe Text -> UpdatePrivateDnsNamespaceResponse)
-> Lens
     UpdatePrivateDnsNamespaceResponse
     UpdatePrivateDnsNamespaceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePrivateDnsNamespaceResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:UpdatePrivateDnsNamespaceResponse' :: UpdatePrivateDnsNamespaceResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: UpdatePrivateDnsNamespaceResponse
s@UpdatePrivateDnsNamespaceResponse' {} Maybe Text
a -> UpdatePrivateDnsNamespaceResponse
s {$sel:operationId:UpdatePrivateDnsNamespaceResponse' :: Maybe Text
operationId = Maybe Text
a} :: UpdatePrivateDnsNamespaceResponse)

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

instance
  Prelude.NFData
    UpdatePrivateDnsNamespaceResponse