{-# 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.UpdatePublicDnsNamespace
-- 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 public DNS namespace.
module Amazonka.Route53AutoNaming.UpdatePublicDnsNamespace
  ( -- * Creating a Request
    UpdatePublicDnsNamespace (..),
    newUpdatePublicDnsNamespace,

    -- * Request Lenses
    updatePublicDnsNamespace_updaterRequestId,
    updatePublicDnsNamespace_id,
    updatePublicDnsNamespace_namespace,

    -- * Destructuring the Response
    UpdatePublicDnsNamespaceResponse (..),
    newUpdatePublicDnsNamespaceResponse,

    -- * Response Lenses
    updatePublicDnsNamespaceResponse_operationId,
    updatePublicDnsNamespaceResponse_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:/ 'newUpdatePublicDnsNamespace' smart constructor.
data UpdatePublicDnsNamespace = UpdatePublicDnsNamespace'
  { -- | A unique string that identifies the request and that allows failed
    -- @UpdatePublicDnsNamespace@ requests to be retried without the risk of
    -- running the operation twice. @UpdaterRequestId@ can be any unique string
    -- (for example, a date\/timestamp).
    UpdatePublicDnsNamespace -> Maybe Text
updaterRequestId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the namespace being updated.
    UpdatePublicDnsNamespace -> Text
id :: Prelude.Text,
    -- | Updated properties for the public DNS namespace.
    UpdatePublicDnsNamespace -> PublicDnsNamespaceChange
namespace :: PublicDnsNamespaceChange
  }
  deriving (UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool
(UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool)
-> (UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool)
-> Eq UpdatePublicDnsNamespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool
$c/= :: UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool
== :: UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool
$c== :: UpdatePublicDnsNamespace -> UpdatePublicDnsNamespace -> Bool
Prelude.Eq, ReadPrec [UpdatePublicDnsNamespace]
ReadPrec UpdatePublicDnsNamespace
Int -> ReadS UpdatePublicDnsNamespace
ReadS [UpdatePublicDnsNamespace]
(Int -> ReadS UpdatePublicDnsNamespace)
-> ReadS [UpdatePublicDnsNamespace]
-> ReadPrec UpdatePublicDnsNamespace
-> ReadPrec [UpdatePublicDnsNamespace]
-> Read UpdatePublicDnsNamespace
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePublicDnsNamespace]
$creadListPrec :: ReadPrec [UpdatePublicDnsNamespace]
readPrec :: ReadPrec UpdatePublicDnsNamespace
$creadPrec :: ReadPrec UpdatePublicDnsNamespace
readList :: ReadS [UpdatePublicDnsNamespace]
$creadList :: ReadS [UpdatePublicDnsNamespace]
readsPrec :: Int -> ReadS UpdatePublicDnsNamespace
$creadsPrec :: Int -> ReadS UpdatePublicDnsNamespace
Prelude.Read, Int -> UpdatePublicDnsNamespace -> ShowS
[UpdatePublicDnsNamespace] -> ShowS
UpdatePublicDnsNamespace -> String
(Int -> UpdatePublicDnsNamespace -> ShowS)
-> (UpdatePublicDnsNamespace -> String)
-> ([UpdatePublicDnsNamespace] -> ShowS)
-> Show UpdatePublicDnsNamespace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePublicDnsNamespace] -> ShowS
$cshowList :: [UpdatePublicDnsNamespace] -> ShowS
show :: UpdatePublicDnsNamespace -> String
$cshow :: UpdatePublicDnsNamespace -> String
showsPrec :: Int -> UpdatePublicDnsNamespace -> ShowS
$cshowsPrec :: Int -> UpdatePublicDnsNamespace -> ShowS
Prelude.Show, (forall x.
 UpdatePublicDnsNamespace -> Rep UpdatePublicDnsNamespace x)
-> (forall x.
    Rep UpdatePublicDnsNamespace x -> UpdatePublicDnsNamespace)
-> Generic UpdatePublicDnsNamespace
forall x.
Rep UpdatePublicDnsNamespace x -> UpdatePublicDnsNamespace
forall x.
UpdatePublicDnsNamespace -> Rep UpdatePublicDnsNamespace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePublicDnsNamespace x -> UpdatePublicDnsNamespace
$cfrom :: forall x.
UpdatePublicDnsNamespace -> Rep UpdatePublicDnsNamespace x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePublicDnsNamespace' 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', 'updatePublicDnsNamespace_updaterRequestId' - A unique string that identifies the request and that allows failed
-- @UpdatePublicDnsNamespace@ requests to be retried without the risk of
-- running the operation twice. @UpdaterRequestId@ can be any unique string
-- (for example, a date\/timestamp).
--
-- 'id', 'updatePublicDnsNamespace_id' - The ID of the namespace being updated.
--
-- 'namespace', 'updatePublicDnsNamespace_namespace' - Updated properties for the public DNS namespace.
newUpdatePublicDnsNamespace ::
  -- | 'id'
  Prelude.Text ->
  -- | 'namespace'
  PublicDnsNamespaceChange ->
  UpdatePublicDnsNamespace
newUpdatePublicDnsNamespace :: Text -> PublicDnsNamespaceChange -> UpdatePublicDnsNamespace
newUpdatePublicDnsNamespace Text
pId_ PublicDnsNamespaceChange
pNamespace_ =
  UpdatePublicDnsNamespace' :: Maybe Text
-> Text -> PublicDnsNamespaceChange -> UpdatePublicDnsNamespace
UpdatePublicDnsNamespace'
    { $sel:updaterRequestId:UpdatePublicDnsNamespace' :: Maybe Text
updaterRequestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdatePublicDnsNamespace' :: Text
id = Text
pId_,
      $sel:namespace:UpdatePublicDnsNamespace' :: PublicDnsNamespaceChange
namespace = PublicDnsNamespaceChange
pNamespace_
    }

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

-- | The ID of the namespace being updated.
updatePublicDnsNamespace_id :: Lens.Lens' UpdatePublicDnsNamespace Prelude.Text
updatePublicDnsNamespace_id :: (Text -> f Text)
-> UpdatePublicDnsNamespace -> f UpdatePublicDnsNamespace
updatePublicDnsNamespace_id = (UpdatePublicDnsNamespace -> Text)
-> (UpdatePublicDnsNamespace -> Text -> UpdatePublicDnsNamespace)
-> Lens UpdatePublicDnsNamespace UpdatePublicDnsNamespace Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePublicDnsNamespace' {Text
id :: Text
$sel:id:UpdatePublicDnsNamespace' :: UpdatePublicDnsNamespace -> Text
id} -> Text
id) (\s :: UpdatePublicDnsNamespace
s@UpdatePublicDnsNamespace' {} Text
a -> UpdatePublicDnsNamespace
s {$sel:id:UpdatePublicDnsNamespace' :: Text
id = Text
a} :: UpdatePublicDnsNamespace)

-- | Updated properties for the public DNS namespace.
updatePublicDnsNamespace_namespace :: Lens.Lens' UpdatePublicDnsNamespace PublicDnsNamespaceChange
updatePublicDnsNamespace_namespace :: (PublicDnsNamespaceChange -> f PublicDnsNamespaceChange)
-> UpdatePublicDnsNamespace -> f UpdatePublicDnsNamespace
updatePublicDnsNamespace_namespace = (UpdatePublicDnsNamespace -> PublicDnsNamespaceChange)
-> (UpdatePublicDnsNamespace
    -> PublicDnsNamespaceChange -> UpdatePublicDnsNamespace)
-> Lens
     UpdatePublicDnsNamespace
     UpdatePublicDnsNamespace
     PublicDnsNamespaceChange
     PublicDnsNamespaceChange
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePublicDnsNamespace' {PublicDnsNamespaceChange
namespace :: PublicDnsNamespaceChange
$sel:namespace:UpdatePublicDnsNamespace' :: UpdatePublicDnsNamespace -> PublicDnsNamespaceChange
namespace} -> PublicDnsNamespaceChange
namespace) (\s :: UpdatePublicDnsNamespace
s@UpdatePublicDnsNamespace' {} PublicDnsNamespaceChange
a -> UpdatePublicDnsNamespace
s {$sel:namespace:UpdatePublicDnsNamespace' :: PublicDnsNamespaceChange
namespace = PublicDnsNamespaceChange
a} :: UpdatePublicDnsNamespace)

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

instance Prelude.NFData UpdatePublicDnsNamespace

instance Core.ToHeaders UpdatePublicDnsNamespace where
  toHeaders :: UpdatePublicDnsNamespace -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdatePublicDnsNamespace -> 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.UpdatePublicDnsNamespace" ::
                          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 UpdatePublicDnsNamespace where
  toJSON :: UpdatePublicDnsNamespace -> Value
toJSON UpdatePublicDnsNamespace' {Maybe Text
Text
PublicDnsNamespaceChange
namespace :: PublicDnsNamespaceChange
id :: Text
updaterRequestId :: Maybe Text
$sel:namespace:UpdatePublicDnsNamespace' :: UpdatePublicDnsNamespace -> PublicDnsNamespaceChange
$sel:id:UpdatePublicDnsNamespace' :: UpdatePublicDnsNamespace -> Text
$sel:updaterRequestId:UpdatePublicDnsNamespace' :: UpdatePublicDnsNamespace -> 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 -> PublicDnsNamespaceChange -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PublicDnsNamespaceChange
namespace)
          ]
      )

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

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

-- | /See:/ 'newUpdatePublicDnsNamespaceResponse' smart constructor.
data UpdatePublicDnsNamespaceResponse = UpdatePublicDnsNamespaceResponse'
  { -- | 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>.
    UpdatePublicDnsNamespaceResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdatePublicDnsNamespaceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdatePublicDnsNamespaceResponse
-> UpdatePublicDnsNamespaceResponse -> Bool
(UpdatePublicDnsNamespaceResponse
 -> UpdatePublicDnsNamespaceResponse -> Bool)
-> (UpdatePublicDnsNamespaceResponse
    -> UpdatePublicDnsNamespaceResponse -> Bool)
-> Eq UpdatePublicDnsNamespaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdatePublicDnsNamespaceResponse
-> UpdatePublicDnsNamespaceResponse -> Bool
$c/= :: UpdatePublicDnsNamespaceResponse
-> UpdatePublicDnsNamespaceResponse -> Bool
== :: UpdatePublicDnsNamespaceResponse
-> UpdatePublicDnsNamespaceResponse -> Bool
$c== :: UpdatePublicDnsNamespaceResponse
-> UpdatePublicDnsNamespaceResponse -> Bool
Prelude.Eq, ReadPrec [UpdatePublicDnsNamespaceResponse]
ReadPrec UpdatePublicDnsNamespaceResponse
Int -> ReadS UpdatePublicDnsNamespaceResponse
ReadS [UpdatePublicDnsNamespaceResponse]
(Int -> ReadS UpdatePublicDnsNamespaceResponse)
-> ReadS [UpdatePublicDnsNamespaceResponse]
-> ReadPrec UpdatePublicDnsNamespaceResponse
-> ReadPrec [UpdatePublicDnsNamespaceResponse]
-> Read UpdatePublicDnsNamespaceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdatePublicDnsNamespaceResponse]
$creadListPrec :: ReadPrec [UpdatePublicDnsNamespaceResponse]
readPrec :: ReadPrec UpdatePublicDnsNamespaceResponse
$creadPrec :: ReadPrec UpdatePublicDnsNamespaceResponse
readList :: ReadS [UpdatePublicDnsNamespaceResponse]
$creadList :: ReadS [UpdatePublicDnsNamespaceResponse]
readsPrec :: Int -> ReadS UpdatePublicDnsNamespaceResponse
$creadsPrec :: Int -> ReadS UpdatePublicDnsNamespaceResponse
Prelude.Read, Int -> UpdatePublicDnsNamespaceResponse -> ShowS
[UpdatePublicDnsNamespaceResponse] -> ShowS
UpdatePublicDnsNamespaceResponse -> String
(Int -> UpdatePublicDnsNamespaceResponse -> ShowS)
-> (UpdatePublicDnsNamespaceResponse -> String)
-> ([UpdatePublicDnsNamespaceResponse] -> ShowS)
-> Show UpdatePublicDnsNamespaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdatePublicDnsNamespaceResponse] -> ShowS
$cshowList :: [UpdatePublicDnsNamespaceResponse] -> ShowS
show :: UpdatePublicDnsNamespaceResponse -> String
$cshow :: UpdatePublicDnsNamespaceResponse -> String
showsPrec :: Int -> UpdatePublicDnsNamespaceResponse -> ShowS
$cshowsPrec :: Int -> UpdatePublicDnsNamespaceResponse -> ShowS
Prelude.Show, (forall x.
 UpdatePublicDnsNamespaceResponse
 -> Rep UpdatePublicDnsNamespaceResponse x)
-> (forall x.
    Rep UpdatePublicDnsNamespaceResponse x
    -> UpdatePublicDnsNamespaceResponse)
-> Generic UpdatePublicDnsNamespaceResponse
forall x.
Rep UpdatePublicDnsNamespaceResponse x
-> UpdatePublicDnsNamespaceResponse
forall x.
UpdatePublicDnsNamespaceResponse
-> Rep UpdatePublicDnsNamespaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdatePublicDnsNamespaceResponse x
-> UpdatePublicDnsNamespaceResponse
$cfrom :: forall x.
UpdatePublicDnsNamespaceResponse
-> Rep UpdatePublicDnsNamespaceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdatePublicDnsNamespaceResponse' 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', 'updatePublicDnsNamespaceResponse_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', 'updatePublicDnsNamespaceResponse_httpStatus' - The response's http status code.
newUpdatePublicDnsNamespaceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdatePublicDnsNamespaceResponse
newUpdatePublicDnsNamespaceResponse :: Int -> UpdatePublicDnsNamespaceResponse
newUpdatePublicDnsNamespaceResponse Int
pHttpStatus_ =
  UpdatePublicDnsNamespaceResponse' :: Maybe Text -> Int -> UpdatePublicDnsNamespaceResponse
UpdatePublicDnsNamespaceResponse'
    { $sel:operationId:UpdatePublicDnsNamespaceResponse' :: Maybe Text
operationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdatePublicDnsNamespaceResponse' :: 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>.
updatePublicDnsNamespaceResponse_operationId :: Lens.Lens' UpdatePublicDnsNamespaceResponse (Prelude.Maybe Prelude.Text)
updatePublicDnsNamespaceResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> UpdatePublicDnsNamespaceResponse
-> f UpdatePublicDnsNamespaceResponse
updatePublicDnsNamespaceResponse_operationId = (UpdatePublicDnsNamespaceResponse -> Maybe Text)
-> (UpdatePublicDnsNamespaceResponse
    -> Maybe Text -> UpdatePublicDnsNamespaceResponse)
-> Lens
     UpdatePublicDnsNamespaceResponse
     UpdatePublicDnsNamespaceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdatePublicDnsNamespaceResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:UpdatePublicDnsNamespaceResponse' :: UpdatePublicDnsNamespaceResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: UpdatePublicDnsNamespaceResponse
s@UpdatePublicDnsNamespaceResponse' {} Maybe Text
a -> UpdatePublicDnsNamespaceResponse
s {$sel:operationId:UpdatePublicDnsNamespaceResponse' :: Maybe Text
operationId = Maybe Text
a} :: UpdatePublicDnsNamespaceResponse)

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

instance
  Prelude.NFData
    UpdatePublicDnsNamespaceResponse